LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing issue

Good afternoon,

Please don't criticize the organization of my vi as it has been a work in progress for a long time.....  🙂

In my file that I have enclosed, I am attempting to record data every 2 seconds from several different data sources and write to a spreadsheet.  This use to work correctly until I included a time delay on my serial write.  Now it writes data only when the serial write triggers.

What would be the best way to controll the serial write with a satisfactory time delay of 5-30 seconds and still record the spreadsheet data every 1-10 seconds?

I've considered running 2 vi's at the same time where one is the serial write with its own delay and the other is the spreadsheet recording with its own write speed but this is not my preference.

Any thoughts?
0 Kudos
Message 1 of 2
(2,282 Views)
Hello, I would recommend using a Producer/Consumer architecture for this application.  You should acquire your data in one while loop and write to file in a second, you can communicate between the two with a queue.  You can find a template for this architecture under File>>New>>VI>>From Template>>Frameworks>>Design Patterns

I would also recommend a search on the forums for more info if needed.
0 Kudos
Message 2 of 2
(2,276 Views)