FB_ASI_SlaveDiag
VAR_IN_OUT
VAR_IN_OUT
stParameterBuffer: ST_ParameterBuffer;
END_VAR
stParameterBuffer: Data buffer for background communication
VAR_INPUT
VAR_INPUT
iSlaveaddress :BYTE;
iCounter :INT; (*1:PhysicalFaultCounter, 2:TimeoutCounter, 3:ResponseCounter, 4:Leave-DataExchCounter, 5:DataExch-FailedCounter *)
bCounterReset :BOOL;
bReadLES :BOOL; (*Read List of all detected Slaves*)
bReadLAS :BOOL; (*Read List of all activated Slaves*)
bCycleMode :BOOL; (*0: Cyclic (permanent Read/Write), 1: Acyclic *)
bStart :BOOL;
END_VAR
iSlaveaddress: slave address
iCounter: 1:PhysicalFaultCounter, 2:TimeoutCounter, 3:ResponseCounter, 4:Leave-DataExchCounter, 5:DataExch-FailedCounter
bCounterReset: resetting of the current counter
bReadLES: list of recognised ASI slaves (LES)
bReadWrite: 0=READ, 1=WRITE
bReadLAS: list of activated ASI slaves (LAS)
bStart: The respective task is carried out via a rising edge at this boolean input
bCycleMode: 0=continuous reading 1= reading once
VAR_OUTPUT
VAR_OUTPUT
bBusy :BOOL;
bErr :BOOL;
iErrornumber :DWORD; (*errorcode of ASI-Master*)
iCounterValue :WORD; (*Counter of a slave*)
iSlaveList :DWORD; (*LES or LAS of all Slaves*)
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.
iCountervalue: counter reading
iSlaveList: LES or LAS
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 ) |