LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing program which run simultaneously with a main program?

Hi all..
Could anyone show me a demo.vi on timing data logging?
Perhaps my problem has been discuss before here ...something like a "thread" thing...

What the demo should indicate...
1. A main program is running...and every few seconds, it captures data from a source and store it to an array. It will keep on doing until user decide to quit the program. I hope the timing would not be affected by other "things" done by the main program or the PC system.
Is there an example, a demo, tutorials or discussion regarding this?

Please guide me...
Thank you in advance...
jun
0 Kudos
Message 1 of 4
(2,736 Views)
Unless you have special requirement (like hardware triggered acquisition), Wait Until Next ms Multiple function will serve your purpose. The timer resolution will however, depend on your system.
0 Kudos
Message 2 of 4
(2,736 Views)
Hi aderogba...
i don't have special requirement. Hmm...i think would like my main program.vi runs side by side with the timing.vi. Both programs are invidivual independent which they can run on their own in a way the timing.vi
is not in the main program.vi


What i need is a timing.vi that can read data from certain instrument every 100 ms and then store and update the array. The main program.vi will then get the data from the array when the user require.

Hmm...the solution which you have proposed, I wonder would it be affected by the PC system other tasks timing or also the main program timing?

Could you elaborate more on it,please?
0 Kudos
Message 3 of 4
(2,736 Views)
It sounds like you're wanting to different applications? In this case, you could have to VIs running. They could have a global array which can pass data between the two of them. You could also have the timing.vi write the data to an file and then your main.vi read from the file, but there's a bit more overhead associated with that approach.

As far as being affected by the PC system, there is no way around this, assuming you are running on Windows. Unless you have a real-time system, you can't get around the overhead of Windows. It has to share resources with other applications all the time.
J.R. Allen
0 Kudos
Message 4 of 4
(2,736 Views)