Hello Guest it is December 05, 2024, 11:41:37 AM

Author Topic: If macropump fails, stop machine with brains  (Read 6082 times)

0 Members and 1 Guest are viewing this topic.

If macropump fails, stop machine with brains
« on: November 20, 2017, 04:01:42 AM »
Not really sure how to umscribe it, but I'll try.

I am using mach3 for plasma machines. Sometimes the macropump crashes at a customer, and I don't know how they exactly get it to crash or why. I get they cypress enable error.

I want the machine to go in e-stop if the macropump fails.

What I was thinking of was this:
* make a brain that adds 1 to dro 1106 every second.
* make a brain that triggers e-stop if that dro has a value of 2
* add SetUserDRO(1106,0) to the macropump.
Then if the macropump script fails, the timer is not being reset anymore, and after 2 seconds the machine will go in e-stop.


I'm used to work with cypress enable, I changed much in mach3 and customized it completely, but I really don't have any clue how to do the brains part and if this is actually possible in brains.

Anyone who could make an example in brains how to add 1 to a DRO every second?
Or anyone have a better idea of how to make this check if the macropump is still running?

Regs,
Sascha
Re: If macropump fails, stop machine with brains
« Reply #1 on: November 21, 2017, 05:12:58 AM »
For those who are curious how I did it. Maybe it can be done easier, I don't know, this works for me now though.


if LED1106 is OFF, a timer is started and then LED 1106 is turned ON.
Then when LED 1106 is ON another timer is started to turn LED 1106 OFF.
This will make LED 1106 blink all the time.
Then I used another timer to make sure it counts only once every time LED 1106 is going ON, and adds +1 to DRO 1106.
If there is no E-stop active, and DRO 1106 is bigger then 1, it will generate an E-stop.


In the macropump I added this:

If GetUserDRO(1106)  >= 1 Then
  SetUserDRO(1106,0)
End if

So the brain will add +1 to the DRO every second, but the macropump is setting it to zero again as soon as it sees it is not zero anymore.
When the macropump crashes, the brain will succesfully count on until the DRO reaches more then 1 (which is 2). And at that point the brain will generate an E-stop that can only be resetted after the DRO is back to zero.
So then you'll have to restart mach3.