LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waituntil alternative in LabVIEW

Yeah adding a shift register should work with that.
Message 21 of 29
(1,451 Views)
Dear Dennis
 
 
Thanks for your help, is it very much appreciated
0 Kudos
Message 22 of 29
(1,432 Views)

Dear napview

 

Thanks alot for your help, what is the icon name  that makes rid of left over byte from previous run?

 

Thanks

 

Maple...

 

 

0 Kudos
Message 23 of 29
(1,426 Views)
Dear napview
 
dont I need to flush the contents of the buffer before I read also ,
 
 
Thanks...
maple
0 Kudos
Message 24 of 29
(1,422 Views)
Not really since you only do that once before the loop so anything after that is valid. You only do that more than once if getting out of the loop and do the same or a different write/read operation but usually a few bytes do not affect much. The serial port works best if you have some handshaking scheme like looking for a distinct checksum for each write or read.
Message 25 of 29
(1,414 Views)
The flush buffer icon is under diagram function pallete/instruments IO/serials/. Just add this VISA flush pallete to the Dennis approach should also work too.
Message 26 of 29
(1,412 Views)
Thanks alot for napview and Dennis for you help, I attach an VI program that writes the ASCII character "A" waits till an ASCII character "B" from the serial port , Thanks alot for your help guys
0 Kudos
Message 27 of 29
(1,402 Views)
It looks ok but the write should be inside the loop: logic is keep writing until a B is read and get out of the loop to do something else. Also there is no need to flush it after the write because this could get rid of that important B character from the device. Your logic might be the A character is still in the buffer but that would not affect anything coming from the device. But does this vi always work? If not try what has been suggested.
Message 28 of 29
(1,389 Views)

Hi napview,

 

 

Thanks  alot  for your post, and thnaks for all of your help

 

Maple

0 Kudos
Message 29 of 29
(1,375 Views)