Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent USB Serial Read Glitches (only appear in labview)

Solved!
Go to solution

Hi

If each serial data string is handled and after that it waits for another dataset there should be no problem.

Except when the computation takes longer than the sending of a string because you are going to be late for each dataset and get it immediately.

 

The nice thing about a wait in LV is that it sleeps and uses almost no cpu power, and in another parallel part of the system still runs.

 

Look at the producer consumer template for an example of uncoupling production of data and handling of data.

Your production is the reading and the calculation is the handling.

greetings from the Netherlands
0 Kudos
Message 11 of 12
(689 Views)

Yes, I just wrote a trial program and using a while loop works just the same (no excess use of time) with the serial read, except of course it is actually better becuase I don't need to specify the time interval, and so it will work if I change thew sampling rate on the device.   I had a formal idea about the way things are done in parallel in labview, but I still find myself thinking in sequential terms sometimes. Thanks for the suggestion.

0 Kudos
Message 12 of 12
(678 Views)