Calling the Function Blocks

The pulse width modulation functionality of the DC541 is provided by the block DC541_PWM: DC541_PWM

Function blocks for the most module functions of DC541-CM are contained in the library DC541_AC500_V11.lib. The library is automatically included into the project and is described in detail in the library documentation DC541_Library: DC541 Library

The Function Block DC541_PWM outputs a pulsed signal with an adjustable on-off ratio. The on and off times are adjusted as 8 bit numbers.

The minimum switching time is specified at input CYCLE, i.e. if an output has been switched to FALSE or TRUE by the PWM, this output remains in this state for at least this time (CYCLE µs).

The minimum time specified at input CYCLE must not be smaller than the cycle time of the device DC541. Depending on its configuration, the cycle time of the DC541 can be 50, 100 or 200 µs. The cycle time can be polled using the Function Block DC541_GET_CFG: DC541_GET_CFG