quanser.hardware.hil.set_encoder_quadrature_mode quanser.hardware.hil.set_pwm_configuration navigation bar

Table of Contents

quanser.hardware.hil.set_integer_property

Set the values of the given integer properties of the board.

Syntax

err = set_integer_property(properties, values)
    

Description

Sets the values of the given integer 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 integer properties. Double-valued properties have their own set of property codes, as do string 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.

Parameters

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

'vendor_id'

0

vendor ID of the board

'product_id'

1

product or device ID of the board

'subvendor_id'

2

subvendor ID of the board

'subproduct_id'

3

subproduct or subdevice ID of the board

'major_version'

4

major version number of the board

'minor_version'

5

minor version number of the board

'build'

6

build number of the board

'revision'

7

revision number of the board

'date'

8

date of the board (in days since Jan. 1, 2000)

'time'

9

time of the board (in milliseconds)

Other integral property codes may be supported but are board-specific. Custom codes are always given the value of 128 or above.

values

An array of the integer property values. It must be the same size as the properties argument.

Outputs

err

A negative error code or zero on success.

Examples

board.set_integer_property(128, 57); % Set custom board property #128 to 57
    

See Also

 

navigation bar