Home
Digital Input Encoder Input

Digital Output

Writes to digital outputs of the Q8 data acquisition system.

Library

qctools

Description




The Digital Output Module for the Q8 series of I/O cards provides a mechanism for writing to a set of digital outputs from an installed Q8 I/O card. The block can handle scalar or vector inputs.

Parameters and Dialog Box




Board Number

The board number of the I/O card. If there is only one Q8 board in your system, then the board number should be zero. The second Q8 board in your system is board number 1, etc.

Channel(s) to Use

The channel numbers corresponding to each input. For example, if there are 3 inputs, then the entry [4,2,0] assigns input 1 to digital output 4, input 2 to digital output 2 and input 3 to digital output 0. The channel numbers may range from 0 to 31, since there are 32 digital I/O channels on the Q8 I/O boards. The same digital I/O channels are shared by the Digital Input block, so channel numbers cannot conflict. The selected channels are always updated simultaneously.

Initial Output(s)

Initial value for each output channel specified in the Channel(s) to Use parameter. If Channel(s) to Use is [3,2,0] as above, then an entry of [0,1,0] for the Initial Output(s) will set digital channels 3 and 0 to 0, and digital channel 2 to 1 when the simulation is initiated. A scalar value applies to all channels. Note that the hardware powers up with all digital I/O lines configured as inputs and pulled high. The Initial Output(s) values are only applied when the model is started.

Final Output(s)

Final value for each output channel specified in the Channel(s) to Use parameter. If Channel(s) to Use is [3,2,0] as above, then an entry of [0,1,0] for the Final Output(s) will set digital channels 3 and 0 to 0, and digital channel 2 to 1 when the simulation is terminated. A scalar value applies to all channels.

Sample Time

A sample time must be specified for all discrete blocks. A value of -1 causes the block to inherit its sample time from its input. A positive value specifies the sample time explicitly. Set the value to simget(bdoot,'FixedStep') to extract the sample time from the RTW Options dialog, under Solver/Fixed step size. A numeric value rather than 'auto' should be specified in this dialog field for this default to make sense.

Simulation Output

If the Simulation Output box is checked, then the block will have an output port. During normal simulation (as opposed to real-time execution), the output of the block will be a function of the input. If the input is 0, then the corresponding output will be 0V. If the input is 1 then the corresponding output will be 5V. This option makes no difference to the real-time code.

       
Digital Input Encoder Input