From the next ELK M1 ASCII Protocol Manual for Counter Values:
4.35 Change And Read Counter Values (CV)(cx)
This request command allows automation equipment to read and change a Counter Value stored in the M1. Counter Values RAM based and may be used as flags or to hold simple math values. This feature is available in M1 versions 5.1.6 and later.
Read Counter Value (cv)
08 – Length as hex
cv – Read counter value command
NN – Which Counter Value to be returned (2 decimal ASCII digits, 1 based). ie.”16” = counter value 16. Range 1 to 64.
00 – future use
CC – Checksum
Example: 08cv0100FE Read counter value 1.
Write Counter Value (cx)
0D – Length as hex
cx – Read counter value command
NN – Which Counter Value to be returned (2 decimal ASCII digits, 1 based). ie.”16” = counter value 16. Range 1 to 64.
DDDDD – 16 bit Counter Value returned ( 5 decimal ASCII digits)
00 – future use
CC – Checksum
Example: 0Dcx011234500F1 Write counter value 1 to a value of 12345.
Returns “CV” command string as reply.
Reply With Counter Value Format (CV)
0D – Length as hex
CV – Returned Counter value command
NN – Which Counter Value to be returned (2 decimal ASCII digits, 1 based). ie.”16” = counter value 16. Range 1 to 64.
DDDDD – 16 bit Counter Value returned ( 5 decimal ASCII digits)
00 – future use
CC – Checksum
Example: 0DCV0100123003C Returned value = 123, from Counter Value 1