Sign in to follow this  
Followers 0
Wizard8100

CompactLogix 1768 and IAI

7 posts in this topic

I have been given a directive to upgrade a machine. I have installed a new CompactLogix 1768 controller, but I was nixed on upgrading the actuators, which are IAI Robocylinders that are tied to an SIO module. I have tried to connect the CompactLogix serial port to the SIO module, but I have been unable to get a response. I believe that I am transmitting the proper 16 bit code to the SIO module, but I am not reading any response. I am using a complete null-modem cable. I have set the Logix port up as ASCII, 8N1, half-duplex, continuous carrier. I have found very little documentation or assistance on communicating between these two devices. I do know that the SIO is using a MODBUS type protocol, but I am not sure if it is true ASCII MODBUS or just ASCII that has a Master/Slave relationship to messaging. The IAI documentations are not very clear on this. Any help or ideas would be appriciated.

Share this post


Link to post
Share on other sites
Fire up the original controller. Connect a laptop (in place of the IAI), use HyperTerminal on the laptop to capture ASCII data (commands) being sent by the original controller. Now connect the same laptop to your new 1768 controller, use HyperTerminal to capture the ASCII data being sent from your new controller. This should allow you to easily see if you are adding or ommiting succinct command punctuation.

Share this post


Link to post
Share on other sites
Half duplex doesn't sound right. This means that whenever you send something, it echoes the characters back to the input buffer which will just further confuse things. Always use full duplex except from a terminal program on a PC when you want to see what you are doing and the remote end doesn't echo everything back at you.

Share this post


Link to post
Share on other sites
Half duplex is what the IAI documentation specifies, although the cable they specify does not allow for handshaking at all. The old OMRON processor is dead, so looking at what it was sending is not an option at this point, and the SIO module of the IAI actuators does not send any response until it gets a valid character string. I am thinking that a MSG instruction might work better than an AWT instruction, but I have never had the need to use the MSG instructions, so I am not sure. I contacted my local Kirby-Risk rep and he has passed along the question to others. IAI has not responded to any of my emails.

Share this post


Link to post
Share on other sites
For RS-232 control from a Micrologix, we have always used these instruction. AWT - ASCII Write (Your ascii strings sent). AWA (Your ascii strings sent, with an appended LF and CR), and lastly a ACL ASCII Clear Buffer - We turn this on when no data is being sent, this allows you to plug, and unplug RS-232 equipment, and keep any stray garbage bits from coming into the receive or transmit buffer of the PLC, and then hanging up the next desired ASCII WRITE to the destination device, due to garbalage. That's it for simple RS-232 ASCII type devices.

Share this post


Link to post
Share on other sites
Ok, By adjusting timing, bowing to the East, and holding my mouth just right, I have managed to send a string command to the SIO of the IAI and have a logical response. Just a matter of timing and settings. Now, the last thing is to generate the BCC on the fly. The IAI system wants to see the BCC as the string of the characters representing the hex code of the BCC. There does not seem to be a way to convert ASCII hex code to a representative string in Logix5000. Is there a simple way to convert these? For instance, the number '0' is represented by the ASCII code $30. I need to convert this to the number 30H. I then need to add 12 of these together and calculate the BCC. Then, for instance, if the BCC comes out to be 82H, I need to convert that to the string '82' so that I can enter $38$32 into the message to the SIO. Clear as mud? I thought so. I have not found a way to do this in Logix5000 without creating a large table. Is that the only way? Thanks everyone.

Share this post


Link to post
Share on other sites
The first member of a string data type is the length. The remaining structure is an array of type SINT (8 bit signed integers) which gives you direct access to the data values you desire. All that remains is to program the correct checksum/CRC that you need. You can do this with a for/next loop. It is probably easiest to do this in structured text. See the Design Considerations manual for more info on the string data type and how to index through it.

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