Milad,
At this time the most straightforward solution is to use a PWM block from one of the target support libraries. For example the “PWM (Variable)” block from the TI C2000 Target Support Library or the “PWM Out (Variable)” block from the RT Box Target Support Library. Place the PWM modulator in a subsystem and you will note the subsystem now contains an additional signal outport where you can access the switching signals.
Regards,
Bryan