|
Topic: DMD0305 CHECKSUM - Checksum Algorithm |
|
|
|
|
|
Checksum values are typically used in this manner:
|
|
Element References:Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.
On Buffer - the data buffer that contains the data used to calculate the checksum. Although this any readable numeric location in the controller, it will typically be a user-defined data buffer, or one of the system-defined Short Strings (SS0 - SS127), or system-defined Long Strings (SL0 - SL63), or any of the user-defined Strings.
Checksum Function - selects the type of checksum calculation to be performed
Initial Value - specifies the initial value for the CRC calculation
Starting Offset - designates the offset into On Buffer in String to begin the checksum calculation. This can be any readable numeric location or any constant value from 0 to the maximum length of the string.
Ending Offset - specifies how
many of the remaining elements in On
Buffer in String to include in the checksum calculation
Destination - designates a location to store the calculated checksum value. This can be any writable numeric location. Make sure the designated location is large enough to store the result of the checksum calculation.
|
|
|
|
|
Status Display:The Status display of the Checksum Algorithm instruction will only display as many of the location in the source String or data buffer as will fit within the borders of the instruction, typically this is about 50 characters.
|
|
|
|
|
See Also:
|
|
|
|
|
Rung Example:
|
|
|
|
|