FB_MTP_BinDrv

FB_MTP_BinDrv 1:

The function block FB_MTP_BinDrv is an object for controlling a binary drive from different sources: internal PLC logic or manual operation (e.g. via OPC UA). Switching requests are managed via the state machine of Operation Mode. The OPC UA access rights are described in the variable tables.

Controlling the drive

The direction of rotation of the drive is specified via the switching requests Fwd*, Rev*, and Stop*. The state machine of the Operation Mode manages whether and from which source new switching requests are processed.

If both requests are made simultaneously, the safety position is taken into account: Stop* has the highest priority over SafePos = FALSE, and the drive is stopped. If SafePos = TRUE, the switching requests Fwd*, Rev*, and Stop* are prioritized equally and the drive remains in its current state in the event of simultaneous requests.

When Locking is active, it is no longer possible to control the drive, depending on the type of interlock.

The variable Trip indicates the current state of the motor protection. If Trip = FALSE is true, this means that the motor protection has been triggered and the drive is stopped immediately by setting the variables FwdCtrl and RevCtrl to FALSE.

If Trip = TRUE is true, the motor protection is in a fault-free state. Once the motor protection has been restored after triggering (Trip = TRUE), the state must be acknowledged via Reset before operation can resume.

Safety position

The safety position is defined via the variables SafePos, SafePosDirEn, and SafePosDir.

The variable SafePos is used to specify whether the safety position of the drive is the de-energized state or an active state.

FB_MTP_BinDrv 2:

The variables SafePosDirEn and SafePosDir are not part of the MTP guideline. They have also been implemented and can be used to define a safety position in the active state. These variables are not listed in the MTP file and are not made available via OPC UA.

Safety position: de-energized state

In the de-energized state, the safety position of the drive is: FwdCtrl = FALSE and RevCtrl = FALSE.

Safety position: active state

For the active state, the default direction of rotation can be enabled (SafePosDirEn = TRUE) and the direction of rotation can be specified (SafePosDir).

If the specification of the direction of rotation is disabled SafePosDirEn = FALSE, the current movement state (forward, reverse, or stop) is the safety position.

If the default setting is enabled, the safety position SafePosDirEn = TRUE is forward (SafePosDir = FALSE) or reverse (SafePosDir = TRUE).

General definitions

Name of the object

Object description

WQC

OSLevel

Feedback

Locking

Reset

Implemented interfaces

I_MTP_BinDrv

FB_MTP_BinDrv 3: Inputs

Name

Type

Description

OPC UA access

TagName

STRING

Name of the interface

-

TagDescription

STRING

Description of the interface

-

WQC

BYTE

Worst Quality Code

Read

OSLevel

BYTE

Level must be defined for system. Value 0 is reserved for local operation.

Read/write

StateChannel

StateOffAut

StateOpAut

StateAutAut

 

See Operation Mode

 

FwdEn

BOOL

Enable forward movement:

1: Enabled

0: Disabled

Read

RevEn

BOOL

Enable reverse movement:

1: Enabled

0: Disabled

Read

StopAut

BOOL

Automatic switching request to set the drive to stop:

(Relevant if StateAutAct)

1: Execute stop.

0: No stop

Read

FwdAut

BOOL

Automatic switching request to set the drive in forward motion:

(Relevant if StateAutAct & FwdEn)

1: Execute forward movement.

0: Do not execute any forward movement.

Read

RevAut

BOOL

Automatic switching request to set the drive in forward motion:

(Relevant if StateAutAct & RevEn)

1: Execute reverse movement.

0: Do not execute any reverse movement.

Read

FwdFbk

BOOL

Feedback signal for forward movement:

1: Forward movement

0: No forward movement

Read

FwdFbkCaIc

BOOL

Source of the forward movement feedback signal:

1: Calculated

0: Sensor

Read

RevFbk

BOOL

Feedback signal for reverse movement:

1: Reverse movement

0: No reverse movement

Read

RevFbkCaIc

BOOL

Source of the feedback signal for reverse motion:

1: Calculated

0: Sensor

Read

PermEn

Permit

IntlEn

Interlock

ProtEn

Protect

 

See Locking

 

Trip

BOOL

Signaling contact for motor protection:

1: No error

0: Motor protection tripped.

Read

SafePos

BOOL

1: Retain current state.

0: Stop

Read

SafePosDirEn

BOOL

1: Direction of rotation specification for SafePos = TRUE
via variable SafePosDir

0: No direction of rotation specified

-

SafePosDir

BOOL

Direction of rotation specification for SafePos = TRUE and SafePosDirRpmEn = TRUE

1: Reverse

0: Forward

-

ResetAut

BOOL

Automatic reset switching request:

1: Reset requested.

0: No reset requested.

Read

FB_MTP_BinDrv 4: Outputs

Name

Type

Description

OPC UA access

FwdCtrl

BOOL

Forward movement:

1: Active

0: Inactive

Read

RevCtrl

BOOL

Reverse movement:

1: Active

0: Inactive

Read

SafePosAct

BOOL

Safety position enabled:

1: Safety position is active.

0: Safety position is not active.

Read

External variables

Name

Type

Description

OPC UA access

StopOp

BOOL

Operator switching request to set the drive to stop:

(Relevant if StateOpAct)

1: Execute stop.

0: Do not execute a stop.

Read/write

FwdOp

BOOL

Operator switching request to set the drive in forward motion:

(Relevant if StateOpAct & FwdEn)

1: Execute forward movement.

0: Do not execute any forward movement.

Read/write

RevOp

BOOL

Operator switching request to set the drive in forward motion:

(Relevant if StateOpAct & RevEn)

1: Execute reverse movement.

0: Do not execute any reverse movement.

Read/write

ResetOp

BOOL

Operator reset switching request:

0→1: Operator request

1→0: Request has been processed.

Read/write

FB_MTP_BinDrv 5: Methods

Name

Type

Description

IsOffline

IsOperator

IsAutomatic

SetOffline

SetOperator

SetAutomatic

 

See Operation Mode

Forward

BOOL

The Forward method allows the drive to start moving forward. In this process, the OperationMode is transformed into the state SetAutomatic using the method Automatic. The Aut switching requests are set to defined values, and the internal logic is invoked. Finally, the *Aut switching requests are reset to FAlSE.

Returns TRUE if FwdFbk = TRUE and RevFbk = FALSE.

Reverse

BOOL

The Reverse method allows the drive to start moving in reverse. In this process, the OperationMode is transformed into the state SetAutomatic using the method Automatic. The Aut switching requests are set to defined values, and the internal logic is invoked. Finally, the *Aut switching requests are reset to FALSE.

Returns TRUE if FwdFbk = FALSE and RevFbk = TRUE.

Stop

BOOL

The Stop method allows you to stop the drive. In this process, the OperationMode is transformed into the state SetAutomatic using the method Automatic. The *Aut switching requests are set to defined values, and the internal logic is invoked. Finally, the *Aut switching requests are reset to False.

Returns TRUE if FwdFbk = FALSE and RevFbk = FALSE.