Sign in to follow this  
Followers 0
ckchew666

RS422 communication between 3 Omron PLC, possible?

18 posts in this topic

Hi guys, I've 2 units of CPM1A-40I + CPM1-CIF11 & 1 CJ1M-CPU13 + CJ1W-CIF11. Can I run RS422 network to link all these 3 CPU together for data sharing? The CJ1M need to read & write 3 data each to & from each of the CPM1A CPU. Is RS422 workable/suitable for this application? All the CPUs already has RS422 comm card installed. Please feedback. Thanks.

Share this post


Link to post
Share on other sites
Yes, it is possible, but it will take some work. The best way to do this is to leave the 2 CPM1As serial ports in Host Link mode, 1 set as Host Link unit 0, 1 set as Hot Link unit 1. The CJ1M then uses the serial port in 'RS232 mode', basically for TXD / RXD instructions. The CJ1M then uses the TXD / RXD instructions to send / recieve data from the other 2 PLCs. This will take a little bit of code to accomplish, but it certainly is possible.

Share this post


Link to post
Share on other sites
Thanks for your info, referring to my setup (using rs422), I have to do some programming at all the CPM1A & CJ1M series PLC, am I right? While for your proposed idea, I do not understand how the CJ1M connect to the CPM1A. I taught RS232 mode can only talk one to one? How can one CJ1M talk to 2 CPM1A in rs232 mode. Please explain more, i'm new to Omron. Thanks a lot..

Share this post


Link to post
Share on other sites
Except for moving the data into the memory locations you want to use, no programming will be needed in the CPM1A PLC. All the programmig will be in the CJ1. There are several modes of operation of the CJ serial port. (Host Link, Tool Bus, NT Link, PC Link, RS232). The RS232 mode is not a good description of the mode of operation of the serial port. It simply means that the port will be used with the TXD / RXD instructions to send and receive data. The actual physical layer can be RS232, RS422, RS485. This application will require knowledge of the Host Link protocol, as well as the TXD, RXD, and FCS instructions. The sequence of operation would be something like this. 1. In PLC memory, build a Host Link string to write data to CPM1A # 0. 2. Using the FCS instruction, calculate the FCS (Frame Check Sum) and add to the string. 3. Send the string out the port using the TXD instruction. 4. Wait for the response (including using a timer for a timeout) 5. Receive the response (RXD instruction) or timeout. 6. In PLC memory, build a Host Link string to read data from CPM1A # 0. 7. Using the FCS instruction, calculate the FCS (Frame Check Sum) and add to the string. 8. Send the string out the port using the TXD instruction. 9. Wait for the response (including using a timer for a timeout) 10. Receive the response (RXD instruction or timeout. 11. Repeat steps 1 - 10 for CPM1A # 1. This will move data from the CJ to the CPM1As. If you also need to move data from CPM1A # 0 to CPM1A # 1, then the CJ will have to read the data from CPM1A # 0 and the write it to CPM1A #1, and the other way around. The CPM1As will not directly talk to each other. The CJ will be used to pass the data.

Share this post


Link to post
Share on other sites
PMCR: The above configuration is not workable, I've check with Omron distributor here, they said CPM1A & CJ1W using different RS422 protocol, thus it cannot be work.

Share this post


Link to post
Share on other sites
Hi, I have an application to communicate the way PMCR sugests for several years now (>6). It works perfectly. But recently I discovered function block: _CPU015_TXD and _CPU015_RXD. I didnt test or do anything with them but I do believe this can help you a lot. Some pointers: 1) Message should look something like this . @ 0 0 R R 0 0 0 0 0 0 1 1 _ _ * ? start nodeNr header begin Nr of DM-s FCS terminator DM0 DM1 DM2 DM3-4 DM5-6 DM7 DM8 In HEX (see the message above) 00 40 30 30 52 52 30 30 30 30 30 30 31 31 -- -- 2A 0D (-- -- isFCS) PLEASE BE CAREFULL to use 00(hex) in first DM! 2) I use 2A0D as terminator code 3) In CQM1 there was a problem if pin5 on CPU unit was set to ON !!! Response was appended with EX header! So in CQM1 pin5 MUST BE SET TO OFF! 4) CS1/CJ1 CQM1 (00) CQM1 (01) (NT-AL001) (CIF11) (CIF11) RDA --- > SDA --- > SDA RDB --- > SDB --- > SDB SDA --- > RDA --- > RDA SDB --- > RDB --- > RDB 5) Don't forget to set different Unit Nr. on both CPM PLCs, both must be mode HostLink. 6) Don't forget to set CJ1 port to RS232C (I also set End code as 0x000D - you can see it above in DM8 and port knows this is the end of message, so it sends data out of buffer). 7) All PLCs must have same comm settings - use default (9600,1,7,2,E) 8) I noticed problems with restarting port (bit A526.00) when error ocurs (look into area A528). Sollution: (difup) Move constant #1 into area A528 for RS232 port on CJ1/CS1, and start communicating again. This somehow restarts port. Best regards, Gregor

Share this post


Link to post
Share on other sites
Hi PMCR, Attached is my existing setup. Based on your idea, the network cable from CJ to CPM1A, highlighted in red shall be connected to where? Same as the drawing (existing network)?

Share this post


Link to post
Share on other sites
The CPM1A uses the PLC Data Link protocol but can only share common data areas betweeen 2 PLC's. The CJ Series has the same PLC Data Link protocol that can be shared between up to 9 PLC's. What I do not know is whether the CJ Series can use PLC Data Link with one CPM1A. IF THIS IS POSSIBLE and you want to use this method then you could use the CJ Plc with a relay that switches communications between your two CPM1A. The relay is controlled by an output on the CJ PLC, so it knows WHICH CPM1A it is communicating with. Each CPM1A needs an input telling it that the CJ is communicating to it. Sounds crazy, but should work.

Share this post


Link to post
Share on other sites
Now that I see the whole setup, I agree that this will not work. RS422 can only have 1 communications master. In your existing setup, that is the HMI. The solution that I was suggesting can have only the 3 PLCs on the RS422 connection. This solution (without the HMI) uses the Host Link protocol. The 1:1 vs 1:9 link protocols suggested by Bits N Bytes are not compatible with each other, but are great solutions when used correctly.

Share this post


Link to post
Share on other sites
You could add a CJ1W-SCU41-V1 module to add a RS422 port.

Share this post


Link to post
Share on other sites
I don't think that would work. That would only take care of the CJ1 PLC. You would still end up with multiple 'masters' trying to talk RS422 to the CPM1A PLCs. (The touchscreen is the first master). There are several ways to do this, but not without some architectural changes.

Share this post


Link to post
Share on other sites
PMCR, after spoken to some other programmers, they told me that changing the two units of CPM1A to a CP1L CPU will solve the problem, because CP1L & CJ are in the same protocol. The HMI still maintain at the CJ1 CPU (RS422), am I correct?? Hope to hear from you soon.

Share this post


Link to post
Share on other sites
Hi PMCR, I've attached the new design, based on your experience, design 1, 2 or 3 is a better networking? Edited by ckchew666

Share this post


Link to post
Share on other sites
Option # 1 is the only one that would work. I assume that the MYTEK is using the Host Link protocol. To get the CJ1M and CP1Ls to share data automatically, you would use the PC Link protocol, which can share up to 10 words of data from each PLC with each other PLC. The HMI could not also be on this connection. So, options 2 and 3 would not work. However, when you remove the HMI from the RS422 connection, it is no longer talking to the CPM1A or CP1L PLCs. This may be necessary in your operation. If you need all 3 PLCs to communicate with each other, sharing up to 10 words of data each, and the HMI needs to talk to all the PLCs, you could do the following: (Your distributor could explain the details). See the attached file.

Share this post


Link to post
Share on other sites
PMCR, The HMI only needs to communicate with the CJ CPU, the CJ CPU will read/write a few digital data to/from each of the CP1L CPU. There is not direct communication between the HMI and the CP1L CPU. If that's the case, design 1 & 2 can be use?? Thanks a lot.

Share this post


Link to post
Share on other sites
Only option 1 would work. Option 2 puts 2 'masters' on the same RS422 line (HMI and Polling PLC for PC Link). That would cause data collisions. Also, the RS232 + CIF11 port on the CJ1M needs to be setup for 'PC Link: Master' or 'PC Link: Slave' if a CP1L is the master. The HMI cannot communicate with the CJ1M once the port is setup this way.

Share this post


Link to post
Share on other sites
PMCR, We are currently configuring communication of RS422 using design 1 as per attachment earlier, but failed to get the communication. On the CP1L we are following the user manual settings as per attached. Do you have any words for me, or anything specific I should be aware of? Thanks. Configuration.pdf

Share this post


Link to post
Share on other sites
Are all 3 PLCs (CP1L + CP1L + CJ1M) on the 485 connection right now, or just the 2 CP1Ls? It should be as simple as making 1 PLC the 'Master' and the rest S'laves' with different slave numbers. Make sure you changed the port settings for each PLC and downloaded them Make sure the DIP switch to force the port into Toolbus is off (SW4 = Port 1, SW5 = Port 2) Double check the DIP switch settings on the plug in 422/485 board. Is there COM activity on the LED?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0