02-13-2008 03:48 PM
02-14-2008 02:23 PM
06-10-2008 01:50 PM - edited 06-10-2008 01:51 PM
Hi,
I am after an easy and basic way of attaching timestamp to acquired data, in a way, so that I can extract it later for time difference calculations.
Unfortunately, I am not finding enough basic conversion VIs between timestamp and numerical data types.
Could you please advice, if there is a basic and established method for all above.
do not hesitate to attach the relevant VI file if there is any. I have Labview 8.0
06-10-2008 02:10 PM
If you are acquiring dynamic data, you can use the Write to Measurement File and it will save the timestamps. If you have waveform data types, you can use Export Waveforms to Spreadsheet File. If you have DBL data, you can easily create waveform data with the Build Waveform function. Wire in a Y array, the timestamp as t0, and your sample rate as dt and use either of the above two functions. If you are using Write to Spreadsheet File right now, you would have to convert your timestamp and data to strings, and then create an array. There are instructions on the block diagram of Write to Spreadsheet File on how to quickly modify it to accept strings as inputs. You could also just use the Spreadsheet String to Array and a Write Text File.
It would be better for you to attach your VI so that someone can see what you have right now.
06-11-2008 05:08 AM
Thanks for the advice. I should have added I need to work on the acquired data and their timestamps in real-time. That pushes me to resist writing data in to a file and reading back from it.
As for conversion functions, for example for speed calculations, I need to deal with the time difference like a normal numerical value.
I have a rather large file of TCP, Serial and Parallel port commuinication VIs, which I use for data acquisition. I may send it next time if it really helps. At the moment I need to attach timestamp to each acquired data, which may travel around the VIs for real-time data processings.
Regards,
Siamak
06-11-2008 01:52 PM
06-13-2008 10:16 AM
I've tried, and realized sometimes I can not have a piece of numeric data combined with it.
On the same file, my current challenge is finding a basic way of memorizing the last value of data for comparing with the next value sampled from serial port. any advice?
06-13-2008 10:59 AM
If you are having a problem with numerically manipulating a timestamp, you need to post your code instead of just saying you have a problem with it.
To keep the last value acquired and comparing it with the next, you just have to use a shift register.
06-19-2008 02:13 PM - edited 06-19-2008 02:20 PM
Hi,
As you may see in the attached snapshot, I am having problem with generating a rather simple pulse. it is supposed to generate three time intervals, and enqueue two numbers between them. so that the whole sequence would look like: Start, Wait, Output 4, Wait, Output 8, Wait, End.
It is simpler than using state machine. I am expecting to have it working using a flat sequence structure.
There must be an added functionality: the whole pulse must be generated upon a true condition which may stay true for a while, but the pulse must be generated only once, when the condition turned true. I have tried to implement this by detecting the rising edge (the top While Loop and Case).
Problem is that piece of code (in the snapshot) does not do the mentioned logic for me. where am I wrongly setting this VI? how should it be configured? Please help.
06-19-2008 09:54 PM