Output single sample to multiple digital lines of data acquisition device
Data Acquisition Toolbox™
Some devices are not supported by the Simulink® blocks in Data Acquisition Toolbox. To see if your device supports Simulink, refer to Supported Hardware.
The Digital Output (Single Sample) block synchronously outputs the latest set of data to the hardware at each simulation time step. It outputs unbuffered digital data. Specify the output data as a vector of boolean values.
The block has no output ports. It can have one or more input ports, depending on the option you choose in its dialog box. The data type of the signal at the input port must be a logical data type.
The Digital Output (Single Sample) block inherits the sample time from the driving block connected to the input port. Digital output is done synchronously, according to the following diagram.
At the first time step (T1), data is output to the selected hardware lines. The simulation does not continue until data is output to all lines.
To use this block, you need both Data Acquisition Toolbox and Simulink software.
This block supports the use of Simulink Accelerator™ mode, but not Rapid Accelerator or code generation.
The block supports the use of model referencing, so that your model can include other Simulink models as modular components.
For more information on these features, see the Simulink documentation.
Use the Block Parameters dialog box to set configuration options.
The device to which you want to output data. The items in the list vary, depending on which devices you have connected to your system. Devices in the list are specified by adaptor/vendor name and unique device ID, followed by the name of the device. The first available device is selected by default.
The line configuration table lists your device lines and lets you configure them. The table lists all the lines that can be configured for input.
Line ID — ID of the hardware line
port0/line0). This is automatically
detected and filled in by the selected device, and is read-only.
Name — Hardware line name. This is automatically detected and filled in from the hardware, but you can edit the name.
Module — Device ID that the channel belongs to. The Module column is read-only. If a CompactDAQ chassis is selected, it shows the ID of the CompactDAQ module which the channel belongs to; otherwise it shows the ID of the device.
1 for all lines (default) — The block has only one input port for all of the lines that are selected in the table. Data must be a vector of boolean values, whose size is the number of lines.
1 per line — The block has one input
port per selected line. The name of each input port is the name specified
in the table for each line. If no name is provided, the name is the
Line ID. For example, if line 2 of hardware port 3 is selected, and
you did not specify a name in the line table,
in the block. Data for each line must be a 1-by-1 boolean.
Specifies the sample time of the block during the simulation. This is the rate at which the block is executed during simulation. The default value is 1. For more information, see What Is Sample Time? (Simulink).