PLC-API VAR_IN_OUT VAR_IN_OUT stParams : ST_CTRL_PWM_OUT_EXT_PARAMS; END_VAR stParams : Parameter structure of the PWM element. This consists of the following elements: TYPE ST_CTRL_MULTIPLE_PWM_OUT_PARAMS : STRUCT tTaskCycleTime : TIME; (* PLC/PWM cycle time in seconds *) tPWMPeriod : TIME; (* controller cycle time in seconds *) nNumberOfPwmOutputs : USINT; pPwmInputArray_ADR : POINTER TO FLOAT := 0; nPwmInputArray_SIZEOF : UINT; pPwmTimesConfig_ADR : POINTER TO ST_CTRL_MULTIPLE_PWM_OUT_TIMES; nPwmTimesConfig_SIZEOF : UINT; pPwmOutputArray_ADR : POINTER TO ST_CTRL_MULTIPLE_PWM_OUT_OUTPUTS; nPwmOutputArray_SIZEOF : UINT; pPwmData_ADR :
POINTER TO ST_CTRL_MULTIPLE_PWM_OUT_DATA; nPwmData_SIZEOF : UINT; END_STRUCT END_TYPE tTaskCycleTime : Cycle time with which the function block is called. If the function block is called in every cycle this corresponds to the task cycle time of the calling task. tPWMPeriod : Period of the PWM signal. nNumberOfPwmOutputs : Number of PWM outputs. [1...n] pPwmInputArray_ADR : Address of the PWM input array. nPwmInputArray_SIZEOF : Size of the PWM input array in bytes. pPwmTimesConfig_ADR : Address of the PWM times array. nPwmTimesConfig_SIZEOF : Size of the PWM times array in bytes. pPwmData_ADR : Address of the internal PWM data array. pPwmData_SIZEOF :
Size of the internal PWM data array in bytes. TYPE ST_CTRL_MULTIPLE_PWM_OUT_TIMES : STRUCT tMinOnTime : TIME; (* min. switch on time *) tMinOffTime : TIME; (* min. switch off time *) tMinWaitTime : TIME; (* min. waiting time when switching from pos to neg or vv*) END_STRUCT END_TYPE tMinOnTime : Minimum switch-on time of the PWM output. tMinOffTime : Minimum switch-off time of the PWM output. tMinWaitTime : Waiting time between switching between a positive and negative output signal. TYPE ST_CTRL_MULTIPLE_PWM_OUT_OUTPUTS : STRUCT bPwmOutBitPos : BOOL; bPwmOutBitNeg : BOOL; bWaitTimeActive : BOOL; END_STRUCT END_TYPE bPwmOutBitPos : PWM signal if fPwmInput > 0.0. bPwmOutBitNeg :
PWM signal if fPwmInput TS4100 125 Version: 1.1