Daqdevicemanager.releasedevice(), Daqdevice class, Daqdevice.sendmessage() – Measurement Computing DAQFlex User Guide User Manual
Page 26: Releasedevice()
DAQFlex Software User's Guide
DAQFlex Software Reference
26
DaqDeviceManager.ReleaseDevice()
Frees the resources associated with a DaqDevice object.
C#:
static void ReleaseDevice(DaqDevice device);
VB:
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:
– takes a single text-based command that the DAQ device parses to configure a
particular operation.
– 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.
– the condition that invokes the callback method.
– gets the error message associated with the error code that is passed to the
user-defined callback.
– 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.
C#:
DaqResponse SendMessage (string message);
VB:
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).