PLC API fManSyncValue : FLOAT; bSync : BOOL; eMode : E_CTRL_MODE; END_VAR Outputs VAR_OUTPUT bOut : BOOL; fPWMDutyCycle : FLOAT; eState : E_CTRL_STATE; eErrorId : E_CTRL_ERRORCODES; bError : BOOL; END_VAR Inputs/ outputs VAR_IN_OUT stParams : ST_CTRL_2POINT_PWM_ADAPTIVE_PARAMS; END_VAR stParams consists of the following elements: TYPE ST_CTRL_2POINT_PWM_ADAPTIVE_PARAMS: STRUCT tCtrlCycleTime : TIME := T#0ms; tTaskCycleTime : TIME := T#0ms; tPWMPeriod : TIME; fOkRange : FLOAT; fForceRange : FLOAT; fStepSize : FLOAT; fMinLimit : FLOAT; fMaxLimit : FLOAT; tWaitTime : TIME; END_STRUCT END_TYPE TF4100 44 Version:
2.2.4 Name Type Description fSetpointValue FLOAT Setpoint of the controlled variable fActualValue FLOAT Actual value of the controlled variable fManSync Value FLOAT Input to which the controller's mark-to-space ratio can be set, or with which the output can be set in Manual Mode. The output is set in Manual Mode if "fManSyncValue > 0.0". bSync BOOL A rising edge at this input will set the mark-to-space ratio of the internal PWM function block to the value "fManSyncValue". eMode E CTRL MODE _ _ Input that specifies the operation mode [} 173] of the function block.
Name Type Description bOut BOOL Controller output fPWMDutyCycle FLOAT Current mark-to-space ratio of the internal PWM function block eState E CTRL STATE _ _ State of the function block eErrorId E CTRL ERROR _ _ CODES Supplies the error number [} 173] when the output bError is set. bError BOOL Becomes TRUE, as soon as an error occurs. Name Type Description stParams ST CTRL 2POIN _ _ T PWM _ _ ADAPTIVE _ PARAMS Parameter structure of the 2-point element