CD522PulseOut (FB)

FUNCTION_BLOCK CD522PulseOut EXTENDS AbbLConCA

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

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

Enable

BOOL

FALSE

A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.

AbbLConCA

Output

Busy

BOOL

FALSE

Operation is running (while output Error is FALSE)

AbbLConCA

Error

BOOL

FALSE

Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.

AbbLConCA

Input

ChnNum

WORD

0

0 or 1, use of output channel O0 or O1

EnFreq

BOOL

FALSE

Enable (TRUE) or disable (FALSE) the frequency output of the module. When input is set to FALSE before pulse output has finished, pulse output stops. When set to TRUE again pulse output begins anew.

Freq

WORD

0

Pulse frequency 0 to 15 kHz

Num

WORD

0

Number of pulses to be sent (1 to 65.535). 0 is for permanent output of pulses

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

RdyPulse

BOOL

FALSE

Set to TRUE when all pulses were sent

ActPulse

BYTE

0

Percentage of pulses (Num) sent, from 0 to 100%. Value 100 % is obtained, when all pulses were sent