Table of Contents
quanser.hardware.hil.set_analog_input_configuration
Sets the configuration of analog inputs.
err = board.set_analog_input_configuration(channels, configurations)
Sets the configuration of the specified analog input channels. Only configurations supported by the board may be specified. Invalid configurations will generate an error.
If no err output is provided then it throws an exception if an error occurs. In generated code it prints the error message. Use hil_get_error_message to get the message associated with an error code.
board
The board instance returned by the quanser.hardware.hil.open function.
channels
A vector of channel numbers. Channel numbers are zero-based.
Select a board type from the list for board-specific details: .
configurations
A vector of analog input configurations indicating the configuration for the corresponding channel. There must be one element for each element in the channels vector. Configurations may be specified from the t_analog_input_configuration enumeration or numeric values may be used. See the page for details.
err
A negative error code or zero on success.
% Set channel 0 to referenced single-ended, channel 3 to differential and channel 4 to non-referenced single-ended
board.set_analog_input_configuration([0 3 4], [...
t_analog_input_configuration.ANALOG_INPUT_RSE_CONFIGURATION, ...
t_analog_input_configuration.ANALOG_INPUT_DIFF_CONFIGURATION, ...
t_analog_input_configuration.ANALOG_INPUT_NRSE_CONFIGURATION ...
]);
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.