From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error 10007 at AI Control when acquiring multiple physical and virtual channels

I am aquiring multiple channels on a PCI-MIO-16E-4 board. All but two of the channels are physical AI channels. The other two are specified as channels 21230 and 21231, which are the virtual channel names of analog output channels 0 and 1 (I am generating arbitrary waveforms and outputting them to AO channels 0 and 1--I read them via AI so that I have a record of them as I read my other inputs).

When I acquire only the physical channels there are no problems. When I acquire only the virtual channels there are no problems. When I acquire all the physical channels and virtual channel 21230, there are no problems. When I add the final virtual channel, 21231, I am getting error 1
0007 at AI Control (which is inside AI start).

Can anyone explain this phenomenon?
0 Kudos
Message 1 of 4
(2,478 Views)
Hello Yuri,

Thank you for contacting National Instruments.

This problem could be caused two different ways:

1. Incorrect scan order
2. Unacceptable Virtual Channel Names

The first reason has to do with the order of which you list your channels to be scanned. Make sure that your channels are listed in the order according to their physical channel. For example the virtual channel that represents physical channel zero should be listed first. You may also try reversing this order and place that virtual channel last in your scan order. The idea is to keep them in ascending or decending order.

The other cause may be attributed to you using numbers as the names of your virtual channels. The driver has internal channels which can be referenced by large
numbers as the ones you has chosen. Try changing the names to strings of letters rather than numbers.

Regards,
Bill B
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,478 Views)
I would expect you to get the error when mixing virtual channels with physical channels. The knowledge base linked below explains that this is expected behavior. What is curious is why you were able to successfully acquire physical channels with a single virtual channel. This should not work. Either way, you should not combine physical channels with virtual channels in a single scan. You will need to use one or the other.

Knowledge Base
0 Kudos
Message 3 of 4
(2,478 Views)
Okay, I seem to have solved my own problem--the second channel, 21231 is wrong, it should have been 21240. Just to clear any confusion for anyone who comes across this posting:

My task was to generate an arbitrary waveform, and then record that waveform at the exact same times that I record other physical channels. As such, I decided to generate the waveforms on analog output 0 and 1, and then literally wire those outputs back into two of my analog input channels--that way, I can record those two channels as physical channels along with my other physical channels. I simply was looking for a way to bypass the wiring part--in effect, look for an internal routing of the output at the analog channels to the analog input channels. After searching on the NI website,
I found out that there are diagnostic virtual channels--21230 and 21240--that represent analog outputs 0 and 1. So, instead of literally wiring output to input (and wasting 2 extra analog input channels), I simply added 21230 and 21240 to my analog input scan list. If this represents a case of mixing physical and virtual channels, then I guess doing so is okay, contrary to what the knowledge base article says. My physical data and my arbirtrary waveform data are being collected perfectly, at the same time, under hardware control.
0 Kudos
Message 4 of 4
(2,478 Views)