beckhoff TF6281 — 6.1.2 FB_SET_ATTRIBUTE_SINGLE

PLC API | Function blocks 6.1.2 FB_SET_ATTRIBUTE_SINGLE | FB_SET_ATTRIBUTE_SINGLE The function block FB_SET_ATTRIBUTE_SINGLE enables writing of parameters in an EtherNet/IP device. Service Code: 0x10 VAR_INPUT sNetId : T_AmsNetID; sIPv4Addr : T_IPv4Addr; bExecute : BOOL; nClass : WORD; nInstance : WORD; nAttribute : WORD; pSrc : POINTER TO BYTE; nSrcDataLen : WORD; nSessionTimeoutMSec : DWORD; nCmdTimeoutMSec : DWORD; bRackComm : BOOL; nPort : BYTE; nSlot : BYTE; END_VAR Inputs TF6281 53 Version: 1.9.0 Name Type Description sNetId T AmsNetID _ AMSNetId of the TwinCAT EtherNet/IP™ scanner via which the command is to run sIPv4Addr T IPv4Addr _ IP address of the target device.

bExecute BOOL A positive edge starts the command. nClass WORD Class number of the CIP service nInstance WORD Instance number of the CIP service nAttribute WORD Attribute number of CIP service pSrc POINTER TO BYTE Pointer to the variable that contains the value for sending the service (get the pointer with ADR) nSrcDataLen WORD Size of the variable to which the pointer pSrc points (get with SizeOf) nSessionTimeoutMS ec DWORD Timeout for the session; the default is 30 seconds nCmdTimeoutMSec DWORD Timeout for the command; the default is 7.5 seconds bRackComm BOOL TRUE if the CPU is modular, i.e.

a CPU with a rack design, for example a CompactLogix nPort BYTE Port number of the CPU (the TF6281 currently only supports port 1) nSlot BYTE Slot number if the CPU is not plugged into slot 0