FB_PN_SEND_ALARM

The function block FB_PN_SEND_ALARM sends an alarm to the controller.
Inputs
VAR_INPUT
bStart : BOOL;
NETID : T_AmsNetId;
PORT : T_AmsPort;
PN_ALARM_Typ : E_PN_ALARM_TYP;
PN_slotNumber : WORD;
PN_SubSlotNumber : WORD;
END_VAR
Name | Type | Description |
---|---|---|
bStart | BOOL | The function block is enabled by a positive edge at this input. |
NETID | T_AmsNetId | AMS Net ID of the controller |
PORT | T_AmsPort | Port via which the controller communicates with the device (port = Device ID + 1000hex). |
PN_ALARM_Typ | Contains predefined alarm types | |
PN_SlotNumber | WORD | Slot number |
PN_SubSlotNumber | WORD | SubSlot number |
Outputs
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
iErrorID : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
bBusy | BOOL | When the function block is enabled, this output is set and remains set until a feedback is received. While Busy = TRUE, no new command will be accepted at the inputs. |
bError | BOOL | If an error occurs during the transmission of the command, this output is set after the bBusy output is reset. |
iErrorID | UDINT | Returns an ADS error number if bError output is set. |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.4018 | PC or CX (x64, x86, ARM) | Tc2_ProfinetDiag |