FB_PN_IM1_WRITE
Using this function block the PROFINET controller writes all I&M1 data (Identification & Maintenance) data to a device referenced via the Port input.
The frame structure of the I&M1 function corresponds to the index 0xAFF1 according to PROFINET standard.
VAR_INPUT
VAR_INPUT
bStart : BOOL; NETID : T_AmsNetId;(* AMS Net ID from Controller *)
PORT : T_AmsPort; (* Port used by Controller to communicate with Device *)
st_IM_TagFunction : STRING(32); st_IM_TagLocation : STRING(22);
END_VAR
bStart : The block is activated by a rising edge on this input
NETID : AMS Net ID of the controller
PORT : Port via which the controller communicates with the device (port = Device ID + 1000hex)
st_IM_TagFunction : With this string the functional description is saved to the device.
st_IM_TagLocation : With this string the installation site is saved to the device.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
iErrorID : UDINT;
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 : If an error should occur during the transmission of the command, this output is set after the bBusy output has been reset.
iErrorID: Supplies an ADS error number when the output bError is set..
Requirements
Development environment | Target platform | PLC libraries to be linked |
---|---|---|
TwinCAT v2.11.0 R3 | PC or CX (x86, ARM) | TcProfinetDiag.Lib |