I have generated a signal that is sent out an Analog Output line via creating a Task. The only problem is that I start and stop sending the output by using MyTask Start and Stop. But with these there is no way to view what you are sending in a Chart. I would like to be able to display the output in a chart. I can't view the input waveform because I modify it be using DAQmx timing. Am I missing a VI that I can see the output or is there a better way to do it?
#1. I'm not sure what you mean by you can't view the input waveform?? My suggestion if you want to see the output is hookup the output pin to a pin in which you are doing Analog Input on. Then you will be able to chart the input.
#2. If you just want to see the general shape then look at the shipping examples. They all write the output data to a chart for display.
My problem is that I read in about 800 analog voltage values, and then output the packet of values once every 100 mSecs. I want each output value to be high or low for 10 uSecs. So I read in the values and create a waveform, but this waveform only shows the voltage values as a point and not for 10uSecs, which is what I want to display. So when I do the Analog Output, I use the DAQmx timing to set this. The output looks good on a scope. But it just seems reasonable that I should be able to see what is being output out the Analog channel.
All the example code show the waveform before the Timing is done. Like when I do "MyTask Start" it would show the waveform that is being outputed on the channel and than it would stop when "MyTask Stop" is run. I realize I could run the analog output back to the input, but I want this to be more perminant. I just assumed you could see what is being outputed, but maybe not.
In LabVIEW, it would be easy to drop this data into a waveform graph. Since you have your array of data points, you can bundle the desired delta-T into the waveform data type. So that would plot your points on a graph with 10us between each point.
I tried using Build Waveform with a dt at 10uS. From what I can see is that it only changes the time it takes to go between each data point. That is what I thought would work too, but all the dt in Build Waveform did for me was to change the time it takes to transition between points, not how long it stays at each point.
Essentially what I am doing is generating a digital signal that goes from +10 to -10 from my data, That is high/Low for 10uS.
Attached is a screenshot of the graph. You will notice that at each point there is only a spike, unless there are a few highs in a row. For example the data array would be [-8.2, 8.2, -8.2, 8.2, -8.2, 8.2,8.2,8.2,-8.2] What I would like to see is that at each point it would stay high or low for 10uS. It might not be all that critical because I know the output is correct, but it just seems like I should be able to see that output.
The Digital Waveform Graph displays data the way you want horizontally, with respect to time. But it is designed for digital (TTL) data and won't satisfy your vertical display requirements. Basically, you need each point drawn twice so you can see the time duration at which the DAC holds that value. Then, at the same moment in time as the second instance of Point N (at the same horizontal position) you want the first of the pair of Point N+1 to be drawn, and so on. I don't think you can do that with the LabVIEW charts and graphs.
I decided to just create a VI that takes in the waveform array and inserts a copy of the bit before it. So I copy n and insert it at n +1, and do this throughout the array. Ultimately what I was hoping to do was to view the output of my DAQ card, but if I want to do that perminately I can tie AO1 back to an input and display it that way.