Hi All,
I am trying to get a computer to tak to a piece of laboratory kit. Comms should be via RS232, but the details seem to be unclear, even with the manual. My aim is to be able to drive it via hyperterminal, then script the commands, possibly via autoit.
From the manual it says:
The format of the command string is:
STX Command block ETX Checksum
The checksum is the hex equivalent of the modulo 256 of the sum of the ASCII values of the characters in the command block string.
So an example command could be:
STX GD ETX checksum
would have the ASCII command as ^BGD^C90
The checksum calc is STX=(Hex) 2, G=47, D=44, ETX=3 giving a checksum of 90.
I'd be very grateful for any help with the following:
How does STX change to ^B and ETX get to ^C?
Why does STX and ETX equate to hex values of 2 and 3 respectively?
If my checksum addition equalled 257, would the checksum value equal 1?
Many thanks for any help offered.
--
Mark.
I am trying to get a computer to tak to a piece of laboratory kit. Comms should be via RS232, but the details seem to be unclear, even with the manual. My aim is to be able to drive it via hyperterminal, then script the commands, possibly via autoit.
From the manual it says:
The format of the command string is:
STX Command block ETX Checksum
The checksum is the hex equivalent of the modulo 256 of the sum of the ASCII values of the characters in the command block string.
So an example command could be:
STX GD ETX checksum
would have the ASCII command as ^BGD^C90
The checksum calc is STX=(Hex) 2, G=47, D=44, ETX=3 giving a checksum of 90.
I'd be very grateful for any help with the following:
How does STX change to ^B and ETX get to ^C?
Why does STX and ETX equate to hex values of 2 and 3 respectively?
If my checksum addition equalled 257, would the checksum value equal 1?
Many thanks for any help offered.
--
Mark.