05-21-2007 02:00 AM
05-22-2007 04:05 AM
05-22-2007 05:34 AM
An almost duplicate post ![]()
see here
05-23-2007 03:11 AM
Hi Daniel,
thanks to Dev I know now why it's not working: I'm allowed to have one task in one block diagram only (I had two). I also know how I can create a second channel in the DAQ Assistant (same task). But there is still only one entrance for the data in the DAQ Assistant and as you can see in my VI I want to write different data to the two different channels (5V DC to the one and a square wave to the other).
I have attached my VI (even now I know it's wrong, but I don't know how to do it in the correct way). Maybe you can help me.
THANKS!
05-23-2007 03:12 AM
05-24-2007 03:31 AM
Hi Steffi,
yes, your right. There is always just one Data Input for a DAQ Assistant! But that is no problem. You simply have to merge the signals together (Merge Signals.vi). Below there is a example (motor1.vi), that shows how to do that. The tricky thing is, that you had to different data typs involved (one dynamic and one waveform). Choose either dynamic or waveform for your signals, so you won't run in to conversion problems.
I also added two other VIs (motor2.vi and Config.vi). This VI does exactly the same, as the motor1.vi, except that it's using Low-Level programming, which is much more efficient. The configuration of the task is done within the Config.vi (as you can see the data matches the configuration of the DAQ Assistant). By right-clicking a DAQ Assistant you can select "Create NI-DAQmx-Code" ("NI-DAQmx-Code erzeugen") to generate the Low-Level code from the DAQ Assistant. Also, the motor2.vi uses a 1D Array of Waveforms instead of the dynamic datatyp.
With the two examples added it should not be a problem to continue working.
Bye
Daniel
NIG