Documentation

National Instruments PCI-6601 Digital Output

PCI-6601 Digital Output block

Library

Simulink® Real-Time™ Library for National Instruments®

Note

Only one output block can exist in a model for a particular board.

Block Parameters

Channel

Enter numbers between 1 and 8 to select the digital output ports. This driver allows the selection of individual digital output ports in arbitrary order. The number of elements defines the number of digital lines used.

For example, to use the last four ports as digital output channels, enter

[5,6,7,8]

Number the lines beginning with 1 even if this board manufacturer starts numbering the ports with 0.

    Note:   Treat the eight I/O ports as two groups of four ports. The two groups are ports 1 to 4 and ports 5 to 8. Do not specify both input and output channels in the same group of four ports. The driver will emit an error.

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, and the Channel parameter is longer, that value 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.

For example, if the block parameters are set as follows:

  • Channel[5 6 7 8]

  • Reset vector[1 1 0 0]

  • Initial value vector[ 1 0 1 0]

    Channels 5 and 6 will reset to the initial value vector. Channels 7 and 8 will hold at the last value attained while the model was running.

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 replicated over the channel vector. The channels are set to the initial values between the time the model is downloaded and the time it is started.

When execution stops, the driver writes the vector values to the output channels if the corresponding entry in the Reset vector is set to 1.

For example, if the block parameters are set as follows:

  • Channel [5 6 7 8]

  • Reset vector[1 1 0 0]

  • Initial value vector[ 1 0 1 0]

    When the real-time application is downloaded to the target, channel 5 is set to 1, channel 6 is set to 0, channel 7 is set to 1 and channel 8 is set to 0.

    After the real-time application executes, then stops, channel 5 will be set back to 1 and channel 6 will be set to 0. Channels 7 and 8 will hold the last values attained.

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?