Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DIG_Block_In shutdown

Highlighted
I am working on an application that acquires 16-bit data from a PCI-1200 using
DIG_Block_In(). Currently, it is being asked to get 4800 points into a 1
Mb buffer at 20 Hz, clocked by STB* on port A. All is fine until I decide
to abort a run.
If this is done, then the next start results in an NT blue screen of death
with "STOP: 0x0000000A (0x00000000, 0x0000001C, 0x00000001, 0xFC04235A) IRQL_NOT_LESS_OR_EQUAL
Address f04235a".
The shutdown code is the same for either successful completion of the acquisition
or a user-instigated abort:

tmUpdate.Enabled := False; { Turn off the clock that periodically checks
the progress }
Config_DAQ_Event_Message(FiDevice, 0, 'DI0', 0, 0, 0, 0, 0, 0, 0, 0, 0));
DIG_Block_Check(FiDevice, iI
N_GROUP, @ulBytesLeft);
if ulBytesLeft > 0 then
DIG_Block_Clear(FiDevice, iIN_GROUP);
Application.ProcessMessages; { Make sure NIDAQ shuts down }
GlobalUnlock(hInput); { Let go of the buffer DIG_Block_In() was using
}

Any ideas what I'm overlooking? Oh yes, this is on a 400 MHz Pentium II
with NT4 (SP 5),
NIDAQ 6.1, and Delphi 3.

Thanks,
John
0 Kudos
Message 1 of 3
(1,145 Views)
Hi John,

> DIG_Block_Check(FiDevice, iIN_GROUP, @ulBytesLeft);
> if ulBytesLeft > 0 then DIG_Block_Clear(FiDevice, iIN_GROUP);

Just a silly question...

If you call DIG_Block_Clear also when ulBytesLeft <= 0, does it also
give a blue screen? I know, the documentation says... but the
documentation doesn't say anything about a blue screen either...

Maybe a DIG_SCAN_Setup with a groupsize of 0, to release the ports?

Good luck,
Walter
0 Kudos
Message 2 of 3
(1,145 Views)
"Walter van Iterson" wrote:
>>Hi John,>>> DIG_Block_Check(FiDevice, iIN_GROUP, @ulBytesLeft);>> if ulBytesLeft
> 0 then DIG_Block_Clear(FiDevice, iIN_GROUP);>>Just a silly question...>>If
you call DIG_Block_Clear also when ulBytesLeft <= 0, does it also >give a
blue screen? I know, the documentation says... but the >documentation doesn't
say anything about a blue screen either...>>Maybe a DIG_SCAN_Setup with a
groupsize of 0, to release the ports?>>Good luck,>Walter

Hi Walter,

If ulBytesLeft <= 0, then there is no transfer in progress and DIG_Block_Clear
will return an error. Releasing the ports appears to have cured the problem
though.

Thanks for the suggestions.
John
0 Kudos
Message 3 of 3
(1,145 Views)