You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, when I try to send a string to my PLC I get an error:
The "size" argument must be of type number. Received type string.
I made a textbox with mode "text input" this outputs a string. This string is then passed in the output node. I defined it as a string and gave it size: 80.
Then after putting in a string in the textbox, Node-RED crashes.
Reading strings works perfect, just like everything else.
The text was updated successfully, but these errors were encountered:
@dkleber89 changes in the API "new Buffer" in "Buffer.alloc"
old: var data = new Buffer(length)
new: var data = Buffer.alloc(length)
But on row 1623 it must be
old: var stringbuf = new Buffer(val.toString().slice(0,convert.length-1) + '\0', 'binary')
wrong: var stringbuf = Buffer.alloc(val.toString().slice(0,convert.length-1) + '\0', 'binary')
new: var stringbuf = Buffer.from(val.toString().slice(0,convert.length-1) + '\0', 'binary')
Hello, when I try to send a string to my PLC I get an error:
The "size" argument must be of type number. Received type string.
I made a textbox with mode "text input" this outputs a string. This string is then passed in the output node. I defined it as a string and gave it size: 80.
![image](https://user-images.githubusercontent.com/29354411/56422590-83fe0000-62a8-11e9-9321-cdfa0f6868ed.png)
Then after putting in a string in the textbox, Node-RED crashes.
![image](https://user-images.githubusercontent.com/29354411/56422812-a5abb700-62a9-11e9-99a1-778aa3fab418.png)
Reading strings works perfect, just like everything else.
The text was updated successfully, but these errors were encountered: