The Omron CP1 series of programmable logic controllers (PLC) can be found here. accautomation.ca/series/omron-plc-cp1h-series/ Further information on Node-RED can be found here. (IoT Enabling Software) accautomation.ca/series/node-red-iot-enabling-software/ Regards, Garry
Hi, could i ask regarding the javascript when you are read the input / output? how do i know is that (2,4) in the parameter of substr? currently i just confuse for that. let say my motor address in 100.05 , then what should i do to read this? thank you
Hi @daffaatalla6054, Here is the post for this video. accautomation.ca/omron-plc-node-red-serial-communication/ You will see in the post the header code (RR) to read the CIO Memory Area of the Omron. I hope this helps you out. Regards, Garry
Hi@@ACCautomation thank you. then i have 1 more problem, i only can comunicate only with my PLC, then cannot use in node red. but if i use for nodered, the plc cannot upload program like serial port already used. thank you
@@daffaatalla6054 Yes, this is the issue with serial communication. You have two options. You can have a computer with the programming package and physically switch the cable when you need to program. The second method depends on whether the Omron PLC has an Ethernet port. Use this port for programming. I hope this helps you out. Regards, Garry
Hi@@ACCautomation , thank you for the response, currently i am using Omron CQM1H-51CPU. this plc doesn't have any ethernet port. but that's okay, i can switch the cable. but i have a qtn, in your video, you are using D0 till D10. i saw in ur Cxp file doesn't have any of that in "watch", this "watch" mean in the CX programmer you press "ALT + 3" to show. let say i only have 1 input and 1 output . the address for input is 00.0, for output is 100.0, how is that in the node "omron-command" ? do i need to use Header Code : RR, Beginning word 0000, number of word : 0002? is that possible if use like this? thank you
Hi Rita, The light on the Omron communication RS485 board does flash. ua-cam.com/video/S-IrwNJuMWo/v-deo.html If you look at this part of the video you will see it quickly flash when I select the input on Node-RED. It will not flash constantly because I am manually setting the communications only once. Regards, Garry
Hi Grover Oswaldo Villarpando Calle, The Ethernet protocol that Omron uses is called FINS. Here are the Node-Red nodes to be used. flows.nodered.org/node/node-red-contrib-omron-fins Note: I have not tried out these nodes with a controller. Let me know how you make out. Regards, Garry
Hi Reza, This is not possible at runtime. I think you would have this already set before starting the program. Possibly a setup flat file? I would set up timing and continually poll if you have multiple machines to monitor. The selection would then be on the information to display. discourse.nodered.org/t/serial-port-selected-dynamically-from-the-dashboard/52679 I hope this helps you out. Regards, Garry
@@ACCautomation the problem is the PC was not set to be stand by the PLC 😂 it was a portable PC for work, that I think there is any possibility to user use any port of the PC when he connect to PLC, it will cause the port was different, right ?
@@fun_tech The com port may change if this is a USB to Serial connection. If this is a com port (DB9) from the back of the computer, then the number will not change. Regards, Garry
@@ACCautomation I was tryin to write the com port on the serial configuration with the payload, but its still doesn't work how if I make a lot of serial com nodes, each of node is have one com port, it mean if I want to have 10 com port, I use 10 serial node with different com port configuration, is there any problem posibillity when we doing that ?
@@fun_tech Almost every video also has a corresponding webpage post. This will cover more detail and provide the code used in the video. Here is the URL to the post: accautomation.ca/omron-plc-node-red-serial-communication/ This should help you out. Regards, Garry
Hi. I'm Diego and I still trying to write a number in a DM memory but I can not. How can I do that? I try change TX valor, change "RD" to "WD" but still not woriking.. Thanks you for your incredible tutorial and sorry for my english. I'm from Argentina.
Hi Diego, Besides changing to the WD command, you must also make sure that the Omron PLC is in monitor mode. Write operations will not work in run mode. Normally this is set up in the registers to start the controller in monitor mode. I hope this helps you out. Regards, Garry
I tried at home with a CP1E and is working perfect!! . However once USB connection is removed, MODBUS communication with the CPU is ineterrupted. It seems that modbus is working only within USB connection in place with the PC ( CX Programmer running ot not ). I see also in your the video USB cable is connected .This is strange to me may be anyone knows the reason why.
Hi Suresh Kumar, Are you sure that you are selecting the correct communication port for the connection to the Omron controller? In the video, CX-Programmer is running to display and monitor the ladder logic program and settings only. Regards, Garry
@@SureshKumar-pz4bl Very strange. I have never seen this before. This should be a separate communication port. I would give Omron technical support a call and inquire. Regards, Garry
@@ACCautomation Strange indeed!! Same happened when connecting CP1E to my PC via CX Programmer/PLC/Direct Online/Connection Type/Serial Connection: Modbus connection with RS232 cable is fine until USB cable is connected, otherwise it fails.
@@ACCautomation Hello Garry plc forgive me, it was my mistake. I didn't set Flow control XOn/Xoff Now it is fine. In CX-Programmer RS232 Port settings, it is mentioned Standard (9600: 1,7,2,E ) where 1 means XOn/XOff
The Omron CP1 series of programmable logic controllers (PLC) can be found here.
accautomation.ca/series/omron-plc-cp1h-series/
Further information on Node-RED can be found here. (IoT Enabling Software)
accautomation.ca/series/node-red-iot-enabling-software/
Regards,
Garry
Great information, thank you
Thanks for the comment, Jonathan Segura. I'm glad you found it informative.
Garry
Hi, could i ask regarding the javascript when you are read the input / output? how do i know is that (2,4) in the parameter of substr?
currently i just confuse for that. let say my motor address in 100.05 , then what should i do to read this? thank you
Hi @daffaatalla6054,
Here is the post for this video.
accautomation.ca/omron-plc-node-red-serial-communication/
You will see in the post the header code (RR) to read the CIO Memory Area of the Omron.
I hope this helps you out.
Regards,
Garry
Hi@@ACCautomation thank you. then i have 1 more problem, i only can comunicate only with my PLC, then cannot use in node red. but if i use for nodered, the plc cannot upload program like serial port already used. thank you
@@daffaatalla6054
Yes, this is the issue with serial communication. You have two options. You can have a computer with the programming package and physically switch the cable when you need to program. The second method depends on whether the Omron PLC has an Ethernet port. Use this port for programming.
I hope this helps you out.
Regards,
Garry
Hi@@ACCautomation , thank you for the response, currently i am using Omron CQM1H-51CPU. this plc doesn't have any ethernet port. but that's okay, i can switch the cable. but i have a qtn, in your video, you are using D0 till D10. i saw in ur Cxp file doesn't have any of that in "watch", this "watch" mean in the CX programmer you press "ALT + 3" to show. let say i only have 1 input and 1 output . the address for input is 00.0, for output is 100.0, how is that in the node "omron-command" ? do i need to use Header Code : RR, Beginning word 0000, number of word : 0002? is that possible if use like this? thank you
Can you tell me why in video your comunication board comm led wasnt flashing?
Hi Rita,
The light on the Omron communication RS485 board does flash.
ua-cam.com/video/S-IrwNJuMWo/v-deo.html
If you look at this part of the video you will see it quickly flash when I select the input on Node-RED. It will not flash constantly because I am manually setting the communications only once.
Regards,
Garry
Hi, thanks for the video. One question, how could the omron plc communicate through its ethernet port to the node-red? what nodes could i use?
Hi Grover Oswaldo Villarpando Calle,
The Ethernet protocol that Omron uses is called FINS. Here are the Node-Red nodes to be used.
flows.nodered.org/node/node-red-contrib-omron-fins
Note: I have not tried out these nodes with a controller. Let me know how you make out.
Regards,
Garry
@@ACCautomation hello, I tell you that I made this node for ethernet fins, it works well
@@groveroswaldovillarpandoca4067
Excellent. Thanks for letting me know.
Garry
can we use a dropdown on the UI to choose which COM PORT do we use to communicate whit the PLC ?
Hi Reza,
This is not possible at runtime. I think you would have this already set before starting the program. Possibly a setup flat file?
I would set up timing and continually poll if you have multiple machines to monitor. The selection would then be on the information to display.
discourse.nodered.org/t/serial-port-selected-dynamically-from-the-dashboard/52679
I hope this helps you out.
Regards,
Garry
@@ACCautomation the problem is the PC was not set to be stand by the PLC 😂 it was a portable PC for work, that I think there is any possibility to user use any port of the PC when he connect to PLC, it will cause the port was different, right ?
@@fun_tech
The com port may change if this is a USB to Serial connection. If this is a com port (DB9) from the back of the computer, then the number will not change.
Regards,
Garry
@@ACCautomation I was tryin to write the com port on the serial configuration with the payload, but its still doesn't work
how if I make a lot of serial com nodes, each of node is have one com port, it mean if I want to have 10 com port, I use 10 serial node with different com port configuration, is there any problem posibillity when we doing that ?
@@fun_tech
Almost every video also has a corresponding webpage post. This will cover more detail and provide the code used in the video.
Here is the URL to the post:
accautomation.ca/omron-plc-node-red-serial-communication/
This should help you out.
Regards,
Garry
Hi. I'm Diego and I still trying to write a number in a DM memory but I can not. How can I do that? I try change TX valor, change "RD" to "WD" but still not woriking.. Thanks you for your incredible tutorial and sorry for my english. I'm from Argentina.
Hi Diego,
Besides changing to the WD command, you must also make sure that the Omron PLC is in monitor mode. Write operations will not work in run mode. Normally this is set up in the registers to start the controller in monitor mode.
I hope this helps you out.
Regards,
Garry
I tried at home with a CP1E and is working perfect!! . However once USB connection is removed, MODBUS communication with the CPU is ineterrupted. It seems that modbus is working only within USB connection in place with the PC ( CX Programmer running ot not ). I see also in your the video USB cable is connected .This is strange to me may be anyone knows the reason why.
Hi Suresh Kumar,
Are you sure that you are selecting the correct communication port for the connection to the Omron controller?
In the video, CX-Programmer is running to display and monitor the ladder logic program and settings only.
Regards,
Garry
@@ACCautomation port baud etc are fine yes but once USB cable is remved cnnection faiis strange indeed
@@SureshKumar-pz4bl
Very strange. I have never seen this before. This should be a separate communication port. I would give Omron technical support a call and inquire.
Regards,
Garry
@@ACCautomation Strange indeed!! Same happened when connecting CP1E to my PC via CX Programmer/PLC/Direct Online/Connection Type/Serial Connection: Modbus connection with RS232 cable is fine until USB cable is connected, otherwise it fails.
@@ACCautomation Hello Garry plc forgive me, it was my mistake. I didn't set Flow control XOn/Xoff Now it is fine. In CX-Programmer RS232 Port settings, it is mentioned Standard (9600: 1,7,2,E ) where 1 means XOn/XOff