
10.2 Communication with the safety system
10 System Connections
Pilz GmbH & Co. KG, Felix-Wankel-Straße 2, 73760 Ostfildern, Germany
10-4
Program example for communication between the PSENvip and a safety
system from the automation system PSS 4000:
Systemanbindung_PSS4000_Beispiel
FUNCTION_BLOCK PSENvipCom
VAR_INPUT
bStartToolChangeE0 : SAFEBOOL; // Start signal for the communication from
PSENvip
bValidToolChangeE1 : SAFEBOOL; // Tool value from PSENvip is valid
bToolTypeE2 : SAFEBOOL; // Tool value Bit 0 from PSENvip
bToolTypeE3 : SAFEBOOL; // Tool value Bit 1 from PSENvip
uiToolTypeCNC : SAFEUINT; // Tool value from the CNC
END_VAR
VAR_OUTPUT
bAcknowledgeToolChangeA0 : SAFEBOOL; // Acknowledge signal for the communication
from PSS4000
bAcknowledgeToolTypeA1 : SAFEBOOL; // Tool value Bit 0 from PSS4000
bAcknowledgeToolTypeA2 : SAFEBOOL; // Tool value Bit 1 from PSS4000
END_VAR
VAR
RisingFlagE0 : R_TRIG; // FUNCTION block rising edge for Signal E0
RisingFlagE1 : R_TRIG; // FUNCTION block rising edge for Signal E1
bComEnd : BOOL; // End of communication
bToolchangeFlag : BOOL; // Rising edge for start of the communication
bToolValidFlag : BOOL; // Rising edge for valid tool from PSENvip
bStartCom : BOOL; // Start communication
bToolValid : BOOL; // Tool from PSENvip is valid
uiToolTypePSENvip : SAFEUINT; // Tool type from PSENvip
END_VAR
// Communication between PSENvip and PSS4000
CAL RisingFlagE0(
clk := bStartToolChangeE0,
q => bToolchangeFlag
)
Comentarios a estos manuales