
adccommunitymod (AutomationDirect) asked a question.
Created Date: March 22,2011
Created By: Lbase
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I have some servo drives (Electrocraft,G &L) lying around that I would like to put to use in a fairly simple cut to length type application. They are old, but I don't think they have been used much. I can send them commands via a serial port for index length, speed, etc. I have to calculate a checksum for the string I send it: The Checksum field contains an ASCII hex version of the 8-bit checksum of the Address, Function, and Data fields. The sum of the Address,Function,Data,and Checksum field should result in a value of zero. When computing the sum,the characters of the Address, Function, and Data fields are summed with the 8-bit value represented by the characters of the checksum field. I have been able calculate this checksum in a CLICK by manipulating an integer word - unpacking into bits, then using only 4 bits at a time to record each hex value in a hex word for use in calculating the checksum. The problem is that the index count can be come quite large and can no longer be held in a single word integer. I don't think the CLICK will let me manipulate a double... So my question is if I step up to a DL06 processor will I be able to manipulate a 32 bit number in some similar fashion to get my 8 bit checksum? I have the software and there is a DL06 operating an automatic stapler here at the plant. I don't have anything to experiment with as of yet and am looking for advice as to what processor to use for this. thanks for any suggestions
Created Date: March 22,2011
Created by: Lbase
I have some servo drives (Electrocraft,G&L) lying around that I would like to put to use in a fairly simple cut to length type application. They are old, but I don't think they have been used much. I can send them commands via a serial port for index length, speed, etc. I have to calculate a checksum for the string I send it:
The Checksum field contains an ASCII hex version of the 8-bit checksum of the
Address, Function, and Data fields. The sum of the Address,Function,Data,and
Checksum field should result in a value of zero. When computing the sum,the
characters of the Address, Function, and Data fields are summed with the 8-bit value
represented by the characters of the checksum field.
I have been able calculate this checksum in a CLICK by manipulating an integer word - unpacking into bits, then using only 4 bits at a time to record each hex value in a hex word for use in calculating the checksum.
The problem is that the index count can be come quite large and can no longer be held in a single word integer. I don't think the CLICK will let me manipulate a double...
So my question is if I step up to a DL06 processor will I be able to manipulate a 32 bit number in some similar fashion to get my 8 bit checksum? I have the software and there is a DL06 operating an automatic stapler here at the plant. I don't have anything to experiment with as of yet and am looking for advice as to what processor to use for this.
thanks for any suggestions