FB_ASI_Addressing

FB_ASI_Addressing 1:

VAR_IN_OUT

VAR_IN_OUT
    stParameterBuffer:      ST_ParameterBuffer;
END_VAR

stParameterBuffer: Data buffer for background communication

VAR_INPUT

VAR_INPUT
    iOldAddress     : BYTE;      (*old address*)
    iNewAddress     : BYTE;      (*new address*)
    bStart          : BOOL;      (*START*)
END_VAR

iOldAddress: old address of the slave to be addressed (new slaves have address 0)

iNewAddress: new address of the slave to be addressed

bStart : Addressing is carried out via a rising edge of this boolean input

VAR_OUTPUT

VAR_OUTPUT
    bBusy               : BOOL;
    bErr                : BOOL;
    iErrornumber        : DWORD; (*errorcode of ASI-Master*)
END_VAR

bBUSY: This output remains TRUE until the block has executed a command. While Busy = TRUE, no new command will be accepted at the inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.

bErr: This output shows the error status

iErrornumber: Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of an instruction at the inputs.

Requirements

Development environment

Target system type

IO Hardware

PLC libraries to include

TwinCAT Version >= 2.8.0 Build > 739

PC (i386)

ASI master terminal

TcIoFunctions.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib are included automatically )