quanser.hardware.hil.get_double_property quanser.hardware.hil.get_string_property navigation bar

Table of Contents

quanser.hardware.hil.get_integer_property

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

Syntax

[values, err] = board.get_integer_property(properties)
    

Description

Returns 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)

'firmware_major_version'

10

major version number of the board firmware

'firmware_minor_version'

11

minor version number of the board firmware

'firmware_build'

12

build number of the board firmware

'firmware_revision'

13

revision number of the board firmware

'firmware_date'

14

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

'firmware_time'

15

time of the board firmware (in milliseconds)

'num_analog_inputs'

16

number of analog inputs

'num_encoder_inputs'

17

number of encoder inputs

'num_digital_inputs'

18

number of digital inputs

'num_other_inputs'

19

number of other inputs

'num_analog_outputs'

20

number of analog outputs

'num_pwm_outputs'

21

number of PWM outputs

'num_digital_outputs'

22

number of digital outputs

'num_clocks'

24

number of clocks

'num_interrupts'

25

number of interrupts

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

Outputs

values

An array of the integer property values

err

A negative error code or zero on success.

Examples

values = board.get_integer_property([0:3]); % Get the board identification properties
    

See Also

 

navigation bar