writeItem
parent
cd6cbf116b
commit
e5bed926b5
|
|
@ -147,7 +147,7 @@ function s7_read_write_loop(ip, obj) {
|
|||
s7write_lock[ip] = true;
|
||||
let item = q.shift();
|
||||
if (item.action == "write") {
|
||||
obj.writeItems(item.variable, [item.value], (e) => {
|
||||
obj.writeItems(item.variable, item.value, (e) => {
|
||||
if (e) {
|
||||
// questa scrittura è fallita
|
||||
item.reject(e);
|
||||
|
|
@ -190,7 +190,7 @@ module.exports = function (RED) {
|
|||
return;
|
||||
}*/
|
||||
s7node_from_plc(msg.plc).then(s7conn => {
|
||||
return s7_write(msg.plc, s7conn, msg.payload.variable, [msg.payload.value]);
|
||||
return s7_write(msg.plc, s7conn, msg.payload.variable, msg.payload.value);
|
||||
}).then(() => {
|
||||
msg.result = "ok";
|
||||
node.send(msg);
|
||||
|
|
|
|||
Loading…
Reference in New Issue