Start of trail Altia Initialize navigation bar

Table of Contents

Altia Get Value

Gets the value of an Altia GUI component.

Library

QUARC Targets/User Interface/Altia

Description

Altia Get Value

The Altia Get Value block returns the current value of an Altia GUI component, such as a slider or knob. Altia refers to this value as an event because Altia generates an event whenever a GUI component is moved or modified. This block never waits for the Altia GUI to send it a new value. It always returns immediately. If the value hasn't changed since the last time the block was executed, it returns the previous value. The new output indicates whether the data is new or not.

To use the Altia Get Value block, an Altia Initialize block must be present in the diagram and be associated with an Altia design file. The value to retrieve is selected in the events listbox. This list is populated from all the external input connections specified in the Altia design. External input connections are created in Altia by selecting External objects from the Connections menu. The External Connections dialog shown below will appear:

Altia External Connections dialog

Select Add Connection from the Edit menu of this dialog. Enter a name for the connection and an animation name. The animation name is the name that will appear in the events listbox. It must be unique throughout the Altia design. Choose the Input radio button to indicate that this connection will be an input i.e. a signal sent from Altia to the real-time code or "SIM" as it is indicated in the dialog.

Once the external connections have been defined, you need to connect them to an Altia GUI component for them to manipulate the Altia GUI. Keep the External Connections dialog open. Select the All objects item from the Connections menu. The dialog shown below will appear.

Altia All Connections dialog

Select one of the component's output signals in the Connections dialog. Also select the corresponding input connection in the External Connections dialog. The Connect button should become enabled. Click on the Connect button to establish the link between the external connection visible to Simulink and the component.

Save the design. Then double-click on the Altia Get Value block to open its block parameters dialog. The external connections defined should appear in the list. Click on one of the items in the list to have the block get the value of that signal.

Installation Requirements

Install Please refer to the installation requirements for the Altia Initialize block.

Input Ports

This block has no input ports.

Output Ports

data

The data received from the Altia GUI component. If no new data has arrived since the last time this block was invoked then the last value received is output.

new

Indicates whether the data at the data port is new or whether it is simply being held at the previous value. The output will be true (1) if the data is new and false (0) otherwise.

Parameters and Dialog Box

Altia Get Value

Go to Altia blocks using the same interface

Opens a dialog that lists all the Altia blocks in the model which are currently using the same interface selected in the Interface name parameter. The dialog may be used to go to another Altia block in the model just by double-clicking on the name of the block in the dialog box.

Interface name

The name of the interface containing the component whose value will be retrieved. Interfaces are configured using the Altia Initialize block. Place an Altia Initialize block in your diagram to add an interface name to the list.

Events

A list of all the events defined as external connections in the Altia design. Select an event from this list as the output of the block.

Buffer size (tunable offline)

The size of the FIFO queue used by this block to buffer events sent from Altia. A buffer size of 0 indicates that no buffering should be used and the most recent value of the event should always be returned. If a non-zero buffer size is specified then the block queues events sent by Altia and retrieves an event from the queue each time the block executes. If the FIFO queue would overflow, then events are discarded.

Sample time

The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.

A sample time of -1 indicates that the block inherits its sample time. Since this is a source block, only inherent the sample time when it is placed in a conditionally executed subsystem, like a Triggered or Enabled Subsystem, or in a referenced model.

The default sample time is set to qc_get_step_size, which is a QUARC function that returns the fundamental sampling time of the model. Hence, the default sample time is a discrete sample time with the same sampling time as the fixed step size of the model.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

Yes

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Yes

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

* Compatible means that the block can be compiled for the target.

See Also

 

navigation bar