Im a lecturer that have an old OMRON PLC (CP1E).I would like to connect it with Node-Red for my improvement project on my college.But unfortunately,my plc dont have an ethernet port.So my question is,can i connect it to node-red using serial communication such as RS-232C?if yes,can someone kind enough to teach me how to do it?Thanks in advance
Well, teaching is maybe not what I can do, but I can tell you that it might be possible to connect and communicate with it
Depending on the platform you are selecting (Windows, Linux, PC, RPi) decides what you need to do. Assuming you do not have a serial port in your hw, first you need to get yourself a RS-232 to USB converter. You might also need some 9/25 port adapters, female to female, male to male adapters, null modem cable or converter, etc all depending on the physical sizes of the ports
Next you need to find out what settings you have to configure for the communication to work, baudrate, parity, stop bits etc
Then a protocol description. How to start communication, how to interpret the data, how to send commands
Once you have this, time to connect to Node-RED, build a first flow and start using just serial, inject and debug nodes. Then we take it from there
The Operating system that i use is Window 7 64-bit.I already use an RS-232 to USb converter and link it with my pc.I managed to link it with serial node in Node Red.The result show that it has been connected but in debug dialog there is an error regarding on the data received.It cant show the data correctly.The communication setting that i use is Baudrate 9600,parity None and stop bit is 1.Can you explain to me if what im doing is wrong and how can i fixed it?.Thanks for helping me out with my problem
already done it.My problem now is how can node-red read the data from the PLC?because right now i only establish connection with the plc but node-red still cant receive the data
If you want to read/write data from/to the plc, you should know the protocol and the communications commands. Generally the plc communication is based on a master/slave method, that means you have to send a command from node-red to the plc and read the answer.
Buildin RS485 on that plc support • Modbus-RTU Easy Master and/or No protocol mode (RS485)
U can connect on both
Try to use node-red-contrib-modbus and your node-red need to be configured as slave coz plc can act only as master
PS
Search after "node-red modbus plc"
/IQAPPS
Today,i manage to fetch data from the plc using Node Red.But i dont know what data is been received from PLC.Here i attach the picture of program in PLC and node-red debug message