CD522PwmOut (FB)

FUNCTION_BLOCK CD522PwmOut EXTENDS AbbLConCA

Function block to access all IO-Values for the PWM-Output of CD522. This FB is valid to be used with mode 2 in channel configuration

InOut:

Scope

Name

Type

Initial

Comment

Input

ChnNum

WORD

0

0 or 1, use output channel O0 or O1

EnPwm

BOOL

FALSE

Enable (TRUE) or disable (FALSE) the PWM output of the module

Freq

DWORD

0

Frequency of the PWM in Hertz from 0 to 100.000 Hz

DutyCycle

WORD

0

Duty cyle from 0 to 1000 (0 to 100.0%), percentage PWM signal is high

AdrIn

POINTER TO WORD

0

Address of process image input. See ../Structs/CD522In for more information about structure

AdrOut

POINTER TO WORD

0

Address of process image output. See ../Structs/CD522Out for more information about structure

Output

ErrorID

ERROR_ID

ERROR_ID.NO_ERROR

Error code description