The two digital and 8 PFI I/O checkboxes allow you to choose if that particular digital pin should be input (when unchecked) or output (when checked). This does not apply to Analog Input and Analog Output which cannot change signal direction, therefore there are no checkboxes for them.
There's no need to map analog I/O (or other I/O) in any way. Hardware pins are hardwired to hardware channels and these are hardwired to Real Time Windows channel numbers. The only pitfall can be that while hardware channels are numbered from 0, RTWin channels are numbered from 1.
For example:
pin 1 = hardware channel AI0 = RTWin channel 1
pin 21 = hardware channel AI1 = RTWin channel 2
pin 22 = hardware channel AI2 = RTWin channel 3
A pin diagram for the NI PCI-6221 hardware can be found at the following link:
<http://sine.ni.com/ds/app/doc/p/id/ds-15/lang/en>
Important points in note while using an Analog I/O blocks in your models if you see an unexpected output from this block on a Simulink scope:
1. A first probable reason can be due to a cross-talk caused by unconnected analog input pins or something like that.
2. Ensure that the ground is connected correctly.
3. Does the single-ended/differential setting match your wiring (i.e. in the model check what the board options are set to: single-ended/differential) ?
4. What happens if the AI 0 pin is short-circuited to ground - does the Scope show zero in this case ?
5. Does Analog Output work correctly? Are the analog output voltages seen on the right pins? This is used to double check that the connector pin numbers are not swapped and correctly understood.
Best Answer