How to get a Shizuoka AN-S Auto-Tool-Changer (ATC) to work with Linuxcnc

More
31 May 2021 11:32 #210790 by MachoHombre
Hello everyone,

I am trying to get advice/ideas on how to get Linuxcnc to control the ATC on my Shizuoka AN-S (1979). I am aware of the following options in Linuxcnc: iocontol pins, carousel program, or remap M6 with custom program.

The problem I am facing is that I only have one feedback signal from the ATC. This feedback signal is just a reset sent back to the external controller (Linuxcnc). Maybe this is very simple and I'm just not seeing it. This is all very new to me. :silly:

Below I have included a brief explanation of how the ATC and its signals work. You don't have to read the explanation. I'm just including it for your convenience. I have also include two pdf files that give a more detailed explanation. Each is 3 pages long (6 pages total). There are 4 pages of reading with a diagram and a list of M codes.

I have also attached three pictures that show a part of my schematic that deals with the ATC.

Lastly, I am using the following hardware on my machine. Mesa 5i25, 7i77, and 7i84 (for extra I/O).

How ATC works:

Originally, my Shizuoka AN-S was controlled by a Dana/Summit Bandit controller that controlled 3 DC servo motor and the ATC. The Bandit controller would send out the following M-codes (signals) to the ATC.

M20 - Tool-out
M21 - Turret CW
M22 - Turret CCW
M23 - Tool-in
M24 - RPM Up
M25 - RPM Down
M26 - RPM Home
M27 - Turret Home

The following is a paragraph from pg. 3.7 of the operations manual "Summit_Toolchanger.pdf." It explains how a M20 - Tool-out command works.

Using Figure 3.4 (you can use "LDSHIZANS R02 PG 15 of 18.jpg" instead) lets simulate a tool-out function in the AUTO mode. The external controller must contain a switching device which will close when a command is given to the controller to perform tool-out. The switching device will then connect or tie the green wire with the violet wire. Voltage will be applied from the violet wire through the green wire of the M-function cable to the logic circuits of the tool changer. The switching device must remain closed so the voltage will continue to be applied through this wire until the tool-out function is complete. When the tool-out is complete, the tool changer returns a reset signal to the external controller by closing the white/black and gray wires for a duration of approximately 100 milli-seconds. When the external controller receives the reset signal, the controller must immediately "Open" the switching device that connected the green to the violet wire to accomplish the tool-out function.

I apologize in advance for the lengthy post. I'm just trying to provide as much detail so you guys can possibly provide the best course of action without wasting your time.

Thank you,

Brett W.

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

More
01 Jun 2021 21:24 #210914 by andypugh
I think that you missed something from your list of options, and it might be the right thing to use: Classic-Ladder. It is a ladder-logic package built in to LinuxCNC (soft PLC). I believe that it excels at this sort of thing, but I admit that I have never used it.

Alteratively this sequencing could be done in G-code, if you are comfortable with G-code. basically set an output, wait for the reset, do the next thing. There is a sample G-code sequencer here:
github.com/LinuxCNC/linuxcnc/blob/master...hange/toolchange.ngc
That uses the carousel component, but that probably isn't necessary with your setup. You would just keep sending digital signals to trigger the next part of the process. (in effect the carousel functions are built in to the tool changer)

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

More
15 Jun 2021 00:01 #212073 by MachoHombre
Hi Andy,

Thank you for your recommendations.

I tried the Classic-Ladder method, unfortunately it did not work out the way I wanted it to.

However, I have had more success with the G-code sequence method example you provided. It seems to be working the way I want it to so far.

Lastly, I do have another question. What is the purpose of the "[1]" after "endsub?" It this a parameter? Where is it going?

Thanks.

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

More
16 Jun 2021 13:32 #212199 by andypugh

Lastly, I do have another question. What is the purpose of the "[1]" after "endsub?" It this a parameter? Where is it going?.


linuxcnc.org/docs/2.8/html/gcode/o-code....outine_return_values

It is a way to indicate if a called routine succeeded, for example.
O100 CALL

O10 IF #<_value_returned>
    O20 IF [ #<_value> LT 0]
        (ABORT, It's all gone wrong!)
    O20 ENDIF
O10 ENDIF

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

More
17 Jun 2021 02:39 #212253 by MachoHombre
Andy.

Thanks for the explanation and link.

I'm guessing the "[1]" is sent to the global parameters which is then read by the epilog in the stdglue.py file.

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

Time to create page: 0.053 seconds
Powered by Kunena Forum