11-23-2018 02:50 AM
I write a vi program to reed data from serial port and update a Table every 2 minute. whole program work successfully only need to know how to control the timing of table update without effecting the timing of main loop. when i use wait time function it slow the timing of whole loop.
Solved! Go to Solution.
11-23-2018 03:05 AM
Hi kg,
I write a vi program to reed data from serial port and update a Table every 2 minute.
Use ElapsedTime set to count for 2min=120s and AutoRestart. Every time it says "time elapsed!" you update your table (using a case structure).
On your VI:
Why is the table a control when you want to use it as indicator?
Why is there a wait function in the loop? Your loop rate is determined by VISARead function…
There is no VISAClose function to cleanup resources after usage!
Why do you use InsertIntoArray instead of BuildArray?
There is no size limitation on your array data: how long will/should that VI run? How much data do you want to collect?
11-23-2018 03:05 AM