Table of Contents
quanser.hardware.hil.set_string_property
Set the values of the given string properties of the board.
err = board.set_string_property(properties, values)
Sets the values of the given string properties of the board. Not all boards support properties. Properties are generally used for features of the board that may be reconfigured periodically, rather than configured once through the card-specific options (see set_card_specific_options). They are also used to get information about the card. For example, properties may often be used to get the vendor ID and product ID of a card, or the manufacturer. They might also be used for calibrating the A/Ds or D/As on the card.
Properties are identified by a numeric code and boards may have property codes unique to the board. Such custom properties are always assigned a property code of 128 or higher. Property codes between 0 and 127 are reserved for standard properties. There is a separate set of property codes for string properties. Integer-valued properties have their own set of property codes, as do double properties.
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.
properties
An array of property codes or a string or cell array of strings identifying standard properties. Valid strings are currently:
Property |
Code |
Description |
---|---|---|
'manufacturer' |
0 |
manufacturer of the board |
'product_name' |
1 |
product name of the board |
'model_name' |
2 |
model name of the board |
'serial_number' |
3 |
serial number of the board |
Other integral property codes may be supported but are board-specific. Custom codes are always given the value of 128 or above.
values
A string or a cell array of strings containing the property value(s).. It must be the same size as the properties argument.
err
A negative error code or zero on success.
board.set_string_property(128, 'Node1'); % Set custom board property #128 to 'Node1'
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.