02-10-2012 04:50 AM
Hello,
I'd like to general analog output using the values in an array, so the signal can be modified easily according to the requirements. Basicly, I want to using a 20 elements array, and the array is sent every 1s, so each element is sent averagely every 50ms. I wrote a simple code using a for loop, it seems work,but I am not sure about the time issue, how can I confirm I sent it every 1s, the time of waveform chart deos not show this..Please have a look at my code if I did the right thing and give some suggenstions.
Many thanks in advance!
02-10-2012 09:30 AM
Since you have not changed the multiplier for the chart from the default of 1, of course the time is not going to be correct. You do this with a property node or right clicking and selecting Properties>Scales.
Not sure why you are not autoindexing the array. Simply placing it outside the for loop and wiring it through will let you skip that questionable use of the index array function.
Also, you have not provided the device you are using. If it supports hardware timed analog output, you will have much more reliable timing instead of the software timed output which will result in a great deal of jitter in your signal.
02-10-2012 11:12 AM
Thanks Dennis,
I have been using NI6211 since two days ago, I checked the manual and it supports hardware timed analog output. Is thare a simple example for using hardware timed output? Do I have to use a digital output to trigger?
Thank you!
02-10-2012 12:18 PM
There are numerous examples and no, you do not need to use a trigger.
Help>Find Examples and then Hardware Input and Output>DAQmx>Analog Generation>Voltage. I think Cont Gen Voltage Wfm-Int Clk-Non Regeneration is the one you want to look at.