
DAQFlex Software User's Guide DAQFlex Software Reference
26
DaqDeviceManager.ReleaseDevice()
Frees the resources associated with a DaqDevice object.
static void ReleaseDevice(DaqDevice device);
Shared Sub ReleaseDevice(ByVal device As DaqDevice)
Parameter
Device
A DaqDevice object created by the CreateDevice() method.
DaqDevice class
The DaqDevice class includes the following methods:
SendMessage() – takes a single text-based command that the DAQ device parses to configure a
particular operation.
ReadScanData() – reads scan data.
WriteScanData() – outputs scan data.
EnableCallback() – enables a user-defined callback method to be invoked when a certain condition
is met. This method is used in conjunction with input scan operations.
DisableCallback() – the condition that invokes the callback method.
GetErrorMessage() – gets the error message associated with the error code that is passed to the
user-defined callback.
GetSupportedMessages() – returns a list of messages supported by a DAQ component.
DaqDevice.SendMessage()
Configures DAQ operations. This method takes a single text-based command that the DAQ device
parses to configure a particular operation.
DaqResponse SendMessage (string message);
Function SendMessage (ByVal Message as String) As DaqResponse
Parameter
Message
The text-based message to send to the device.
Return value
The device response as an instance of a DaqResponse object.
Remarks
Message is a string containing a text-based command supported by the device, and Response is a
DaqResponse object containing the device's response.
The DaqResponse object includes two methods:
ToString(): gets the response as a string, for example "AI{0}:VALUE=139".
ToValue(): gets the response as a numeric value, for example "139.0000".
All messages provide a string response, but not all messages provide a numeric response. For those
messages that do not provide a numeric response, the numeric value is set to NaN (not a number).
Comentarios a estos manuales