Skip to main content

Customer Login

This content is for Speedgoat customer only. Log in to see content.

Forgot your password?

Don't have a Speedgoat account? Create an account.

Documentation
CONTENTS
https://www.speedgoat.com/help/slrt/page/icon_documentation.jpg

IO112 - Read channels

IO112 - Read channels — Reads the IO112 analog inputs

Library

Simulink Real-Time - Speedgoat

Description

This driver block together with the Start conversion driver block can be used as an alternative to the Analog input driver block. The Read channels driver block reads and returns the acquired analog input channels. It does not initiate the conversion. The conversion is done using a separate Start conversion driver block. The separation of "start conversion" and "read channels" is mainly used for situations where more than one IO112 I/O module is present in a target machine, and the acquisition of input channels is synchronized across the various IO112 I/O modules.

As the execution of this block and the Start conversion block(s) must be done in a well-defined (deterministic) manner, these blocks provide special synchronization (SYNC) input and output ports which can be turned on and off depending on the block's dialog box settings (see below).

Ports

The output port returns a vector with the number of elements as defined in the Number of Channels field of the Setup block. Each element is of double type and outputs the acquired channel value in volts depending on the Range setting. The Demux or Selection block from the Simulink library can be used to access individual channels in the model.

Inputs
S (SYNC input port)

The block is executed if the signal value is TRUE and is not executed otherwise. Connection to a preceding block ensures that this block is executed after the preceding block. This port is enabled if the Show Input Synchronization Port box in the block mask is checked.

Data Type: logical

Outputs
S (SYNC output port)

If the driver block's SYNC input port is not enabled, the value of this port is TRUE. Otherwise it takes the value (TRUE or FALSE) entered for the block's SYNC input port. Connection to a subsequent block ensures that this block is executed before the subsequent block. This port is enabled if the Show Output Synchronization Port box in the block mask is checked.

Data Type: logical

1..X (X is the last channel as defined in the module's Setup block)

A vector with n elements (where n is the number of selected analog input channels). Each element corresponds to the value from an A/D channel in volts.

Data Type: double

Parameters

The configuration details are all defined in the Setup block.

Module ID

This ID defines the link to the corresponding Setup block.

Show Input Synchronization Port

If checked, the block shows an input port to accept a boolean SYNC signal.

Show Output Synchronization Port

If checked, the block shows an output port which provides the boolean SYNC signal.

Sample Time

Defines the base sample time at which this driver block gets its sample hit. This parameter can also be set to -1 for inherited sample time. The units are in seconds.