Documentation

National Instruments PCI-6251 PFI Digital Output

PFI Digital Output block for PCI-6251, PCIe-6251, PXI-6251, and PXIe-6251 boards

Library

Simulink® Real-Time™ Library for National Instruments®

Description

A model can have more than one PFI digital input block for a given physical board. If a model has more than one digital input block, it executes the blocks in the order that the Simulink software has determined.

The two counters and the PFI digital input and output blocks share the 16 PFI digital I/O lines. Follow these rules when using these blocks:

  • Do not use a PFI bit as a digital output when the PDF digital input block is using the bit.

  • Do not use a PFI bit as a digital output when the incremental encoder is using the bit.

  • Do not use a PFI bit for digital output when the PWM generate block is using the bit.

Scaling of Output to Input

I/O Module Output

Block Input Data Type

Scaling

TTL

Double

< 0.5 = TTL low
≥ 0.5 = TTL high

Block Parameters

PFI bit vector (0-15)

This block uses 0 based numbering to reflect the names of the bits described in the National Instruments M Series user manual.

Enter a vector that contains the bits you want to control. For example, to write bits PFI 1, PFI 3, and PFI 9, enter

[1, 3, 9]

Reset vector

The reset 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 replicated over the channel vector. 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 0, the channel remains at the last value attained while the model was running.

Initial value vector

The initial value vector contains the initial values (0 or 1) of the block outputs. Enter a scalar or a vector of values, one for each output. If you enter a scalar, the driver replicates that value over the output vector.

The block applies this value as follows:

  • The model uses this value when you first download the model to the target computer.

  • If you set Reset vector to 1, the block output is reset to this value when model execution stops. If the value is greater than 0.5, the block sets output to HIGH. If the value is less than or equal to 0.5, the block sets the output to LOW.

Sample time

Enter the base sample time or a multiple of the base sample time (-1 means sample time is inherited).

PCI slot (-1:autosearch)

If only one board of this type is in the target computer, enter -1 to locate the board.

If two or more boards of this type are in the target computer, 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:

tg = slrt;
getPCIInfo(tg, 'installed')

External Websites

Was this topic helpful?