IOL_AdjustableSwitchingSensor (FB)

FUNCTION_BLOCK IOL_AdjustableSwitchingSensor

Function Block for Adjustable Switching Sensors
The function block provides access to the profile specific parameters and the procedures for the three teach-in modes.
• Read switching signal channel parameter
• Write switching signal channel parameter
• Single value teach-in
• Two value teach-in
• Dynamic teach-in
InOut:

Scope

Name

Type

Comment

Input

xExecute

BOOL

A trigger causes the function selected with variable Function to be executed

usiCom

USINT

Index of master 1: first ETC master

uiDevice

UINT

The physical slave address to access the EtherCAT slave

Port

BYTE

Port number, 0 for the first port

BackupEnable

BOOL

“true” = Data Storage enabled; “false” = disabled

Func

IOL_AdSS_Function

This variable selects the functionality to be triggered by a Request
(INT) 0 = no_func; 1 = rd_all; 2 = wr_conf; 3= wr_param; 4 = teach

LogicIn

BOOL

This variable defines the value for a new Switchpoint to be written to the sensor on a Request with Function ‘wr_conf’

SetpointIn

INT

This variable defines the value for a new Setpoint to be written to the sensor on a Request with Function ‘wr_param’

TeachMode

IOL_AdSS_TeachMode

This variable defines one of the possible teach procedures:
(INT) 0 = no_teach; 1 = single_value; 2 = two_value; 3 = dynamic

TeachTimer

TIME

Defines the duration of the dynamic teach time

ApplyAuto

BOOL

‘true’ = autoapply_enabled; ‘false’ = autoapply_disabled

TeachRequest

BOOL

A rising edge triggers one step of teach process to be executed according to the selected function at variable TeachFunction.

TeachFunction

IOL_AdSS_TeachFunction

The value applied to this variable defines the teach functionality to be executed on TeachRequest. (INT) 0 = no teach; 1 = teach 1; 2 = teach 2; 3 = appply; 4 = abort

Output

xDone

BOOL

The signal is set, if the FB has completed a requested operation.

xBusy

BOOL

The signal is set, if the FB is executing a requested operation.

xError

BOOL

The signal is set, if an error occurred during execution of a requested operation.

IOL_Status

DWORD

Status Information of IOL_Device

Status

IOL_AdSS_Status

(WORD) Current status of the FB operation and executed functions.

LogicOut

BOOL

Represents the current value of the parameter Logic from the sensor.

SetpointOut

INT

represents the current value of the parameter Setpoint from the sensor.

PermitTeach1

BOOL

The signal is set, if a teach request for teach function ‘teach_1’ is allowed

PermitTeach2

BOOL

The signal is set, if a teach request for teach function ‘teach_2’ is allowed

PermitApply

BOOL

The signal is set, if a teach request for teach function ‘apply’ is allowed

PermitAbort

BOOL

The signal is set, if a teach request for teach function ‘abort’ is allowed