r/LabVIEW • • Nov 02 '25

VISA Read indicator clearing itself and mostly showing blank

hi,
as in the title.
i have data via usb serial in the form:

Value /r/n

the indicator shows the data for short moment then it disapears.

is there a way to solve this?

Best Regards

4 Upvotes

15 comments sorted by

View all comments

Show parent comment

1

u/sjaakwortel Nov 02 '25

If bytes is greater than 0 read that number of bytes, otherwise wait.

1

u/BlackberrySad6489 Nov 02 '25

Yea. Toss a greater than zero on that numeric and put the actual read in a case statement. Simple solution so you only read when something is there to read.

1

u/Gullible_Feedback374 Nov 02 '25

so i have to rearange the whole thing into seperate loops to do so right?

2

u/Drachefly Nov 02 '25

No. Put a case structure around the read call and the write to the 'read buffer' indicator. The condition on the case structure should be the result of '=0' on the 'bytes at port' read. True case, do nothing. False case, do what you have there now.

1

u/Gullible_Feedback374 Nov 02 '25

thats it thanks.
it makes sense to do so but i guess i was not shure how to pause things.
will try :)

1

u/sjaakwortel Nov 02 '25

"pause" could also be an empty state.