NIDAQ source time out fixing for 1200 series PCMCIA included
Posted: 07 Sep 2007, 23:00
Hi All,
My name is Gaetano, and I am recently joined to the project, my interest is much more related in the hardware side, but this software package allows me to test easy my hardware device.
For safety issue I will need to use battery powered AD source and Systems such as PCMCIA NI DAQ cards as source in a laptop PC.
I was experienced always the error : “NIADC time out” .
Browsing the forum I have discovered that I am not the only one, here is how I have bypassed the error and started the device:
In “NIADC.CPP” file:
The functions: “int NIADC::ADConfig()” and “int NIADC::Start()” are wrong for some AI devices and 1200 series devices.
int NIADC::Start() fixing:
Instead of:
iStatus = SCAN_Start (iDevice, piBuffer, ulCount, iSampTB, uSampInt, iScanTB, uScanInt);
Use:
iStatus = Lab_ISCAN_Start (iDevice, channels, 1, piBuffer, ulCount, iSampTB, uSampInt, uScanInt);
Reason: some devices do not support the SCAN function for all channels or not recognize the command, if you try to run this command for a 1200 series or some AI devices under LabWindows or LabView your software stuck the board and return an error that means:
The driver recognize the device but is unable to run this specific command.
All the command that you send after are ignored!!!!!
int NIADC::ADConfig() fixing:
Comment for the same reason the line:
iStatus = SCAN_Setup (iDevice, channels, chanVector, gainVector);
No other command are needed, Lab_ISCAN is able to init and use the board at same time…
About the block size:
This is a known issue for the user of this forum, as you know the PCMCIA board needs to handle a bigger size, two ways to fix it:
1) increase the wait time:
In function Process( const GenericSignal*, GenericSignal* signal)
Increase the time2wait: 10* instead of 5*
2) Better way:
Play a little bit with software to find the length of the block that fit for your system.
For my: Centrino core solo 1GB ram + PCMCIA DAQCARD 1200
8 or more samples for every channel fit well eg 4chs @ 256Hz Block size: 32
For other kind of card You need to go trough the whole file and check with NI-DAQ function reference help that the specific command is supported by you board. You need to list it by hardware device, s the only way to be sure.
Of course more hardware tests are needed!!! But I have preferred to share this information ad I hope to have feedback about if it is working or not from other people that use this kind of card.
I hope that someone find this useful
Gaetano
My name is Gaetano, and I am recently joined to the project, my interest is much more related in the hardware side, but this software package allows me to test easy my hardware device.
For safety issue I will need to use battery powered AD source and Systems such as PCMCIA NI DAQ cards as source in a laptop PC.
I was experienced always the error : “NIADC time out” .
Browsing the forum I have discovered that I am not the only one, here is how I have bypassed the error and started the device:
In “NIADC.CPP” file:
The functions: “int NIADC::ADConfig()” and “int NIADC::Start()” are wrong for some AI devices and 1200 series devices.
int NIADC::Start() fixing:
Instead of:
iStatus = SCAN_Start (iDevice, piBuffer, ulCount, iSampTB, uSampInt, iScanTB, uScanInt);
Use:
iStatus = Lab_ISCAN_Start (iDevice, channels, 1, piBuffer, ulCount, iSampTB, uSampInt, uScanInt);
Reason: some devices do not support the SCAN function for all channels or not recognize the command, if you try to run this command for a 1200 series or some AI devices under LabWindows or LabView your software stuck the board and return an error that means:
The driver recognize the device but is unable to run this specific command.
All the command that you send after are ignored!!!!!
int NIADC::ADConfig() fixing:
Comment for the same reason the line:
iStatus = SCAN_Setup (iDevice, channels, chanVector, gainVector);
No other command are needed, Lab_ISCAN is able to init and use the board at same time…
About the block size:
This is a known issue for the user of this forum, as you know the PCMCIA board needs to handle a bigger size, two ways to fix it:
1) increase the wait time:
In function Process( const GenericSignal*, GenericSignal* signal)
Increase the time2wait: 10* instead of 5*
2) Better way:
Play a little bit with software to find the length of the block that fit for your system.
For my: Centrino core solo 1GB ram + PCMCIA DAQCARD 1200
8 or more samples for every channel fit well eg 4chs @ 256Hz Block size: 32
For other kind of card You need to go trough the whole file and check with NI-DAQ function reference help that the specific command is supported by you board. You need to list it by hardware device, s the only way to be sure.
Of course more hardware tests are needed!!! But I have preferred to share this information ad I hope to have feedback about if it is working or not from other people that use this kind of card.
I hope that someone find this useful
Gaetano