Identifying System Errors –

More
04 Sep 2016 06:29 #79999 by jwsigler
I am retrofitting a Tree Journeyman 325 vertical mill. While I am installing a new linux based control system to replace the old Dynapath controller, I am retaining some of the original analog based relay control circuits. The attached Figure shows the overall CNC Interface drawing for the mill. I did encounter some issues integrating the analog circuits with the new digital linux based system with is using a MESA 7i77 control card.

This browser does not support PDFs. Please download the PDF to view it: Download PDF



One of the major circuits retained was the drive enable circuit shown from line 15 – 24 in the CNC Interface drawing. The drive enable circuit energizes relay 1CRE to enable the spindle drive and all the three axis servos. The relay contains a self-latching circuit so that once it is initiated, the relay locks itself on. The self latching circuit passes through the X and Y limit switches, the E-stop switch, a motor overload circuit that is part of the spindle drive, and through a normally closed relay which handles the Z limit sensors. A momentary “Reset” button switch energizes the drive enable relay which then locks itself off. If any of the switches wired in series as part of the self-latching circuit are “opened”, the relay unlocks and the drives are disabled.

The old system included several voltage taps within the self-latching circuit, (items 208, 207, 255, and 201) as shown on the CNC Interface drawing. Through these voltage taps the system was able to determine if a system error occurred and identify which switch caused the system error which would shut down the drives. If any one of the system switches is opened, the entire self-latching circuit is de-energized so the trick was to figure out how the original installation was able to determine which switch actually caused the fault.

After much deliberating I finally figured out how the original system designers were able to identify which switch within the self-latching circuit opened and caused a system error. As soon as any of the normally closed switches within the self latching circuit opens, the voltage immediately following the switch within the circuit will drop to zero. With the self-latching circuit open, power to the relay is cut and the relay de-energizes, shutting off power coming into the self-latching circuit. At the instant any of the system switches open, for a very short time, the time required for the relay to physically open, the voltage tap after the opened system switch will be at 0.0Vdc and the voltage tap prior to the opened system switch will still be at 24.0Vdc.

A HAL component function was developed containing logical if tests that would check for a “not false” reading on a voltage tap following each system switch, and a “true” reading on the voltage tap before the system switch. If these conditions are met, then that switch was the one which registered the system error. A complete listing of the HAL component is attached. A HAL component function approach was selected because writing a C type function provides unlimited flexibility in developing any logical control. While some of this could possibly have been accomplished in a HAL file directly, having written computer programs for years in Fortran, Visual Basic, and C, writing C based HAL functions was just more natural based upon my background once I learned how easy it was to compile the C based HAL functions and how to pass parameters, such as pin values, to the HAL function.

I personally like this approach of using an analog circuit controlled by the limit switches, the motor overload switch, and the E-Stop switch to enable and disable the system drives. The analog approach provides for a robust safety aspect because even if the digital system has an error, the analog circuit is unaffected and can shut down the servo drives.
Attachments:

Please Log in or Create an account to join the conversation.

More
04 Sep 2016 19:01 #80027 by andypugh
I agree that this is a situation where a custom HAL component makes sense.
However, those less familiar with programming could achieve the same result with a set of LUT5 components linked to the "message" component.
Having said that, I fear that LUT5 is a component that only those familiar with programming can understand. (the 5 input puts are used as a look-up into a 32-bit config word, and the selected bit is the output)

Please Log in or Create an account to join the conversation.

More
05 Sep 2016 19:05 #80057 by jwsigler
I am not an electronics guy, but I thought the really cool thing about the way Dynapath or Tree originally setup this circuit and took advantage of the lag time between the self-latching circuit being opened by one of the switches (i.e. limit switches, estop switch, motor overload switch, etc), and the relay responding and shutting off the voltage being applied to the self-latching circuit. By using this lag time, they monitored the voltage before and after each switch wired in series in the self-latching circuit to identify which switch shut down the system and where the error occurred. If at any instance in time the voltage after a switch is zero and the voltage before the switch is still 24 Vdc, that switch is the one which caused the system shutdown. This may not be that cool to an electronic person, but to a mechanical oriented person I thought it was really creative using the lag time created by the time it took for the relay to physically open and shut off all voltage to the self-latching circuit.

Please Log in or Create an account to join the conversation.

More
05 Sep 2016 20:33 #80058 by andypugh

I thought it was really creative using the lag time created by the time it took for the relay to physically open and shut off all voltage to the self-latching circuit.


Sorry, I hadn't realised it was doing that.
So, how does the self-latching circuit re-energise if the relay kills the 24V control voltage?

Please Log in or Create an account to join the conversation.

More
05 Sep 2016 22:48 #80061 by jwsigler
The self-latching circuit is energized through a momentary reset button. If you look at the initial CNC interface file I posted, at line 23 is the RESET button (214). Normally this value is 0, but momentarily pressing the reset button injects 24Vdc into the self-latching circuit which energizes the relay which then closes the contacts between 204 & 206 which applies power to the self-lacking circuit as long as all the system switches are closed. This circuit dates back to 1980 when the mill was originally made so I guess that they had to be a little more creative than today when it is easy to do everything digitally.

Please Log in or Create an account to join the conversation.

Time to create page: 0.173 seconds
Powered by Kunena Forum