If Channel number was used for PWM, and then I want to do +12V. That won't work.
I've tried
M2IO.Setpin_12VIO(1, OFF, SOURCE, PWM_OFF, PWM_Freq, PWM_Duty);
delay(500);
M2IO.Setpin_12VIO(1, ON);
But the last one just turns on the PWM again.
One thing that I found out by trial and error is that if you do this to set a PWM:
PWM is set M2IO.Setpin_12VIO(1, ON, SOURCE, PWM_PIN, PWM_Freq, PWM_Duty);
And then this when you want +12V:
M2IO.Setpin_12VIO(1,OFF);
M2IO.Setpin_12VIO(1, OFF, SOURCE, PWM_OFF, PWM_Freq, PWM_Duty);
M2IO.Init_12VIO();
M2IO.Setpin_12VIO(1, ON);
It works, BUT all other channel setting will be erased. (If you're running a PWM on another channel)
If Channel number was used for PWM, and then I want to do +12V. That won't work.
I've tried
M2IO.Setpin_12VIO(1, OFF, SOURCE, PWM_OFF, PWM_Freq, PWM_Duty);
delay(500);
M2IO.Setpin_12VIO(1, ON);
But the last one just turns on the PWM again.
One thing that I found out by trial and error is that if you do this to set a PWM:
PWM is set M2IO.Setpin_12VIO(1, ON, SOURCE, PWM_PIN, PWM_Freq, PWM_Duty);
And then this when you want +12V:
M2IO.Setpin_12VIO(1,OFF);
M2IO.Setpin_12VIO(1, OFF, SOURCE, PWM_OFF, PWM_Freq, PWM_Duty);
M2IO.Init_12VIO();
M2IO.Setpin_12VIO(1, ON);
It works, BUT all other channel setting will be erased. (If you're running a PWM on another channel)