Table of Contents

Triggers

Frequently, most sensors do not require constant monitoring during continuous program operation, for example, at idle transitions or at the time of stopping or inactivity of equipment. But the tasks at certain points of the equipment operation, which require quick reaction on the selected sensor. In such cases, the fastest method of processing will be to enable the trigger and assign it to the required controller input with enabling automatic tracking of the change in the state of the signal level at the selected input, and when the state changes in the right direction (from “0” to “1” or “ 1 “in” 0 ”) to perform the necessary actions. The trigger as a function is faster than the usual input processing inside the plc procedure. A striking example of the work of the trigger is the work of the sensor “arc response” on plasma cutting. The state of this sensor requires constant processing only during the operation of the plasma source, in the cutting process. When the plasma source is turned off (i.e., at idle transitions or in the process of waiting), tracking of the sensor is not required. Therefore, the response of the sensor during the waiting time should be ignored, but during the cutting process, the response to the sensor should be as fast as possible.Therefore, this sensor is most convenient to handle using a trigger.

myCNC software supports up to 4 Triggers.

Main window: Basic functions:

Examples of usage Tiggers:

Example "Arc ON"

Arc ON signal from Plasma power source represents current Plasma Arc state. Running program should be stopped if the signal failed during cutting. The signal Falling during “no cutting” operation should be ignored. A solution is to set up “Arc ON” input, falling edge as Trigger, Enable the trigger just after piercing operation in M71/M03 PLC procedures and disable it in M74/M05 PLC procedures just before OFF plasma power source.

M71/M03 example procedure

#define relay_PLAZMA_ON 2
#define input_ARC_READY 5
 
main()
{
	timer=0;
	portset (relay_PLAZMA_ON);
	timer=timeout_plasma_ready; //wait till plasma arc ready
	timer=5000;
	do
	{
		timer--;
		a=portget(input_ARC_READY);
		if (a!=0) { timer=0; };
	}while(timer>0); //pause
 
	a=portget(input_ARC_READY); //doublecheck arc sensor
	if (a==0)
	{
		message=PLCCMD_TRIGGER1_ON;
		timer=3;do{timer--;}while(timer>0);
	}
	else
	{
		portclr(relay_PLAZMA_ON);
		exit(plc_exit_plasma_fail);
	};
	exit(99);
};

M71/M03 Procedure description

#define relay_PLAZMA_ON 2
#define input_ARC_READY 5
timer=0;
portset (relay_PLAZMA_ON);
timer=5000;
do
{
  timer--;
  a=portget(input_ARC_READY);
  if (a!=0) { timer=0; };
}while(timer>0); //pause
a=portget(input_ARC_READY); //doublecheck arc sensor
if (a==0)
{
  message=PLCCMD_TRIGGER1_ON;
  timer=3;do{timer--;}while(timer>0);
}
else
{
  portclr(relay_PLAZMA_ON);
  exit(plc_exit_plasma_fail);
};

M74/M05 example procedure

#define relay_PLAZMA_ON 2
#define input_ARC_READY 5
 
main()
{
	timer=0;
	portclr (relay_PLAZMA_ON);
	message=PLCCMD_TRIGGER1_OFF;
	timer=3;do{timer--;}while(timer>0);
	exit(99);
};

M74/M05 Procedure description

#define relay_PLAZMA_ON 2
#define input_ARC_READY 5
timer=0;
portclr (relay_PLAZMA_ON);
    message=PLCCMD_TRIGGER1_OFF;
    timer=3;do{timer--;}while(timer>0);

Example "Probing operations"

  1. Probing operations. Events from probe sensor should be handled while probing operations. However, Probe input activated while normal moving might be in fact hitting the probe into the material. It can lead to Probe sensor breakage and run should be stopped immediately. A solution is to set up probe input as a trigger, configure Immediate Stop in the Slot PLC procedure and disable the trigger while probing operations ONLY.