I am trying to read the task name, channel name, and physical channel from a configuration file and using this information create a DAQmx task and two global virtual channels. Everything seems to be working ok (no error) until I am trying to write to one of the channels, then I get an "Error -200428 occurred at Write Dig Chan.vi". What am I doing wrong? Thanks for your help.
Could you tell me what DAQmx driver and device you are using? In the meantime, I found a knowledge base article that might be applicable to what you are trying to accomplish.
Could you also try writing with only one channel as well?
Hello Corey C,
Thank you for your reply. I modified the vi to one channel, and receive the same result, i.e., error -200428 at DAQmx Write.vi, see attached.
I am running LabVIEW 2011 64 bit on a Win 7ProSP1 system, my device is a NI PCI-6031E, and NI-DAQmx Device driver 9.3.5. (BTW, the communication with the device is working well when using MAX.)
Thank you for looking tinto this issue.
I read the knowledge base article and linked article http://www.ni.com/example/26668/en/ which was informative.
Based on these examples, I modified the first vi as shown in the examples provded: First I create and save the two virtual channels, then I create a task with the saved channels.
This time, I get error -200587 in DAQmx Write.vi. None of the cases listed in the error details applies. For example, I am not using and have not installed the Traditional NI-DAQ drivers.
I think the problem is that you are passing multiple channel names but only trying to grab one channel name and write it. Very similar to how Traditional DAQ would work. Try passing the DAQmx task in and setting the digital write to take multiple samples. You can set one channel per sample.
I tried it out for both the Write Dig Chan.vi and the Write Dig Chan (modified).vi, but in both cases, I get the same errors as before.
Write Dig Chan.vi Error -200428
Write Dig Chan (modified).vi Error -200587
I figured it out. The problem was that I was retrieving a specific channel from the task and then feeding it into the DAQmx Write.vi. If instead I connect the task directly to the DAQmx Write.vi everything works fine.
Thank you so much for your help.