beautypg.com

Daqsetoption, Daqsettimeout – Measurement Computing Personal Daq rev.6.0 User Manual

Page 159

background image

Personal Daq User’s Manual

Appendix B,

887095

API Commands B-27

daqSetOption

DLL Function

daqSetOption(DaqHandleT handle, DWORD chan, DWORD flags, daqOptionType optionType,

FLOAT optionValue);

C

daqSetOption(DaqHandleT handle, DWORD chan, DWORD flags, DaqOptionType optionType,

FLOAT optionValue);

Visual BASIC

VBdaqSetOption&(ByVal handle&, ByVal chan&, ByVal flags&, ByVal optionType&, ByVal

optionValue!)

Delphi

daqSetOption(Handle:DaqHandleT; chan:DWORD; flags:DWORD; optionType:daqOptionType;

optionValue:FLOAT)

handle

The handle to the device for which to set the option

chan

The channel number on the device for which the option is to be set

flags

Flags specifying the options to use.

optionType

Specifies the type of option.

Parameters

optionValue

The value of the option to set

Returns

DerrNoError

No error

See Also

daqAdcExpSetChanOption,

Program References

PULSEEX1.C, MULTEX1.C, FREQEX1.C, DAQEX.FRM (VB), DAQEX.PAS (Delphi)

Used With

All devices

Description

daqSetOption

allows the setting of options for a device’s channel/signal path configuration.

chan

specifies which channel the option applies to.

flags

parameter specifies how the option is to be applied.

optionType

specifies the type of option to apply to the channel.

optionValue

parameter specifies the value of the option.


Note: For more information regarding optionValue and optionType refer to page B-32, Table 8.

Note: The following information does not apply to Personal Daq/54.

daqSetOption

must be used to properly configure Personal Daq’s frequency input and pulse count channels. To configure frequency input

and pulse count channels, the following option types need to be specified for each frequency input/pulse count channel in the scan
sequence:

DcotpDaqPulses

: Configures the specified channel as a pulse count channel.

DcotpDaqRising

: Configures the rising flag for the pulse channel.

DcotpDaqDebounceTime

: Configures the debounce time for the frequency/pulse channel.


The following options must also be specified to configure frequency input channels:

DcotpDaqMinFreq

: Configures the minimum frequency range for the specified channel.

DcotpDaqMaxFreq

: Configures the maximum frequency range for the specified channel.

DcotpDaqFreqRes

: Configures the resolution of the specified frequency channel.

DcotpDaqOverrangeProtect:

Enables the overrange protection mode.

daqSetTimeout

DLL Function

daqSetTimeout(DaqHandleT handle, DWORD mSecTimeout);

C

daqSetTimeout(DaqHandleT handle, DWORD mSecTimeout);

Visual BASIC

VBdaqSetTimeout&(ByVal handle&, ByVal mSecTimeout&)

Delphi

daqSetTimeout(handle:DaqHandleT; mSecTimeout:DWORD)

handle

Handle to the device for which the event time-out is to be set

Parameters

mSecTimeout

Specifies time-out ( ms ) for events

Returns

DerrNoError

No error

See Also

daqWaitForEvent, daqWaitForEvents

Program References

None

Used With

All devices

Description

daqSetTimeout

allows you to set the time-out for waiting on a single event or multiple events. This function can be used in conjunction

with the daqWaitForEvent and daqWaitForEvents functions to specify a maximum amount of time to wait for the event(s) to be
satisfied.

The mSecTimeout parameter specifies the maximum amount of time (in milliseconds) to wait for the event(s) to occur. If the event(s) do
not occur within the specified time-out, the daqWaitForEvent and/or daqWaitForEvents will return.

This manual is related to the following products: