I'm using a RS232 serial to ethernet converter and am trying to construct serial commands to send via python to read the ion pump's pressure and current. The manual states the message is a string in the following format:
<STX> + <ADDR> + <WIN> + <COM> + <DATA> + <ETX> + <CRC>
<STX> = 0x02
<COM> = 0x30
<EXT> = 0x03
The <WIN> value to read pressure is 812 and to read current is 811. Since I'm using RS232 and issuing a read command, my understanding is that <ADDR> and <DATA> are not used in the calculation of <CRC> or the final message string. Is this correct? Does the <WIN> value need to be converted to hex to calculate the <CRC>?
Without the <CRC>, I believe the serial command to read pressure is:
<STX> + <ADDR> + <WIN> + <COM> + <DATA> + <ETX> + <CRC> = 0x028123003 + <CRC>
And to read pressure:
0x028123003 + <CRC>
Am I on the right track or in the weeds? Thanks.