I'm using a Micrologix 1100 and I want to add a sensor that has a RS422/ASCII output. The sensor outputs a series of messages in hex format over RS422 in a specified message format:
CA (start of header) AB (message id) 10 (message # of bytes) 85 (header checksum) ABCD1234....(message) FF (message checksum)
There are about a dozen different messages, but only a few contain information that I'm interested in. So, for example, message A6 contains a measurement in bytes 8-12 that I want to convert from hex to decimal and display on the HMI for the user. I will also need to write messages back to the sensor, which follow the same format, and will need the correct checksum added based on the message contents.
I've got several questions:
1) Is it possible to connect the RS422 device directly to the Micrologix, or will it require an add-on module?
2) How would I set this all up in RsLogix? I'm very inexperienced with the serial programming for RsLogix, so I'll probably need to review some manuals. But, could I potentially copy each message (based on message id) to separate data tables, and then process the information from there, or is there a better way to approach this?
3) How would I handle the beginning and ends of messages? Each message has a common "start of header" (CA), but that's about it. Each message is a different length, and are sent at varying intervals (some are 5 Hz, some 2 Hz, some 1 Hz, etc.)
4) For writing messages back to the sensor, how do I calculate the checksum? Is there an automatic checksum calculator, or would I have to setup math functions to calculate it within the PLC program?
Thanks, and let me know if any additional information is needed!
CA (start of header) AB (message id) 10 (message # of bytes) 85 (header checksum) ABCD1234....(message) FF (message checksum)
There are about a dozen different messages, but only a few contain information that I'm interested in. So, for example, message A6 contains a measurement in bytes 8-12 that I want to convert from hex to decimal and display on the HMI for the user. I will also need to write messages back to the sensor, which follow the same format, and will need the correct checksum added based on the message contents.
I've got several questions:
1) Is it possible to connect the RS422 device directly to the Micrologix, or will it require an add-on module?
2) How would I set this all up in RsLogix? I'm very inexperienced with the serial programming for RsLogix, so I'll probably need to review some manuals. But, could I potentially copy each message (based on message id) to separate data tables, and then process the information from there, or is there a better way to approach this?
3) How would I handle the beginning and ends of messages? Each message has a common "start of header" (CA), but that's about it. Each message is a different length, and are sent at varying intervals (some are 5 Hz, some 2 Hz, some 1 Hz, etc.)
4) For writing messages back to the sensor, how do I calculate the checksum? Is there an automatic checksum calculator, or would I have to setup math functions to calculate it within the PLC program?
Thanks, and let me know if any additional information is needed!