Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I send five single characters (P, H, O, T, O) by using ComWrt, instead of sending a single string?

Solved!
Go to solution
The instrument manual mentioned that "To enter remote mode "P" "H" "O" "T" "O" must be sent as single characters and not as a single string". How can I send single characters using Serial Port, instead of sending a single string?
0 Kudos
Message 1 of 4
(3,553 Views)

Use 5 separate writes to the serial port. I would imagine you would need to terminate each character in order to make a difference unless it's the timing between writes that would make a difference.

 

The 5 different writes could be done in a loop and with each iteration, you index an array of characters. Since you did not mention what language you are using, I can't provide an example.

Message 2 of 4
(3,550 Views)

Thank you for your suggestion. I am now using LabWindows/CVI 8.0 for programming my application. Would you mind to give me an example for sending the characters by using Serial Port please?

 

0 Kudos
Message 3 of 4
(3,540 Views)
Solution
Accepted by topic author Maggie214

I don't have CVI installed on this pc and in the past I used VISA instead of the ComWrt. If you know how to write a string, then i don't see where your problem is. You are just writing 5 strings instead of one - each with a single character.

 

You might want to post to the CVI board if you are having problems with C.

Message 4 of 4
(3,509 Views)