ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

visa read buffer

I have a VI to read a serial port, the probleme I am waiting for 2 Byte, but with my VI I can use only one Byte.
How can I save the 2 Byte in one string to compare it with another string.
 
Thanks
0 Kudos
Message 1 of 9
(5,782 Views)
I change  my VI and if I send first byte and wait and send the second byte its working, but if I sent the 2 bytes together it doesnt work
how can I recieve the 2 byte (^Q = serial port is open) ?
 
thanky
0 Kudos
Message 2 of 9
(5,778 Views)

You did not use shift register like I suggested in your other post. Try the attached modification. Whatever data is returned, is added to the previous data and then a search is made of all data.

A shift register is a basic element in LabVIEW and you should be familiar with their use. It seems like you are just starting out and might find the tutorials at http://www.ni.com/academic/lv_training/how_learn_lv.htm of some benefit.

Message 3 of 9
(5,764 Views)
thank you for your help.
when I send   ^ alone I recieve it, when I send Q alone I recieve it, but when I send both together "^Q) I recieve a squar.
maybe Labview understand ^Q not like 2 caracter but like a command.
 
I dont andersant Smiley Sad
 
in this image I send first ^Q together then Q alone rhe ^ alone then ^Q together
0 Kudos
Message 4 of 9
(5,751 Views)
The square is an unprintable character. I asked you before and you did not answer - are you just sending the '^' character (shift 6) or are you hitting the CTRL key? The ^Q in your search string is the correct way at all to look for a CTRL-Q


Message Edited by Dennis Knutson on 07-30-2008 08:41 AM
Message 5 of 9
(5,748 Views)
th ^ is on my keboard, I type the ^ and type any caractere then I delete the caractere so I can having the ^.


0 Kudos
Message 6 of 9
(5,728 Views)
I search in Doc und found that teh command ^Q is a XON (port is open) and ^S is  XOFF (port is close). but how can I see if I recieved XON oder XOFF and how can I use it . I want that my VI go to the end when I recieve XON (= ^Q).
 
thanks


Message Edited by cybername on 07-31-2008 08:26 AM
0 Kudos
Message 7 of 9
(5,705 Views)

That is CTRL-Q and I've asked you several times is this what you are sending and if this is what you want to receive.

CTRL-Q in hex is 11 and you can right click on a string contro/constant and select Hex Display. CTRL-S is hex 13. If you are going to be working with hex, you should find an ASCII table that lists them.

Message 8 of 9
(5,700 Views)
thank you  it is working
0 Kudos
Message 9 of 9
(5,694 Views)