Real-Time Windows Target    

Analog Output Block

The Real-Time Windows Target I/O blocks allow you to select and connect specific analog channels to your Simulink model.

After you add an Analog Output block to your Simulink model, you can enter the parameters for this I/O driver. This procedure uses Humusoft's AD512 I/O board as an example:

  1. Double-click the Analog Output block.
  1. The Block Parameters: Analog Output dialog box opens.

  1. In the Sample time box, enter the same value you entered in the Fixed step size box from the Simulation Parameters dialog box. For example, enter
  2. In the Output channels box, enter a channel vector that selects the analog input channels you are using on this board. The vector can be any valid MATLAB vector form. For example, to select both analog output channels on the AD512 board, enter
  3. From the Output range list, choose the input range for all of the analog input channels you entered in the Input channels box. For example, with the AD512 board, choose -5 to 5 V.
  1. Note If you want the input range to be different for different analog channels, you need to add a I/O block for each different input range.

  1. From the Block input signal list, choose from the following options:
  2. Enter the initial value for each analog output channels you entered in the Output channels box. For example, if you entered [1,2] in the Output channels box, and you want an initial value of 0 volts, enter [0,0].
  3. Enter a final value for each analog channel you entered in the Output channels box. For example, if you entered [1,2] in the Output channels box, and you want final values of 0 volts, enter [0,0].
  1. If you chose Volts, your dialog box will look similar to the figure shown below.

  1. Do one of the following:

  Analog Input Block Digital Input Block