PLC configuration

Hi all,

I am reading values from PLC (modbus/tcp) which has analog sensor using modbus node red, and I used input anolog register and read one register. it returns values such as [ 9088]. and it works switch on/off LED when the temperature goes up . I read this value through node-red modbus but I cannot write on LED. I sent zero or one to the coil but it doesn't work and I can't read the values using node-red from coil. I am using the same address for slave (100), and I am not sure if it has different address. could you help me to figure out the problem?

That depends on how the PLC has formatted the data. You will need to look at the specification for your device to see what the value means. Once that is known it should be possible to convert it to a meaningful value.

thanks, so what about the LED, I cant write on it. send 1 or 0 to switch on or off. It is with the sensor in the same slave .

Assuming you are trying to write it over modbus then again you need to look at the PLC spec to find which register/bit you need to write to.

Thank you, the problem I cant find anything about this PLC, as it is free software and I installed it in raspberry pi.
I have another question, is there any PLC simulator based on Ethernet/IP and I can run it in node-red?

Maybe if you mentioned what software you installed, someone may know more about it.

As that is nothing to do with the subject of the thread I suggest starting a new one. When you do that please explain what you mean by a PLC Simulator.

Ok. thanks

  1. A PLC is generally a hardware device, do you mean a software emulating a PLC?
  2. If the PLC supports the MODBUS protocol, search for MODBUS. There are several specifications about like https://en.wikipedia.org/wiki/Modbus
  3. If you are using the node-red-contrib-mudbus , read the doc and have a look at the wiki.