GET_RECTANGULAR_PULSE_INPUT (FB)

The function block 'GET_RECTANGULAR_PULSE_INPUT' reads the rectangular pulse input from connected AMK devices. ID32948, 'Message 4x32' must be configured accordingly.

The function block is called in the synchronous program level FPLC_PRG.

User interface

Input variables

Name

Type

Description

boEnable

BOOL

Enable signal: With a positive edge, the initialisation of the block starts.

As long as 'boEnable' = TRUE, the block remains enabled and is processed by the PLC.

In the state 'boEnable' = FALSE the block is no longer enabled and is thus no longer processed.

Output variables

Name

Type

Description

boEnabAck

BOOL

Acknowledgement: Function block is initialised and enabled

boErr

BOOL

The function block is in an error state

FALSE

No error (permitted commanding or warning)

TRUE

Error

iErrID

INT

Error identity number: Diagnostic number is output

iErrID = 0

No error

iErrID ≠ 0

boErr = TRUE

Error

iErrID ≠ 0

boErr = FALSE

Warning

enErrFbName

ENUM

EN_FB_NAME

Name of faulty block for which the diagnostic number is output.

The diagnostic number is explained in the description of the corresponding library.

Block Library

DI_TO_COUNT

AmkExMotionBase.lib

strFbInstance

STRING

Path of the function block

boRefPulse

BOOL

Homing pulse: Pulse at which the current counter value is entered in the reference counter
diOutVal

DINT

Current counter value of the pulse encoder [increments]

diOffset

DINT

Offset value [increments] of the counter value to the homing pulse

Input and output variables

Name

Type

Description

iReferenceCounter1_ID34074

INT

ID34074 'Homing Counter 1'

iCurrentCounter1_ID34075

INT

ID34075 'Actual Counter 1'

Usage note in the CoDeSys program

PLC_PRG (asynchronous part of the program) FPLC_PRG (synchronous part of the program)
  GET_RECTANGULAR_PULSE_INPUT