LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuously update waveform chart with data from a serial read doesn't work when serial write is in an event structure

So I'm fairly new at Labview here and I'm trying to do serial communications for the first time.  I have all write VISA's within an event structure so that data is sent out to a microcontroller only when the user changes a setting on the front panel.  However, when I try to perform a VISA read from microcontroller data and display this on a waveform chart I get one picture that does not update continuously although I have the entire program in a while loop.  Once I remove all the event structure the waveform chart updates automatically, but I'm stumped as to why this would be the case.  My code is attached.
0 Kudos
Message 1 of 2
(2,644 Views)

The while loop will only execute once every time the event structure executes.  Typically, the timeout case is used to set up a period where if no event has occured, it will let the while loop make another iteration.  In your event structure, you are stuck in the timeout event because you left that node unwired and it defaults to never timeout.  Try deleting the value of 100 connected to the top left of the event structure in my vi, and notice that the while loop does not iterate.

Eric

0 Kudos
Message 2 of 2
(2,634 Views)