I AM SORRY, I MADE MISTAKE. THIS WAS MENT FOR node-red-contrib-mcprotocol
Hi,
It would be nice if you can update node "How to use" description with some examples.
These are my recomendations.
### READING VALUES from PLC:
SETTING MC-READ node
use msg.topic as address
HOW TO READ VALUES:
Trigger function node with this settings to get values of X0 ... X15 inputs.
In this example X0 is the first address to read, 16 is length of data to receive
msg.topic="X0,16" msg.payload="" //To nima vpliva return msg;
### WRITING VALUES to PLC:
SETTING MC-WRITE node
use msg.topic as address
use msg.payload as values to write into PLC
HOW TO WRITE VALUES:
Trigger function node with settings like this
//1st option is using address with length --> define as many values as stated in address length (in my example 2 is length msg.topic="D552,2" msg.payload = [666,777] //2nd option is using address array and values array msg.topic=["D552","D558"] msg.payload = [666,777] //3rd option - setting only one value - address is string, value is number msg.topic="D552" msg.payload = 1234
Regards,
Jinx
I AM SORRY, I MADE MISTAKE. THIS WAS MENT FOR node-red-contrib-mcprotocol
Hi, It would be nice if you can update node "How to use" description with some examples. These are my recomendations.
### READING VALUES from PLC:
SETTING MC-READ node use msg.topic as address
HOW TO READ VALUES: Trigger function node with this settings to get values of X0 ... X15 inputs. In this example X0 is the first address to read, 16 is length of data to receive
msg.topic="X0,16" msg.payload="" //To nima vpliva return msg;
### WRITING VALUES to PLC:
SETTING MC-WRITE node use msg.topic as address use msg.payload as values to write into PLC
HOW TO WRITE VALUES: Trigger function node with settings like this
//1st option is using address with length --> define as many values as stated in address length (in my example 2 is length msg.topic="D552,2" msg.payload = [666,777] //2nd option is using address array and values array msg.topic=["D552","D558"] msg.payload = [666,777] //3rd option - setting only one value - address is string, value is number msg.topic="D552" msg.payload = 1234
Regards, Jinx