Table of Contents
hil_open
The HIL API MATLAB functions have been deprecated in favour of the new quanser.hardware.hil class, which has support for code generation for Quanser targets. Hence, with the new hil class it is possible to run MATLAB scripts in real-time on Quanser targets, while making use of the Quanser hardware. |
Opens an HIL board.
[board_handle, err] = hil_open(board_type, board_identifier)
[board_handle, err] = hil_open(board_type) % opens board '0'
Opens an HIL device. When finished with the device, the board must be closed with hil_close or hil_close_all.
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_type
The type of HIL board being configured. Select a board type from the list for board-specific details: .
For example, for the Q8 board the board type is q8.
board_identifier
The number of the board. This optional parameter is only used when there is more than one board of the given type in the computer. The default value for this parameter is 0, indicating the first board of the given type. Subsequent boards are numbered sequentially. Hence, the second board in the system is board 1.
board_handle
A handle to the open board for use with the other HIL functions.
err
A negative error code or zero on success.
board = hil_open('q8', '0'); % Opens the first Q8 board in the system (Q8 board #0). ... hil_close(board); % Close the board to release resources
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.