Right, we are ready to start reassembling stuff again.
Retrofitting 1983 Shizuoka AN-SB CNC milling machine, Bridgeport mill, Colchester Bantam lathe and 1982 Tree UP-1000 CNC lathe with modern controls - and other workshop stuff
Sunday, 28 August 2022
Reassembling the Kitagawa chuck and machining the drawbar
Sunday, 14 August 2022
Testing and setting up the turret
Let's test the turret controls!
Well that worked. It required a bit of time for the air to be blown through the system, then I turned the pump speed up to 50hz. this pump is actually rated for 60hz being a US machine but it works fine at 50hz.
Here we are.
And indeed it manages random tool changes. Phew.
It feels very marginal in terms of mechanical margin / tolerances, so I can imagine that it may not be 100% dependable. However, there's still the "turret locked" switch input waiting to be connected up, so let's look at connecting it in.
Here's the relevant section of the RotateTurretStage2 stage:
; IF ToolTurretOffCurrentToolTimer THEN RST RotateToolTurret, SET ToolChangeComplete_M, RST ToolTurretEnable
; Change to:
IF INP41 THEN SET ToolChangeComplete_M
If I have understood the original statement correctly, I have removed the RST ToolChangeComplete_M flag reset and changed it so it is conditional on the INP41 input being SET. Otherwise, if it is not, the toolchange won't be considered complete and the ATC timeout will result.
Let's modify the SRC file, compile it and try it out....
Saturday, 13 August 2022
Modifying the CNC12 PLC program to run a tool turret
With the servos, VFD etc all set up and working, it seemed like a good time to focus on cracking the controls for the turret toolchanger on the Tree. This is fairly simple - there's a single hydraulic solenoid that takes care of withdrawing the locking pawl, driving the turret off its locking "teeth" and rotating the turret (using a hydraulic motor). Once deactivated, the 2-way action of the solenoid applies reverse pressure, driving the turret backwards against the locking pawl, forcing the turret against its locking teeth and holding it there. There's also a Sanyo 8 way position switch (which appears to be a set of reed switches and a rotor-mounted magnet), which reports the current tool position.
There are several flavours of ATC catered for in the standard wizard options but none of them are exactly what I need. The closest uses 3 or 4 bit Gray code to report the position and a single output to drive the turret. Although I could arguably use a series of diodes to convert my 8-way switch outputs to Gray code, I'd rather do it in software. Otherwise it should be very close to what I require.
The PLC code is provided in the default cnct folder after installation and you are enabled / encouraged to make your own edits, then compile and test it for yourself.
;==============================================================================
AtcGrayCode3Stage
;==============================================================================
IF TRUE THEN CurrentTurretPosition_W = 0
IF ToolTurretPosBit1 && ToolTurretPosBit2 && !ToolTurretPosBit3 THEN CurrentTurretPosition_W = 1
IF !ToolTurretPosBit1 && ToolTurretPosBit2 && !ToolTurretPosBit3 THEN CurrentTurretPosition_W = 2 ;**** Bit2
IF !ToolTurretPosBit1 && !ToolTurretPosBit2 && !ToolTurretPosBit3 THEN CurrentTurretPosition_W = 3
IF ToolTurretPosBit1 && !ToolTurretPosBit2 && !ToolTurretPosBit3 THEN CurrentTurretPosition_W = 4 ;**** Bit1
IF ToolTurretPosBit1 && !ToolTurretPosBit2 && ToolTurretPosBit3 THEN CurrentTurretPosition_W = 5
IF !ToolTurretPosBit1 && !ToolTurretPosBit2 && ToolTurretPosBit3 THEN CurrentTurretPosition_W = 6 ;**** Bit3
IF !ToolTurretPosBit1 && ToolTurretPosBit2 && ToolTurretPosBit3 THEN CurrentTurretPosition_W = 7
IF ToolTurretPosBit1 && ToolTurretPosBit2 && ToolTurretPosBit3 THEN CurrentTurretPosition_W = 8
IF TRUE THEN SV_PLC_CAROUSEL_POSITION = CurrentTurretPosition_W
With this (simpler) code:
ATCGrayCodeStage
;=========================================================================
; EME 2022-08-13 ATC control trials
; Input 1 on Ether1616 with A0 address = CNC12 input 33 etc
IF TRUE THEN CurrentTurretPosition_W = 0
IF INP33 THEN CurrentTurretPosition_W = 1
IF INP34 THEN CurrentTurretPosition_W = 2
IF INP35 THEN CurrentTurretPosition_W = 3
IF INP36 THEN CurrentTurretPosition_W = 4
IF INP37 THEN CurrentTurretPosition_W = 5
IF INP38 THEN CurrentTurretPosition_W = 6
IF INP39 THEN CurrentTurretPosition_W = 7
IF INP40 THEN CurrentTurretPosition_W = 8
IF TRUE THEN SV_PLC_CAROUSEL_POSITION = CurrentTurretPosition_W
Looks pretty straightforward. But obvs it wasn't clear to me if it was actually working when I tried it "dry" ie without the hydraulics running.
In the end, I went though the whole thing and deleted out everything that wasn't turret-related or specific to my turret type ("W4"). When I did that, it actually became quite understandable.
It all looks pretty reasonable with the exception of the MonitorIndexATCRequestStage bit, which I suspect isn't relevant here.
And indeed, that all seems to work. Admittedly, I haven't got the hydraulic pump running but everything else computes. If you run the PLC Detective (press Alt-E while CNC12 is running), you can see the status of the variables that are displayed as they change. So hovering the mouse over RequestedTurretPosition_W would show the currently requested tool position etc. That's pretty handy for checking what it thinks is going on.
Saturday, 6 August 2022
Modelling up the Kitagawa chuck and the spindle - and threading the connector
The moving "master jaw" was quite a thing to model up and worthy of a "Fusion 360 challenge" in anyone's books. Not that the main chuck body or the other compts were a great deal easier.
Go figure. But I have it here now. Let's get threading.....
TIG welder up and running - after some fault diagnostics and repair
Finally got some time to connect up the flow meter and argon hose. Plugged in the torch and ground cables and the torch hose etc. Powered it...
-
Setting up the servo tuning(?) software: Having spent a couple of hours yesterday pratting about with the PID controllers for the X and Z ax...
-
The "Leadshine" DM556 stepper drive I ordered last week arrived this morning. This is a 50V / 5.6A 2-phase stepper drive. Given...
-
Oh what now, fatty? This Linuxcnc stuff was always going to be a painful experience. You have to get deep into it to get anything done, yet ...