Documentation search search close
CONTENTS
https://www.speedgoat.com/help/slrt/page/icon_documentation.jpg
v10.0.1.x for R2026a
View other versions

IO901/IO902 - Get State

IO901/IO902 - Get State — Gets State of the driver resource

Library

Simulink Real-Time - Speedgoat

Description

This function returns the current state of the driver resource identified by the value of StateId.

Ports

Output
Value

Value of the desired State ID. See Table below for more details to the different State IDs and possible output values.

Parameters

Module ID

The Module ID has two functions:

  • It defines the logical connection between the Setup block and its I/O blocks

  • It also informs the auto-search feature of the PCI Slot parameter. If only one I/O module of this type is installed, the Module ID must be set to 1. If n modules are installed, it must be in the range 1:n. Not all the I/O modules installed in the target machine need to be used. To see how each I/O module maps to a Module ID, use this Speedgoat API:

    speedgoat.getIoInterfaces("TargetName", "mySpeedgoat")
State ID

State identifier. Enter a Value from the table below identifing the resource you want to read.

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.

PCI Slot (-1: auto-search)

There are two approaches for mapping this block to a specific I/O module installed in your target machine. All modules of the same type must be configured using the same method.

  • Auto-Search: with the default value -1 the I/O module will be automatically located in the target machine. If you have multiple modules of the same kind, the Module ID defines which module is associated with this block. To see how each I/O module maps to a Module ID, use this Speedgoat API:

    speedgoat.getIoInterfaces("TargetName", "mySpeedgoat")

  • Explicit Addressing: to explicitly define the logical address of the I/O module in the target machine, you can provide the PCI bus and slot numbers as a vector: [bus, slot]. To determine these numbers, run the following command in the MATLAB command window:

    speedgoat.getIoInterfaces("TargetName", "mySpeedgoat", "Advanced", true)

    Note that the PCI address can change whenever an I/O module is added or removed – usually, auto-search is the best option.

State ID Table

State IdId #SetableDescription
SCGT_NODE_ID0yesNode Id Of unit.
SCGT_ACTIVE_LINK1yesUnits Active Link. For Boards with multiple links (link 0and 1), you may get/set the active link.
SCGT_NUM_LINK_ERRS2yesNumber of Link errors.
SCGT_EWRAP3yesSet to '1' to enable electronic wrp and bypass thelink. Set to '0' to disable.
SCGT_WRITE_ME_LAST4yesSet to '1' to specify that writes to shared memory willoccur only after coresponding native packets traversethe ring. Set to '0' to specify normal operation, whereWrites to shared memory will not rely on the receptionof native packets.
SCGT_UNICAST_INT_MASK5yesSet to '1' to enable receives of Unicast Interrupts. Setto '0' to disable.
SCGT_BROADCAST_INT_MASK6yesBit vestor describing which of the 32 BroadcastInterupts to receive. Bit 0 coresponds to broadcastInterrupt 0, and bit 31-corresponds to broadcastinterrupt31. Set the coresponding bit to '1' to receivethe broadcast interrupt, set to '0' otherwise. Forexample, to receive interrupt 16 set the mask asfollows: mask = Mask | (1<<16);
SCGT_INT_SELF_ENABLE7yesSe tto '1' to enable reception of network interrupts sentby this node. Set to '0' to disable.
SCGT_RING_SIZE8 The Number of nodes on the ring.
SCGT_UPSTREAM_NODE_ID9 Node ID ot the ring upstream to this node.
SCGT_NET_TIMER_VAL10 Timer that is incremented on every network transmitclock period. For 2.5Gbps configurations, the networktransmit clock period is 8ns. See the hardwaremanaual for addtional information.
SCGT_LATENCY_TIMER_VAL11 Timer that measures transmit latency of the network.
SCGT_SM_TRAFFIC_CNT12 Number of 32-bit shared memory data phases.
SCGT_SPY_TRAFFIC_CNT13yesNumber of 32-bit data phases transmited by nodeSCGT_SPY_NODE_ID.
SCGT_SPY_NODE_ID14yesThe Node Id for whci 32-bit data phases will be
SCGT_TRANSMIT_ENABLE15yesSet to '1' to enable native packet transmitions. Set to'0' to disable. Does not affect retransmition ofnetwork packets.
SCGT_RECIEVE_ENABLE16yesSet to '1' to enable network packet reception. Set to '0'to disable. This includes data packets and networkinterrupt packets. Does not affect retrasnmition ofNetwork packets.
SCGT_RETRANSMIT_ENABLE17yesSet to '1' to enable retrasnmission of foreign networktraffic. Set to '0' to disable.
SCGT_LASER_0_ENABLE18yesSet to '0' enable laser. Set to '0' to disable.
SCGT_LASER_1_ENABLE19yesSet to '0' enable laser. Set to '0' to disable.
SCGT_LINK_UP20 Link up status for active link. '1' if link u, '0' if down.
SCGT_LASER_0_SIGNAL_DET21 Signal detect state for Laser 0: '1' is signal detected, '0'if no signal detected.
SCGT_LASER_1_SIGNAL_DET22 Signal detect state for Laser 1: '1' is signal detected, '0'if no signal detected.
SCGT_D64_ENABLE23yesSet to '1' to enable 64-bit PCI data trasnfers by the GTDMA engine. Se tto '0' to allow only 32-bit PCI datatrasnfers by the GT DMA engine.
SCGT_BYTE_SWAP_ENABLE24yesSet to '1' to enable byte swapping on accesses to GTmemory. Set to '0' to disable.
SCGT_WORD_SWAP_ENABLE25yesSet to '1' to enable byte swapping of 32-bit words on 64-bitaccesses to GT memory. Set to '0' to disable.
SCGT_LINK_ERR_INT_ENABLE26yesSet to '1' to enable reception of link error interrupts.Set to 0 to disable.
SCGT_INT_TRFC_CNTR27 Interrpt Traffic Counter. This counter is incremented onevery reception of network interrupt traffic (native or foreign).
SCGT_NHIQ_INT_CNTR28 Network Interrupt Counter. This counter is incremented on every networkinterrupt that has been placed into the Network Host Interrupt Queue(NHIQ).This values gives a toal number of interrupts received.
SCGT_HST_INT_CNTR29 Host Interupt counter. This counter is incremented onevery new assertion of a host interrupt request.