03-21-2014 11:37 AM
Hi, I am using NI PXI 4461 DAQ card. This card has 2 output channels
I would like to write a sine wave to channel 0 and DC output to Channel 1
Could you please let me know how should I set the DAQmx functions to do this
My other quetion is , can I set and write to 1 channel and then while the other acquisition is running set the other one?
or I will get driver is in use error
03-24-2014 01:07 AM
I would greatly appreciate your help
03-24-2014 01:32 AM
03-24-2014 06:21 AM - edited 03-24-2014 06:22 AM
As long as you don't use the sample clock on the DC Analog Output, I think you can do this. Just put the two channels into different tasks. Here is a quick example I put together to try it out. Of course, I'm using a simulated 6225, so your mileage may vary.
03-24-2014 05:41 PM
The problem I should be abale to write to both lines in the while loop because I do initialization in one VI and then should be able to write to both at the same time.
Could you please let me know if it is possible to write to both in the while loop. I have tried in my program I still get resource is resreved error
03-24-2014 05:52 PM
03-25-2014 06:46 AM
@Dennis_Knutson wrote:
Thanks crossrulz. I didn't know you could use a separate task if it was single sample.
Then where's my Kudo?
Tintin,
You sure can write to both inside of the While loop. They just won't exactly update at the same time. That is the issue with having seperate tasks. But for the applications I have ran into, the time difference doesn't matter.
03-25-2014 10:05 AM
Hi Crossrulz
I have just realized even when I run your code I get this error inside the loop after running DAQmx Write ( 1 sample )
Error -50103 occurred at Untitled 1
Possible reason(s):
NI Platform Services: The specified resource is reserved. The operation could not be completed as specified.
Task Name: _unnamedTask<29>
This problem might be specific to this DAQ card. I am using 4461
03-25-2014 10:38 AM - edited 03-25-2014 10:38 AM
tintin_99 wrote:
This problem might be specific to this DAQ card. I am using 4461
I just tried a simulated PCI-4461 and got the same error as you. You will have to put the two channels into a single task and change the values together.
03-25-2014 10:43 AM - edited 03-25-2014 10:44 AM
@crossrulz wrote:
@Dennis_Knutson wrote:
Thanks crossrulz. I didn't know you could use a separate task if it was single sample.Then where's my Kudo?
Tintin,
You sure can write to both inside of the While loop. They just won't exactly update at the same time. That is the issue with having seperate tasks. But for the applications I have ran into, the time difference doesn't matter.
the 4461 won't support single sample on demand so, in this case, Dennis is correct. Both channels will need to reserve the sample clock so, 1 task two channels is the only option for this device. (Unless you WANT errors):smileywink:
"the specs are harder to read but that is what "
[EDIT] Aren't crossing posts fun? I see I didn't add much you didn't find out on your own