FUNCTION_BLOCK FB_Read_IuM_EL6631_0010
This function block reads I&M1, I&M2, I&M3 and I&M4 (Identification & Maintenance) data over EtherCAT as a string from a ProfiNET device. The reading of the I&M0 data takes place in the case of a ProfiNET device with EtherCAT via CoE (CAN over EtherCAT).
VAR_INPUT
VAR_INPUT
bRead : BOOL;
NETID : STRING; (* AMS NET ID EtherCAT Master *)
PORT : WORD; (* EtherCAT Slave address *)
iNumber : INT; (* "0"=EL6631-0010 or "1"=vitual EL6631-0010*)END_VAR
bRead: A rising edge on this input activates the function block and the I&M data is read from the ProfiNET device.
NETID: AMS Net ID of the controller
PORT: Port via which the controller communicates with the device (port = Device ID + 1000hex)
iNumber: Two ProfiNET devices can be mapped with one terminal. iNumber ("0" or "1") is used to select the device for which the I&M data is to be read out.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
iErrorID : DINT;
st_IM_TagFunction : STRING; (* I&M1 *)
st_IM_TagLocation : STRING; (* I&M1 *)
st_IM_Date : STRING; (* I&M2 *)
st_IM_Descriptor : STRING; (* I&M3 *)
st_IM_Signature : STRING; (* I&M4 *)
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received. While Busy = TRUE, no new command will be accepted at the inputs.
bError: In the event of an error during the command transfer, this output is set once the bBusy output has been reset.
iErrorID: Supplies an ADS error number when the output bError is set.
st_IM_TagFunction: label read out for the function of the device.
st_IM_Taglocation: label read out for the installation site of the device.
st_IM_Date: Supplies the date of installation of the device in the format.
st_IM_Descriptor: Returns the manufacturer description stored for the device.
st_IM_Signature: Returns the manufacturer signature stored for the device.
Development environment | Target platform | PLC libraries to be linked |
---|---|---|
TwinCAT v2.11.0 R3 | PC or CX (x86, ARM) | TcProfinetDiag.Lib |