Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i quickly reset device in my program

Hi,
I am writting a program in VB6.0, the device i used is pci6221, before the main program starts to run or after it finishes all the tasks, i wish to reset device to its initial state. I am not sure if there is any function in DAQmx which can quickly reset the device. The funciton should be same with what we usually do in MAX (RESET DEVICE).
Thanks
Jane
0 Kudos
Message 1 of 2
(6,195 Views)
Hi Jane,

There is actually a function called DAQmxResetDevice that does exactly what you are looking for:

DAQmxResetDevice

int32 DAQmxResetDevice (const char deviceName[]);

Purpose

Immediately aborts all tasks associated with a device and returns the device to an initialized state. Aborting a task stops and releases any resources the task reserved.

Parameters

Input
Name Type Description
deviceName const char [] The name of the device, as configured in MAX, to which this operation applies.

Return Value

Name Type Description
status int32 The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.

Source: NI-DAQmx C Reference Help (Start > All Programs > National Instruments > NI-DAQ)
0 Kudos
Message 2 of 2
(6,180 Views)