07-22-2015 08:42 AM
I am trying to synchronize two analogue waveform outputs. I can run and observe both channels in isolation but cannot work out how to run both at the same time. I'm a novice Labview user.
My system contains the following:
Labview 2012
Windows 7
PCI-6035 DAQ card
I've attempted to write code configured as MASTER/SLAVE, an error occurs when the code attempts to write the waveform to the SLAVE output (DAQmx Write), error code -89131
Any help would be much appreciated
Thanks
Duncan
08-03-2015 11:31 AM
Hi Duncan,
As you are trying to write to one channel for the master and one channel for the slave, i think that the problem may be cause by the fact that each of your DAQmx write VIs are configured for multiple channels. If you select a single sample for DAQmx write function this may solve your issue.
Regards,
TomS
08-04-2015 02:49 AM
Edit*
If you select a single channel for DAQmx write function this may solve your issue.
Apologies
08-04-2015 04:22 AM
Hi Duncan,
Please see the attached example programs that demonstrate synchronisation and simultaneous start.
Regards,
Tom-S
MEng (Hons) CLAD
Applications Engineer
National Instruments
08-13-2015 09:59 AM
Hi Tom,
Thanks for the feedback and examples.
The examples you provided have synchronised 1x analog input and 1x output. I'm trying to synchronise 2x analog outputs, I'll try to amend your code.
Duncan
08-13-2015 02:14 PM
Hi Duncan,
For most DAQ devices, only one hardware timed task per subsystem (i.e. analog input, analog output, digital input/ouput, ...) can run at once. Each subsystem has its own dedicated timing and triggering circuitry, and your code has two separate AO tasks trying to configure the AO subsystem's resources simultaneously. After the resources are configured the first time, the second task notices that they're already being used, and it tosses you an error indicating as much.
In order to configure multiple AO channels on a single device, you need to include both (or all) of them in a single task. For your application, since it looks like your channels will be updating at the same rate, this will be fairly straightforward.
That should get you going. Let us know if you run into any other hurdles as you develop your DAQ application!
KB
- Additional reference: Simultaneous AO Tasks on the Same Device
08-17-2015 03:57 AM
Hi Kyle,
Configuring the two channels into the one task works for me, I can now output the two analogue channels simultaneously.
Thanks for your advice.
Duncan