02-27-2006 09:03 AM
Hello Brad.
Looking at your vi, the reason why you dont have any timestamp data in your charts is because your 'convert from ddt' function is converting the dynamic data into an array of scalar values. This will remove the timestamp and just take the actual Y values (values read). If you want to use the timestamp data then you'll need to specify '1D array to waveform'.
Then you'll be able to index each individual set of data so that you can manipulate the data for each channel, including the timestamp.
I've attached an example that reads from 4 Analog Input channels on Dev1 using the DAQ assistant, then the data is plotted together as dynamic data, also the data is passed through an 'index array' function to allow you to plot each channel individually.
Please note that on each graph, I have right clicked an unchecked the 'Ignore Timestamp' option, so that the time data is displayed correctly.
I hope this helps
Hannah
03-02-2006 08:01 AM
03-03-2006 02:53 PM
03-06-2006 04:31 AM
Your subvi has a 1D Array of doubles as the input, and a 1D Array of doubles as the output. This wont allow you to pass the timestamp data into your subvi. If you want to do this, you need to change the control and the indicator on the front panel of the subvi to a waveform type. This will then have the correct data type to pass your waveform data into.
When you created the subvi from the menu in LabVIEW from your main vi. LabVIEW will look at all the data types that are being used by the various functions etc that you have selected, and will build the subvi using these data types for the controls and indicators it creates on the front panel of the subvi.
You need to change the control and indicator on your subvi to be a waveform control / indicator, then you will be able to pass waveform data into and out of this subvi.
Hope this helps
Hannah
03-06-2006 08:01 AM
03-06-2006 08:16 AM
Hi Brad,
I'm not sure what you mean by 'how to create an array of waveform data from thin air' but I think you mean so that you have a constant or a control you can work from or build them from other parts of data (from wires) in your program.
If thats the case, then firstly, you can take a waveform control and put it on your front panel. This can be found on the I/O palette. If you want a waveform constant instead, the easiest way to do this is to create a control and then right click it to change it to a constant.
If you want to create a waveform from data that you have in wires, i.e on the fly, then you can use the 'build waveform' function. Which you can find on the 'Waveform' palette. This function takes in the following data
t0 is the start time of the waveform. | |
dt is the time interval between data points in the waveform. | |
Y contains the data values of a waveform. |
and gives out a waveform type of data.
I hope this helps. Let me know if you have some more questions.
Hannah