Hi Jason,

I do have the manual for this pump controller which includes few
sections about command syntax.
I wanted to ask you few questions regarding command syntax.

The message format is given in the manual as:

<STX>+<ADDR>+<WIN>+<COM>+<DATA>+<ETX>+<CRC>

For each command I am given a table specifying what the each bracket
section of this string should be.
STX and ADDR for example are always the same and given as 0x02 and
0x80.
I was wondering if 0x in front stands for hex format?
In other words if I know all the numbers for each part of the string
what would be the format I send to the VISA write?
I am given example for command START and it is given in the table:

(02) (80) (30 30 30) (31) (31) (03) (42 33) - I added the brackets to
delimit the sections
<STX>+<ADDR>+<WIN>+<COM>+<DATA>+<ETX>+<CRC>

Do I convert this to hex first before passing it to VISA write? Do
pluses represent spaces?
The <CRC> part is obtained by XORing all of the characters subsequent
to <STX> and including the <ETX> terminator. The value is hexadecimal
coded and indicated by two ASCII character.
The example has 42 33 for CRC see above.
I tried XORing just numbers in (02 80 30 ...so on) and I don't get
right numbers.
Do I need to convert it before?

Thanks,
Pedja

Reply via email to