Sign in to follow this  
Followers 0
ner68

Modbus ascii on ab

4 posts in this topic

Has anybody try or know how(or where to find information) to program RS-232 ports on Micrologix Family with AIC+ as Modbus Ascii (Enron) protocol. I´ve used some of the Prolinx gateways in the past, but despite they´re quite good they´re quite expensive (U$S 1000+). As an alternative if VB is available it can be program, but I don´t know if this feature is available on Micrologix.

Share this post


Link to post
Share on other sites
If you're talking about the non-expandable MicroLogix 1000 models, then I can tell you right now to forget it.  Those use DF1 or DH485 and nothing else on the serial port. The MicroLogix 1200 and 1500 have an option where you can set the serial port for Modbus RTU slave mode, but not for any variation of Modbus ASCII. However, the MicroLogix 1200 and MicroLogix 1500 do also have an ASCII mode, in which you could dissect incoming Modbus ASCII strings and respond to them with outgoing strings. Allen-Bradley ASCII instructions and string handling instructions are really meant for interface to things like barcode readers and message displays;  it's very difficult to code a "communications driver" in ladder logic.    I'll wager by your VB comment that you've never used a MicroLogix or SLC controller, and this would be a pretty hefty first project. I think I could figure out how to respond to a limited number of Modbus command codes with the MicroLogix, but it's a pretty hefty amount of memory and code to write to do something the MicroLogix really isn't meant to do.

Share this post


Link to post
Share on other sites
.... but then today my copy of the Modbus Protocol Manual fell out of a box and I got to thinking... how hard can it be ?   Well, it's not fall-off-your-chair easy. First, I'd say restrict your Modbus functionality to just two function codes;  Function 03 for Read Holding Register(s) and Function 16 for Preset Multiple Registers.   Next, remember that the SLC-500 and MicroLogix only support Strings up to 82 characters.   Message overhead takes up 11 charactgers, and each value uses 4 characters, so you can respond to a Modbus ASCII request for only 17 registers. Now, start thinking about the things you have to do with the incoming data string.  I think the hardest part is calculating the LRC error check value (easy compared to CRC). Remember, my first recommendation is to use Modbus RTU with a MicroLogix 1200/1500 if possible !

Share this post


Link to post
Share on other sites
IMHO: The use of Modbus ASCII is not implemented very often as opposed to Modbus RTU which uses the binary format.  Also the Enron extensions to Modbus do not support the ASCII implementation.  Are you sure that you are trying to implement Modbus ASCII or Modbus RTU?  The answers to this post will lead me in the direction to help you do the LRC or CRC in ladder necessary.

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