xPC Target | ![]() ![]() |
Defining I/O Block Parameters
The I/O block parameters define values for your physical I/O boards. For example, I/O block parameters include channel numbers for multichannel boards, input and output voltage ranges, and sample time.
This procedure uses the Simulink model xpc_osc.mdl
as an example, and assumes you have added an analog input and an analog output block to your model. To add an I/O block, see either Adding I/O Blocks with the xPC Target Library or Adding I/O Blocks with the Simulink Library Browser.
1
in the Number of Channels box, select ±10 V
for the input range, and select single-ended (16 channels)
for the MUX switch position. Enter the same sample time you entered for the step size in the Simulation Parameters dialog box. Enter the base address for this ISA-bus board.
±10 V
enter the code [-10] in the Range Vector box. Enter the same sample time you entered for the step size in the Simulation Parameters dialog box. Enter the base address for this ISA-bus board.
If you change the sample time by changing the target object property SampleTime
, the sample times you entered in both of the I/O blocks are set to the new value. The step size you entered in the Simulation Parameters dialog box remains unchanged.
Your next task is to build and run the target application. See xPC Target Application.
![]() | Adding I/O Blocks with the Simulink Library Browser | Polling Mode | ![]() |