MATLAB: Unable to observe output from NI PCIe-6323 board in oscilloscope when using Real-Time Windows Target (SLDRT IN R2014a)

desktopdigitalfrequencynioutputpcie-6323pwmreal timesimulink

I am using Simulink Desktop Real Time to interact with a NI PCIe-6323 board. My aim is to generate PWM signals in Simulink and send it to the board in order to control a motor. I am currently generating the PWM signal in my Simulink model and sending it to the board using the Digital Output block (which is configured for the NI PCIe-6323 board). I have an oscilloscope connected to the board as well. When I run the model, I observe no output in the oscilloscope. 
However, when I comment out the Digital Output block and use an Analog Output block, I see some output in the oscilloscope. Why is the Digital Output block not working for me?
Also, I'm trying to connect to the PFI pins on the NI board.

Best Answer

For your current workflow, it is recommended to use the Frequency Output block, as this will output a hardware-generated, stable PWM up to the maximum hardware clock frequency of the board. This cannot be achieved by generating the PWM signal by software and using Digital Output.
To set up the block, please note that the Frequency Output block accepts frequency (in Hertz) and duty (in the range 0 to 1) as either parameters or inputs. In addition, please set the counter channel to PWM generator. 
As far as pin settings are concerned, please note that Simulink follows the standard NI pin assignment for counter I/O, as described in the NI documentation. The correct pins in this case would, therefore, be:
PWM channel 1 - CTR0OUT - PFI 12 - pin 2
PWM channel 2 - CTR1OUT - PFI 13 - pin 40
PWM channel 3 - CTR2OUT - PFI 14 - pin 1
PWM channel 4 - CTR3OUT - PFI 15 - pin 39