<< mdaqPWMInit Data acquisition Utility functions >>

MicroDAQ Support Package for Matlab/Simulink >> MicroDAQ Support Package for Matlab/Simulink > Data acquisition > mdaqPWMWrite

mdaqPWMWrite

Writes PWM duty

Calling Sequence

mdaqPWMWrite(module, dutyChannelA, dutyChannelB)

Description

This function sets PWM waveform duty for A and B channels for selected PWM module. PWM module has to be initiated with mdaqPWMInit

Parameters

Examples

% setup PWM1 to 1khz period and initial duty for A and B channel to 0 
mdaqPWMInit(1, 1000, false, 0, 0);
% set PWM1 duty channel A to 25% ane channel B to 50%
mdaqPWMWrite(1, 25, 50);

See Also


Report an issue
<< mdaqPWMInit Data acquisition Utility functions >>