Start of trail End of trail navigation bar

Table of Contents

QUARC Host Peripheral Client

The QUARC Host Peripheral Client application is part of the QUARC host device framework. It provides the ability to use peripherals present on the host computer with QUARC models running on local or remote targets, even without MATLAB or Simulink running.

Use of host peripherals in QUARC models is enabled by placing a Host Initialize block in the Simulink model. Then other Host blocks specific to the desired peripherals may be added to the model, such as a Host Keyboard block or Host Mouse block to obtain the particular functionality required.

The Host Peripheral Client application may be found under the Quanser QUARC folder of the Start menu. Run the QUARC Host Peripheral Client application and it will place an icon in the system tray. Open the context menu for the application by clicking on the tray icon. This menu is depicted below.

Host Peripheral Client menu

This menu is used for connecting to models running on the local machine or a remote target, and for configuring whether to use monitor host peripherals across the entire desktop, or only within a special "peripheral client window".

Use the Exit menu item to quit the application.

Connecting to a Model

The QUARC Host Peripheral Client application communicates with a model running on a local or remote target using the Quanser communications framework that is common to all of QUARC. The communications protocol and associated options are specified using a Universal Resource Identifier (URI), such as tcpip://remotehost:8000 or shmem://mymemory:1?local=no. QUARC uses URI's for all its communications because it provides a uniform, extensible and flexible means of identifying the communication protocol to use and the associated communication parameters. Refer to Universal Resource Identifiers for more information.

The QUARC Host Peripheral Client connects to the QUARC model as a client. Use the Connect to URI... menu item to specify the URI and connect to the QUARC model. Once the QUARC Host Peripheral Client is connected, the model informs it of the peripherals it requires and then the QUARC Host Peripheral Client begins to monitor those peripherals and stream live data to the model in real time.

To disconnect from the model, simply select the Disconnect menu item.

Desktop or Window?

The Use window menu item determines whether the QUARC Host Peripheral Client application will monitor host peripherals across the entire desktop or whether it will open a special "peripheral client window" that must be active for it to respond to host peripherals. This option must be selected before connecting to a model. If checked, the window illustrated below will open after connecting to the model.

Host Peripheral Client windows

The window contains two child windows: Peripheral Input and Messages. Host devices are ignored unless the Peripheral Input child window is active. The position of the mouse cursor is conveniently shows by cross hairs as it moves around the window, making it easier to determine the location of the cursor on the grid lines. Note that the mouse coordinates are also shown in the status bar of the main window.

By default, the grid lines show the position of the mouse cursor as a percentage of the window dimensions. However, it is possible to change the grid settings by choosing View/Grid... from the menu. The grid may be shown in pixel coordinates or as percentages (to match the possible outputs of the Host Mouse block). The spacing and colour of the grid lines may also be modified.

The Messages window shows mouse and keyboard events that have occurred while the Peripheral Input window is active. It shows the exact coordinates when a mouse button is clicked, for example.

 

navigation bar