SCIT_StopDataTransfer

SCIT_StopDataTransfer 1:

The "SCIT_StopDataTransfer" function block serves as an auxiliary block in order to carry out a Stop_Data_Transfer on the Interbus card that is addressed by the NETID and the PORT. Internally, an ADSRDWRT function block is called, which has the parameters described in the TwinCAT System Manager Help.

A Stop_Data_Transfer places the card into the ACTIVE state, but the outputs are not reset.

VAR_INPUT

VAR_INPUT
    NETID       : T_AmsNetId;
    PORT        : T_AmsPort;
    WRTRD       : BOOL;
    TMOUT       : TIME;
END_VAR

NETID: The AmsNetId of the computer into which the card is fitted can be given here. If the card is located within the same system, it is also possible to give an empty string.

PORT: This contains the ADS port number of the card. The number is assigned in the System Manager.

WRTRD: The function block is activated by a positive edge at this value.

TMOUT: This gives the timeout duration that is passed on to the internal ADSWRTRD block.

VAR_OUTPUT

VAR_OUTPUT
    BUSY        : BOOL;
    ERR         : BOOL;
    ERRID       : UDINT;
    RESULT      : WORD;
    ADDERRINFO  : WORD;
END_VAR

BUSY: After activation of the function block the busy signal remains asserted until an feedback is received.

ERR: If an ADS error occurs while the command is being transferred, the ERR output is set once the BUSY signal is cancelled.

ERRID: Supplies the ADS error number when ADS error is true.

RESULT: Returns the result from the card (provided that fault-free ADS transport has occurred (ERR = FALSE)). RESULT = 0 identifies successful execution of the command. A value other than 0 contains the error number from the Phoenix card.

ADDERRINFO: If feedback from the card is negative, this contains additional error information (cf. the Phoenix card error descriptions).

Requirements

Development environment

Target system type

IO-Hardware

PLC libraries to include

TwinCAT v2.7.0

PC (i386)

Phoenix: IBS SC/I-T; IBS SC/RI/RT-LK

Standard.Lib; PLCSystem.Lib; TcPLCAds.Lib; TcPlcIoFunctions.Lib

TwinCAT v2.8.0

PC (i386)

Phoenix: IBS SC/I-T; IBS SC/RI/RT-LK

TcIoFunctions.Lib

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