Page 1 of 1

NIDAQ source time out fixing for 1200 series PCMCIA included

Posted: 07 Sep 2007, 23:00
by gaetano
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

NIDAQ

Posted: 10 Sep 2007, 09:23
by gschalk
Gaetano,

These suggestions are of great interest to the BCI2000 community. There have already been a few reports that suggested that the NI Source module had problems with certain cards.

A few questions:
1) With your suggested modifications, would the NI Source module still work with the E Series boards, or are they specific to other cards only?

2) With your suggestions, does the NI Source module work with the new MX drivers?

3) Would you be interested to making these improvements available to other users, and perhaps document some of the issues you mention below? We would be glad to provide you with write access to the relevant directories in the repository, and would be glad to highlight this as a new contribution in the News section on the web site.

Let us know.

Thanks,
The Gerv

Posted: 10 Sep 2007, 19:55
by gaetano
Hi Gerv,

Of course if the comunity thinks that this improvement is whort, I will be happy to share the modified source and the pre-compiled executable.

About your other questions:

1) The modified source does not works with E series due to incompatibility of Lab_IScan... instructions. They still use Scan_... Instructions.
Anyway about the block size issue for PCMCIA cards I think that just a little bit more of wait time can fix it, but must be checked.
Maybe due to the highest number of acquiring device should be worth free this parameter and let the advanced user choose that, I don't know something such as a ring slide that start from the default value and change just the constant that is multiplied in the command time2wait. What do you think about??

2) This is an interesting question, At the moment I don't know, I use only the traditional driver. I think that the problem will be if the board is supported by the new driver; if yes the instruction should be the same... But let me check a little bit on the NI web...


Gaetano

List of compatible hardware

Posted: 10 Sep 2007, 20:36
by gaetano
Hi,
I have just take a tour inside the NI traditional driver help, I have found a lot of device that does not support the SCAN... instruction, for these ones the suggested pach at NISOURCE should works.

Here is the complete list (source NI traditional driver 6.93):

516-LPM
DAQ CARD 500 - 700
1200 series
LAB PC+

For all the other supported one the original version of NISOURCE should works, here is a complete list (source NI traditional driver 6.93):

E series
I series
NI 622XI
PCI/PXI 6115/6120
PCI NI 4451/4551/4452/4552/4454/4472

I hope that this information should be useful!!

Gaetano

NIDAQ

Posted: 14 Sep 2007, 09:18
by gschalk
Gaetano,

Thanks. I will add this information to a readme in the NISource for v2 of BCI2000.

Can you tell me your full name and possibly email address so that I credit you in the readme?

Gerv

My contact

Posted: 14 Sep 2007, 18:59
by gaetano
Hi Gerv,

My name is:

Gaetano

My surname is:

Gargiulo

Contact mail: MYNAME(AT)ee.usyd.edu.au

Another note on the use of this changes!!!

Posted: 17 Sep 2007, 21:18
by gaetano
Hi All,

About the using of the instruction Lab_ISCAN... instead of SCAN_...
Be aware that the board fill up the buffer reversed. This means that when you use more than 1 channel, the sampling channels order is reversed. This is valid for DAQCARD 1200 PCMCIA with NI traditional driver 6.93 under WIN XP.

Anyway this information should be reported on the board's user manual.

If I will get more information I will post here.

Gaetano