Hi,
I'm trying to switch a simple on/off by modbustcp write but is imposible...
I can read prefectly array from plc (Arduino, with mudbus.h library)
but I can't write, always recived error about is not an array.
I need the funcion F15, the F5 doesn't work, with modbus test app F15 works fine
Thanks
For FC 5, msg.payload must be a value of 1 or 0 or true or false
For FC 15, msg.payload must be an array[]
of comma separated values true or false
Put a debug node AFTER the switch node - what are you feeding into the modbus node?
EDIT
Just realised the node icons in your screenshot are different to mine - you might be using a different set of modbus nodes to me (it is always a good idea to provide a link or the full name of the contrib node you are using (to save everyone some time)). My info above ↑ us using node-red-contrib-modbus
This is my node, I know about array, but I don't know how do it
serinmo:
I don't know how do it
How to do what? How many coils do you want to set, and what value(s) do you need to write?
I only need one coil, with value 1/0
What comes out of the switch node? (Add a debug node and post screenshot)
Also post a screenshot of the config of the switch node.
(You will have to indulge me as I am not at a computer and can't check for myself)
Does the "on" and "off" payload permit you to enter JSON? if so then choose that& enter value [1]
or [0]
Hi,
Finally is work correctly, I change my node modbustcp and I installed the modbus node like you.
Thanks
1 Like
system
Closed
9 February 2021 18:15
11
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.