Programming Message Example 2
- Updated2024-03-18
- 1 minute(s) read
Programming Message Example 2
To send more than one programming message with one GPIB write operation, embed a <CR> or <LF> in the data string you send. For example, to send the two programming messages change serial port parameters and change serial port XON/XOFF protocol, you could use either of the two following sequences:
- You can send two separate strings to the GPIB in two separate GPIB writes, as in the following example:
viWrite(GPIB232, "SPSET 1200,n,8\r", 15);
viWrite(GPIB232, "XON 1,1\r", 8); - You could also put both messages in one string and send it to the GPIB-RS232/485/422 in one GPIB write, as in the following example:
viWrite(GPIB232, "SPSET 1200,n,8\rXON 1,1\r", 23);