Skip to Main Content Skip to Search
Product Documentation

Contec PO-64L(PCI)H Digital Output - PO-64L(PCI)H Digital Output block

Library

xPC Target Library for Contec

Scaling Input to Output

Hardware Output

Block Input Data Type

Scaling

TTL

Double (Format:32 1-bit Channels)

uint32 (Format:Single 32-bit Port)

Double:
< 0.5 = TTL low

>0.5 = TTL high

uint32:
Bit clear = TTL low

Bit set = TTL high

Block Parameters

Format

From the list, select either

  • 32 1-bit Channels — Indicates that the channel vector specifies the configuration of the block. Each output is a double with value of 0 or 1. The value is 0 when the hardware input voltage is low.

    With this mode, the block reads, modifies, then writes the data. This enables you to use multiple instances of this block, with each block addressing a different bit. However, for efficiency, use a single block for each 32-bit group. Use multiple block instances only if your application requires multiple accesses.

  • Single 32-bit Port — Indicates that the output from the block is a 32-bit integer where all 32 bits on the board feed into the single output. The least significant bit is the lowest numbered bit in the Contec user manual.

    If you choose this mode, use the bit packing and unpacking blocks (Digital I/O Bit-Packing and Digital I/O Bit-Unpacking) to construct the required data frames.

Group

From the list, select either

  • A (Bits 0-31) — Selects the 32-bit word from Group A to address.

  • B (Bits 32-63) — Selects the 32-bit word from Group B to address.

Channel vector

(32 1-bit Channels mode only) Enter a vector of numbers to specify the output channels. For example, to use the first and third digital output channels, enter

[1, 3]

This vector indexes into group A or B channels. For group A, channel vector [1, 3] specifies channels 0 and 2. For group B, channel vector [1, 3] specifies channels 32 and 34.

The channel numbers can occur in any order, but the numbers must be in the range 1 to 32.

Initial value vector

The initial value vector contains the initial voltage values for the output channels. Enter a scalar or a vector that is the same length as the channel vector. If you specify a scalar value, that value is the initial value for all channels. The channels are set to the initial values between the time the model is downloaded and the time it is started.

Final action vector

The final action vector controls the behavior of the channel at model termination. Enter a scalar or a vector that is the same length as the channel vector. If you specify a scalar value, that setting is used for all channels. If you specify a value of 1, the corresponding channel is reset to the value specified in the initial value vector. If you specify a value of -1, the block sets the channel to the value specified in the Final value vector value for that channel. If you specify a value of 0, the channel remains at the last value attained while the model was running.

Final value vector

The final value vector contains the final value for each output channel. Enter a scalar or a vector that is the same length as the channel vector. If you specify a scalar value, that setting is used for all channels. If the Final action vector is -1, the block sets the channel to this value on model termination.

Sample time

Enter the base sample time or a multiple of the base sample time.

PCI Slot (-1:autosearch)

If only one board of this type is in the target PC, enter

-1 

to automatically locate the board.

If two or more boards of this type are in the target PC, enter the bus number and the PCI slot number of the board associated with this driver block. Use the format [BusNumber, SlotNumber]. To determine the bus number and the PCI slot number, type

getxpcpci
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS