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 xpcosc.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 orAdding I/O Blocks with the Simulink Library Browser.
1
in the Number of Channels box, choose ±10 V for the
input range, and choose 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 step size you entered in the Simulation Parameters dialog box, as well as the sample times you entered in both of the I/O blocks are set to the new value.
Your next task is to build and run the target application, see Creating the Target Application.
![]() | Adding I/O Blocks with the Simulink Library Browser | xPC Target Scope Blocks | ![]() |