Command SETUP(PWM)
 
Description Setup the protocol for the Pulse width modulation
 
Syntax/Parameters setup(pwm){...}
 
Options    active=123;                           //to enable the required combination of PWM's use 1,2,3 and N=none eg 1, 12, 13, 23, 3
   OR  
   active1=Y/N;   active2=Y/N;  active3=Y/N;

   pol1=H;                                //polarity = High or Low on first phase of PWM1
   pol2=H;                                //polarity = High or Low on first phase of PWM2
   pol3=H;
   cycle1=“200”;                        //cycle time in microseconds of PWM1. Range 160Hz to 1MHz
   cycle2 = “300”;                      //cycle time in microseconds of PWM2. Range 160Hz to 1MHz
   cycle3 = “300”;                      //cycle time in microseconds of PWM3. Range 160Hz to 1MHz
  
duty1= “44”;                         //value of first phase as a  percentage for PWM1 = 1-99
  
duty2= “56”;                         //value of first phase as a  percentage for PWM2 = 1-99
   duty3= “56”;                         //value of first phase as a  percentage for PWM3 = 1-99
   delay= “50”;                         //delay between first phase of PWM1 and first phase of PWM2 in microseconds

PWM parameters cycle1, duty1, cycle2, duty2, cycle2, duty3 now accept float parameters giving greater PWM resolution. - v49.37
 
Example setup(pwm)
{
active=123;                           //to enable the required combination of PWM's use 1,2,3 and N=none eg 1, 12, 13, 23, 3
pol1=H;                                //polarity = High or Low on first phase of PWM1
pol2=H;                                //polarity = High or Low on first phase of PWM2
pol3=H;
cycle1=“200”;                        //cycle time in microseconds of PWM1. Range 160Hz to 1MHz
cycle2 = “300”;                      //cycle time in microseconds of PWM2. Range 160Hz to 1MHz
cycle3 = “300”;                      //cycle time in microseconds of PWM3. Range 160Hz to 1MHz
duty1= “44”;                         //value of first phase as a  percentage for PWM1 = 1-99
duty2= “56”;                         //value of first phase as a  percentage for PWM2 = 1-99
duty3= “56”;                         //value of first phase as a  percentage for PWM3 = 1-99
delay= “50”;                         //delay between first phase of PWM1 and first phase of PWM2 in microseconds
}