Sign in to follow this  
Followers 0
eclarkmeyer

CJ1M as MODBUS RTU slave

6 posts in this topic

I'm new to the Omron PLC way of doing things so please forgive my ignorance. I have inherited a project that was started several years ago by Omron in Dallas then handed over to their distributor in Amarillo. There has been very little documentation and almost no commenting in the existing program. My job is to organize the logic, document it, give the customer the functionality that they require and make the communications work with a pre-defined template. I'm doing pretty good until we get to the communications thing. We have Modbus Host set up with a direct connection to the host port on the CJ1M-CPU11. The Modbus slave task is cyclic, the address is correct. The Modbus receive task is interrupt. We are using Modbus RTU: 9600,N,8,1. Switch 4 is On. When we poll the PLC the Comm LED lights but we get no response. I have checked the Modbus receive memory address but the count remains at zero. I am missing something, can someone tell me what it might be. Thanks in advance, Clark

Share this post


Link to post
Share on other sites
There are a number of Modbus Slave scenarios floating around the Omron organization. This sounds like one of the older ones. Some are in public domain (see the Omron download section at MrPLC.com). Others are proprietary and are purchased from Omron. Please send me a PM (private message) and outline a few more of the details about the origin of this project.

Share this post


Link to post
Share on other sites
I thought you said this project was started several years ago, but as far as i remember the CJ1MCPU11 was released last year (early this year) >>> ??>.... Also i noticed you said Host port on the CPU.....If i was doing any modbus comm's on the CJ PLC then i would immediatly buy a serial card and download the modbus protocols....in fact this was addressed in a recent thread with a free down load utility and a compiled modbus protocol....

Share this post


Link to post
Share on other sites
The original ladder was extremely well documented as far as the Modbus Slave section. It must have lost it's commenting along the way by somebody uploading a raw program. Here is the documentation for using the Modbus Slave ladder program. Please do not post the code as it is proprietary to Omron. CS1G_CS1H_MODBUS_Slave_Ladder_English.pdf

Share this post


Link to post
Share on other sites
Thank you both for your replies. Jay, You are correct, the Modbus sections of code are well documented. I should have been more clear. The Main task of the program was a mess. The documentation clearly states that the .mem file must be loaded into memory, I did not have that file nor was I aware of it's significance. My first problem started when I was trying to test code written for a CPU12 on a CPU11 PLC. All that I can surmise is that the ladder or the subroutine was corrupted when the program conversion was made. Once the original code was loaded into a CPU12 and the CRC table was loaded into memory the PLC appeared to respond correctly. Sleepy, This is an oilfield SCADA system that normally only communicates every 5-10 minutes at the most. I don't know certain, but I imagine that cost and the lack of demand on the comm port drove the decision to use the Host port. Jay may be able to shed some light on that. I have downloaded the file and the utility and will research the subject. I appreciate you both. ECM

Share this post


Link to post
Share on other sites
The advantage of the code was that it could be used on Omron PLCs that didn't support Protocol Macro functions. The orginal project ran on a CPM2C. When the nedd for multiple analog points arose, then it was ported for CS/CJ PLCs. Ladder code exists for C200HS,C200HX,CQM1/H, CPM2A/C.

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