LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

AT-MIO-E-2 badCountError

Hello everyone!

We have been using a board AT-MIO-16-F5 for more than 8 years. Recently, it died (finally Smiley Sad) and we bought a board AT-MIO-E-2. The system does not work, however, the board is OK and I tested it with the test panel. Software was written on CVI and I have never worked with it Smiley Surprised! I have found the problem in code--an error 10100 - badCountError :womansad:. There are lines I think the problem is in.

//////////////////////////

short scxi_modules[9]=       {3,4,5,6,7,8,9,10,11};

short scxi_channels_num[9]=  {8,8,8,8,8,4,4,4, 4};

short scxi_channels_start[9]={0,0,0,0,0,0,0,0, 0};

short plata_channels[1]=     {0};

short plata_gains[1]=        {1};

short plata_buffer[8*5+4*4];

short err;

///////////////////////////

 

err=SCXI_SCAN_Setup(SCXI,9,scxi_modules,scxi_channels_num,scxi_channels_start,PLATA_B,0);

 

Timeout_Config(PLATA_B,2);

err=SCXI_MuxCtr_Setup (PLATA_B, 1, 1, 8*5+4*4);

err=SCAN_Op (PLATA_B, 1, plata_channels, plata_gains, plata_buffer,8*5+4*4, 200000, 0);

//here I got an error!

err=SCXI_MuxCtr_Setup(PLATA_B,0,0,0);

Timeout_Config(PLATA_B,-1);

/////////////////////////////////////////////////////////

 

I guess I have to change something…but what? Please advice. Thanks in advance.

Regard

Natalia

0 Kudos
Message 1 of 2
(2,905 Views)

Hi Natalia,

I believe the new board you got is the AT-MIO-16E-2. I can’t tell by the lines of code you pasted what is going wrong, I checked the definition of the error and it is: “The requested digital port width is not a multiple of the hardware port width or is not attainable by the DAQ hardware.” Natalia, I understand your card is working because it passes the self test, have you tried running one of the examples? By doing so, we can verify that the problem lies within your code. You can find the Traditional DAQ examples here: C:\Program Files\National Instruments\CVIXX\samples\daq\Scxi. I hope this is helpful, let us know the results of this.

Ana P
National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(2,864 Views)