LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is there a way to clear the serial port buffer in labview 7?

hi - i am sending hex code over a NI USB-485 cable, using VISA commands and sometimes, i get errors and the hex being returned gets mixed up with whats being received from before........i have to turn the power to my board on and off to clear all the junk but isn't there a way in labview to clear all the junk instead? thanks!
0 Kudos
Message 1 of 3
(4,004 Views)

Make a while loop that will read characters until there are no more.  Use Characters at Port and Read VIs until the count is equal to zero.  Let me know if you need an example.

Matt

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 3
(3,998 Views)
VISA flush I/O Buffer (read HELP/ lock for examples) in VISA advanced
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 3
(3,986 Views)