The duty cycle is set up with the rest of the PWM parameters after connecting to the controller and before starting the PWM signal.
string aqs = PwmController.GetDeviceSelector("PWM");
:
:
:
myPWMcontroller.SetDesiredFrequency(30.0);
PwmPin myPWM = myPWMcontroller.OpenPin(0);
myPWM.SetActiveDutyCyclePercentage(0.4);
myPWM.Start();
Is there a reason to have it set earlier?