Riff

Cpu send and receive

10 posts in this topic

I have a CJ1M CPU13 with a CJ1W-ETN21, the routing table has been set with cx-integrator and there are no errors on the display of the module (the led's). I used a CJ2M CPU31 that I had to test communication over our ethernet network, and I could send and receive any size I wanted (10 words or 100 words) without any problems from my office. The functionblocks CPU010_Send and CPU011_Recv was used in the CJ2M. When I try to communicate between two PLC's in our production I get an errorcode (4101), and I get no successfull communication. The functionblocks are in the CJ1M CPU13, and I've tried to connect with both a CJ1M CPU12 with ETN21 and a CJ2M-CPU31 that is in our production. I can't find the errorcode 4101 anywhere in the documentation that is suggested. Kurt

Share this post


Link to post
Share on other sites
http://forums.mrplc.com/index.php?app=downloads&showfile=467 See page 43. It describes the range of error codes 4101-42FF having to do with the FAL instruction being executed in the user program. Can you check the program for using the FAL instruction? Perhaps 4101 is a user generated error.

Share this post


Link to post
Share on other sites
Thanks for the reply. That error will come up in the PLC error log right? Yes, it is :P I did a test, with setting FAL 4 D800, and with that I got an FAL error on the plc (flashing red on bottom line). I've looked inside the FB, and can find no internal use of the adress space that is in the range of where the FAL errors are set. And there is no use of the FAL instruction inside the FB. The FB has a bool for error where I set w201.02, so that I see if there is an error. There is also a word for the errorcode, and I've set that to w210 and it is that one that says 4101 as errorcode. Kurt

Share this post


Link to post
Share on other sites
Today I tried it the other way around. I set ut one of the CJ2M-CPU31 that is in one of the machines that I'm trying to connect together. With the same setup, same adress location and such (only ip change) everything works. So it seems that it is the CJ1M-CPU13 with the CJ1W-ETN21 that cant connect like that. Maybe I need to use some other FB?

Share this post


Link to post
Share on other sites
If the CPU31 has an Ethernet port it is Ethernet IP - the ETN21 is not - perhaps that is causing some issues? I normally use Ethernet IP and then just setup an automatic transfer of data between the 2 units with the Network Configurator For Ethernet IP tool - easy and it just works - no coding at all.

Share this post


Link to post
Share on other sites
It looks like it's causing some problems yes. I had a chat with the local Omron office, and they seem to agree. As it is now, I have no choice but to use the ETN21, so I'll try to look into the more ETN21 specific ways.. sockets and things like that. Thanks for the answers guys :) Kurt

Share this post


Link to post
Share on other sites
I do not think that the issue is that you have an EtherNet/IP module and an ETN21. Both modules support FINS communications just fine. I just tested the _CPU010_SendData and _CPU011_RecvData function blocks with a very similar setup and it worked without any issues. Here is what I did: With code in a CJ1M-CPU11 with CJ1W-ETN21 (Net 1, Node 64, Unit 0) Used CPU010 and CPU011 successfully to / from CJ2H-CPU64-EIP (Net 1, Node 60, Unit 0) and With code in a CJ2H-CPU64-EIP (Net 1, Node 60, Unit 0) Used CPU010 and CPU011 successfully to / from CJ1M-CPU11 with CJ1W-ETN21 (Net 1, Node 64, Unit 0) The CJ2H-CPU64-EIP was also communicating over EtherNet/IP Implicitly (Tag Datalink) during this test. One thing to note is that the CJ1M CPU must be version 3 or higher in order to use the Function Blocks, did you check the CPU version of the CJ1M?

Share this post


Link to post
Share on other sites
I wanted to make sure that the test that I did was more in line with what you are trying to do, so I repeated the process as stated below: Set up CJ2M-CPU31 with a Tag Datalink to another processor (NJ301-1100). I was able to successfully send and receive data to / from the CJ2M-CPU31 to the CJ1W-CPU11 with CJ1W-ETN21 using the CPU010 and CPU011 function blocks. Likewise, I was able to successfully send and receive data to / from the CJ1W-CPU11 with CJ1W-ETN21 to the CJ2M-CPU31 using the CPU010 and CPU011 function blocks. I would suggest checking the version of your CJ1M-CPU13 CPU and if it is V3 or higher, then we can discuss further possibilities. Socket services would be much more work and the EtherNet/IP modules do NOT support Socket services.
1 person likes this

Share this post


Link to post
Share on other sites
It's a 4.0 (io-table -> cj1m-cpu13 -> unit manufacturing information) It's good to hear that it should work :D Kurt

Share this post


Link to post
Share on other sites
And it was a classic case of PEBKAC :P I had at first set Cx-programmer to display hex but before checking the error code that I was getting, I switched back to decimal for some reason.. So the 4101 error was something completly different :P The error was in my routing table, so I got that fixed and now everything is ok. One of the problems was that the IT department had moved the IP of the router.. but the rest was purely PEBKAC Kurt

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