Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital output "write cannot be performed"

Hi,
I'm trying to control a motor which has a potentiometer as it's position sensor.
I need to perform functions on this analog input data in order to send out a digital signal, which will control valves etc.,.
My problem is that the following error signal is occurring and I don't know how to fix it.
All I want to happen at the beginning is for a TRUE value to yield a positive output on my DAQ.
When I had the digital output DAQ in a while loop, the value turned FALSE once it got inside the loop.

Any help would be much appreciated.

"Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.

When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.

Number of Channels in Task: 1
Number of Channels in Data: 100

Task Name: _unnamedTask<65>"

Message Edited by Support on 03-08-2005 07:46 AM

0 Kudos
Message 1 of 6
(2,817 Views)
The problem is that your DAQAssistant2 task is configured to return 100 samples, which you are processing and sending as a boolean array to the DAQAssistant3 task. But the DAQAssistant3 task is a single-point digital task. So the error message is correct and appropriate. You probably want to change the DAQAssistant2 task to only read a single sample.
0 Kudos
Message 2 of 6
(2,799 Views)
thanks joe.
that got it working!
0 Kudos
Message 3 of 6
(2,789 Views)
Hi,
could someone please tell me what I should attach to a digital output in order to switch it on and off constantly for a given condition. The output in question is DAQ4 and the condition is: to begin switching when the signal from the NOT gate is TRUE. For a FALSE value I want the output to reset to 0.
Thanks in advance!

Message Edited by oregan on 03-02-2005 01:14 PM

Message Edited by Support on 03-08-2005 08:30 AM

0 Kudos
Message 4 of 6
(2,777 Views)
Hi Oregan,

Thanks for your post regarding continuously switching your boolean line. I have modified your code slightly so that when you select the Boolean control on the front panel to be false, it simply puts a false value into the DAQ Assistant. When you select that Boolean control to true, it has a shift register which takes the value from the last iteration from the loop and each time inverts it and puts it into the DAQ Assistant. This means it will change the value each time between true and false.

This should hopefully sort your problem out. Please post back if you have further issues.

Best regards,

Peter H.
Applications Engineer.
NIUK.
0 Kudos
Message 5 of 6
(2,750 Views)
Sorry, forgot to attach the modified code that time - here it is.

Pete.

Message Edited by Support on 03-08-2005 01:23 PM

0 Kudos
Message 6 of 6
(2,748 Views)