Sign in to follow this  
Followers 0
ratcliffe_ic

1734-485ASC

9 posts in this topic

I have a project and was hoping to use the above module, I need to send some strings to a Control Techniques Unidrive, now these are in the following format: Drive Read, drive node 11, parameter 13.07 EOT11111307ENQ and I will get the reply STX1111+0.489ETXBCC So I will not get a delimiter at the end, just the BCC value Drive Write, drive node 11, parameter 13.07 EOT1111STX1307+0.490ETXBCC and I will get the reply ACK for a valid message or NAK for an invalid message Therefore I,m dealing with different length replies, no delimiter. Has any one been successful in dealing with strings of different length, I believe you can't change the config in the plc code (for the received length/new delimiter) as you need to reboot the module to do this. Any ideas anyone?

Share this post


Link to post
Share on other sites
I have been through a very similar application with the 1734-485ASC, and I think you will not be able to use it for your application. The 1734-232ASC and -485ASC are great for ASCII applications that have fixed lengths or a delimiter byte like CR or LF or ESC. But they cannot deal with variable-length incoming data that doesn't have a delimiter. They cannot use a period of time as the 'end of frame' indication. Does the Control Techniques have any 'Echo' or 'Ping' commands that will always return a NAK or ACK (and are those literally three-character ASCII or are they single byte codes) ? Maybe you could send both a Read and a Ping, so you always ended with an ACK or NAK. The device I chose instead (I spent a week trying to find a workaround with the 485ASC) is the HMS Fieldbus 'Communicator'. Those modules can use time as a delimiter, and can even check a BCC or CRC for you. You can use different 'parser' definitions for different outgoing data, so one can look for a complex frame (start, variable data, end, checksum) and another can just look for ACK or NAK followed by a few milliseconds of silence.

Share this post


Link to post
Share on other sites
The ACK and NAK are single byte codes, Ctl F and Ctl U There is no PING facility The most important thing here is that I can write to the inverter, so I will have to use the ACK as my delimiter. However I wanted to read some values off it as well, so, what if I was to read a value then write a value (to a parameter of no significance) so I got my ACk, the data after the ACK would then be my read data. Bit messy I know, but I've ordered these things last week and could be stuck with them. Edited by ratcliffe_ic

Share this post


Link to post
Share on other sites
Your idea of performing a Write after each Read is a good one, but what if one of the data bytes is 0x06 or 0x15 ? That's the basic problem with trying to implement a binary protocol with an ASCII device. When I went through this, I did a similar workaround where my data stream sometimes stops until the number of received bytes coincides with the buffer length. I wrote apologies to future users in the rung comments. You can return unopened modules, re-use them on another project, or sell them on the aftermarket to recover part of their cost. But wasted time is gone forever.

Share this post


Link to post
Share on other sites
You are too kind Mr. Roach! I usually just write excuses.

Share this post


Link to post
Share on other sites
Thanks for the reply. Is there a way to reboot the module from within the PLC code? I take your point about wasted time.

Share this post


Link to post
Share on other sites
I tried resetting the module programmatically as part of my investigation, but it just took too long to reboot. You send a CIP service code 0x05 to the module using a MSG instruction (target the Identity Object, Class/Instance/Attribute = 0x01/0x01/0x01) , and that performs a Reset.

Share this post


Link to post
Share on other sites
I have plenty of time to do a reboot so I think it could work for me, how did you locate the information to do a reboot??

Share this post


Link to post
Share on other sites
It's one of those 'Advanced CIP Programming' things. The Reset service is similar to any other CIP service, like Get Attribute Single or Apply Configuration Parameters. I've had to experiment a little with the actual target object, but Identity usually gets the job done. I've learned a lot about CIP under the hood by connecting Wireshark and pressing various buttons in RSLogix 5000. If you go to the status tab for a 1734-485ASC in RSLogix 5000 and click the 'Reset Module' button, the software sends that same service code.

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