LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

post my data every user delta time, while my program receive data simutaneously

I am receiving temperature values, I parse it and use the proper indicatore to indicate the temperature, but at the same time user can choose time interval for posting the data on excel worksheet, how do i acccomplish the task while my data continues to be updated on the my front panel and whatever user has choose the time for the data to be recorded in excel happens.
0 Kudos
Message 1 of 3
(2,748 Views)
You can use two case structures, both in the same while loop. Separate intervals for saving and updating data are entered by the operator. Each case structure is controlled by comparing the last time dated was saved or updated to the entered interval. The last time of data saved or updated are held in separate shift registers.
I did the attached LabView 6.1 example for a different application, but you can see the idea for your app in it. Instead of Reading Temperature and Reading Digital, you'll have Updating Front Panel and Saving Data. In the case for Updating Data, wire the data to the terminal or local variable for the front panel indicator. In the case for Saving Data, save it to a file or write it to Excel.
0 Kudos
Message 2 of 3
(2,748 Views)
> I am receiving temperature values, I parse it and use the proper
> indicatore to indicate the temperature, but at the same time user can
> choose time interval for posting the data on excel worksheet, how do i
> acccomplish the task while my data continues to be updated on the my
> front panel and whatever user has choose the time for the data to be
> recorded in excel happens.

Make an independent loop that is timed by the user's delta. Have the
Excel loop read from a global or local variable to get the current
value. Have the acquisition loop write out the current value. If the
user delta is faster than the acquisition, they will get the same value
multiple times. If slower, they will miss logging some values. And for
somewhere inbetween, t
he data is being resampled and will sometimes skip
or duplicate values to change to the new timebase.

Greg McKaskle
Message 3 of 3
(2,748 Views)