This command for the Counter module with counter
mode and not frequency mode
to read specified channel's Counter value and reset the counter
of the specified channel in the specified Slot of the I-8000 system.
Syntax
#AASiCjR[CHK](cr)
#
a delimiter character
AA
address number of the I-8000 system. AA= 00 ~ FFh
Si
slot number of the module. i = 0 ~ 3 or 0 ~ 7
Cj
channel number of the module. j = 0 ~ 7
R
command to read counter value and clear the counter value
Character Return(0x0D) for denote the end of the command
Response
Valid Command
>HHHHHHHH [CHK](cr)
for specified channel's Counter or Frequency values in
Hex decimal format
>DDDDDDDDDD[CHK](cr) for
specified channel's Counter or Frequency values in Decimal
format
Invalid Command
?AA[CHK](cr)
Syntax error or communication error may get no response.
>
delimiter for valid command
?
delimiter for invalid command
HHHHHHHH
32 bits pulse/dir counter positive value (00000000~7FFFFFFFh)
32 bits pulse/dir counter negative value (FFFFFFFF~80000000h)
32 bits up/down counter positive value (00000000~7FFFFFFFh)
32 bits up/down counter negative value (FFFFFFFF~80000000h)
32 bits up frequency value (00000000~FFFFFFFFh)
32 bits up counter value (00000000~FFFFFFFFh)
+DDDDDDDDDD
32 bits pulse/dir counter value (-2147483648
~ 2147483647)
32 bits up/down counter value (-2147483648
~ 2147483647)
32 bits frequency value (00000000~4294967295)
32 bits up counter value (00000000~4294967295)
Character Return(0x0D) for denote the end of the response
Example
Command
#01S1C0R
Response
>+805306367 in decimal format
>2FFFFFFF in hex decimal format
Command
#01S1C0
Response
>+0000000000 in decimal format
>00000000 in hex decimal format
Description
If use #01S1C0R to read channel 0 counter value, the result is
+805306367 in decimal or 2FFFFFFF in hex format and then
use #01S1C0 to read the counter value ,the result value is 0 . The module is
plug in slot 1 of the I-8000 system (address =01h).