BL4S200 User’s Manual
100
setFreq_H
int setFreq_H(int channel, float frequency);
FUNCTION DESCRIPTION
Sets the frequency of all the PWM or PPM outputs on the same block as the channel.
Will preserve the duty cycle and offset percentages for all of the channels on the same
block.
This function call is for the high-current output channels only.
Repeated calls to this function by itself may cause the duty cycle and offset values to
drift. If this drift is of concern, call
setOffset_H()
and
setDuty_H()
to reset the
duty cycle and offset to the desired value.
PARAMETERS
channel
all channels on the same RIO chip and block as this channel (0–7,
HOUT0–HOUT7) will have their frequency set. Duty cycle and
offset percentages will be maintained.
frequency
frequency of the PWM and PPM outputs
(should be from 2 Hz to 50 kHz)
RETURN VALUE
0 — success.
-EINVAL
— invalid parameter value.
SEE ALSO
brdInit, setPWM_H, setPPM_H, setOffset_H, setDuty_H, setToggle_H, setSync_H
electronic components distributor