Shizouka An-s Build

the biggest info you need to pass is CurrentTool CommandedTool
easiest way is the plugin custom notify

use the CurrentTool dro number
use the CommandedTool dro number,
send them to the galil via the plugin, as galil variable
 
Hi Galil/ pros! I will start a thread about my project, but I thought maybe I would catch some attention here.
I have converted a '78 Hardinge HNC CNC lathe with a Galil 2130 controller and analog servo drives to the original brush servos. Anyway, as you may know this Lathe has a 8 position turret that is all air powered. One output from the Galil pops it up and starts turning it a second output stops it . the original encoder with four inputs to the Galil reports a binary code xx0x for tool 5 etc. There is one more limit switch to check if the turret is locked in place. My challenge is to write a DMC program to control this turret and get the info from Mach3 just like you guys are talking about.
I have never tried to write a Galil program, and am not sure where to even start...any advice or help will be greatly appreciated!
BTW, check out what I use my machines to build in my spare time! Roopod dot com
Roo Trimble.
 
I have the Hardinge CHNC running under camsoft with the Galil card. Spent A LOT of time getting the turret to index reliably. Ended up adding anther solenoid to slow the turret down one position away from stop. The way it works - an exhaust valve controls the turret index speed - too slow and it won't pop up and turn - too fast it misses the index pawl pin popping out to stop it. Drove me nuts re adjusting EVERY day. I talked to a shop that had 50 CHNCs and they said yep, biggest problem on the Hardinge. Sooo, my macro starts the turret at full air, then slows it WAY down just before popping in the stop pin. With this upgrade, I haven't adjusted the turret in many years. NOTE - this machine very worn in the turret area - a complete mechanical rebuild would have solved this issue also.

Anyway, the attached macro is a bit more complex than you need. It also has a feature to index the turret from the operator panel and several other checks. Its also written in the Camsoft logic language. But logic is logic - all the same. Couple syntax things to help you read it - \<digit><digit> is just a variable name. #<digit><digit> is an input or an output.

If you go to the Camsoft sales site and navigate the the Hardinge CHNC running - its this machine.

<EDIT> Inputs are PRECIOUS in Galil... if I were doing this task under Galil, an encoder on the turret position would be an idea to consider. I had even thought about replacing that worn out air motor with a small servo. You might consider this also.
 

Attachments

  • turret index.txt
    8.1 KB · Views: 9
Last edited:
I have the Hardinge CHNC running under camsoft with the Galil card. Spent A LOT of time getting the turret to index reliably. Ended up adding anther solenoid to slow the turret down one position away from stop. The way it works - an exhaust valve controls the turret index speed - too slow and it won't pop up and turn - too fast it misses the index pawl pin popping out to stop it. Drove me nuts re adjusting EVERY day. I talked to a shop that had 50 CHNCs and they said yep, biggest problem on the Hardinge. Sooo, my macro starts the turret at full air, then slows it WAY down just before popping in the stop pin. With this upgrade, I haven't adjusted the turret in many years. NOTE - this machine very worn in the turret area - a complete mechanical rebuild would have solved this issue also.

Anyway, the attached macro is a bit more complex than you need. It also has a feature to index the turret from the operator panel and several other checks. Its also written in the Camsoft logic language. But logic is logic - all the same. Couple syntax things to help you read it - \<digit><digit> is just a variable name. #<digit><digit> is an input or an output.

If you go to the Camsoft sales site and navigate the the Hardinge CHNC running - its this machine.

<EDIT> Inputs are PRECIOUS in Galil... if I were doing this task under Galil, an encoder on the turret position would be an idea to consider. I had even thought about replacing that worn out air motor with a small servo. You might consider this also.
Thanks! Karl...
I think I am getting there with the Galil side of things. Still trying to figure out the messaging to the Galil from the plugin. Sounds Like you will want to activate one of the custom messages, give it an ID number and then in the toolchange macro in mach3, use "NotifyPlugin(id number) to send the current tool DRO (DRO824) to that message and make it define a Galil variable Gtool=DRO824 Gtool being the Galil variable that I would use in my Galil tool change program. not sure if this is all correct, but that's what i have so far. Also I saw that if you want to set a Mach3 DRO to a Galil variable you can put message line in the plugin like Gtool=DROXXX cool!
anyway, Thanks again, I am hoping my turret stop is in good enough shape for now, but I like the Servo motor Idea...probably a lot faster and a lot less air use!
BTW, I have the 64 extra I/O so no shortage of inputs there.
 
Hi A little futher today...I have the Plugin sending messages to the Galil 2130...the actual VB command is NotifyPlugins( ) don't forget the s...


-roo
 
Hi A little futher today...I have the Plugin sending messages to the Galil 2130...the actual VB command is NotifyPlugins( ) don't forget the s...


-roo
Would you post that code snippet please. Also, have you figured out how to get back a message from Galil?
 
If you followed the logic in my macro, you could see most of it was aimed at trapping faults. If your equipment is good enough to assume it won't fail, the logic to move the turret is quite small.

With all that I/O you could really add a lot of neat features. I farm for a living - means I don't follow forums much in spring and summer. PM or email me if you start a Galil or Hardinge thread, I know both inside out.
 
It's been awhile since there were any updates here. Alloy said he needs his mill so I figured I better get the software under control, we pretty much finished up the wiring months ago. And it would be nice to have a big chunk of floor space back, I need the room to work on my CNC surface grinder. ;) I still found a couple of wiring errors, :rolleyes: even though we actually had the wheels turning under Mach3 control. So I spent the last week getting it up and running. I gave Mach3 one more chance to ''talk'' to the tool changer on my terms Well that wasn't going to happen, so I just wrote a new CNC controller program to run the machine. There is an advantage to using custom software, I can make it work like Alloy wants it, rather than being locked into something.

My current software will only run on WinXP because of the old Galil comm drivers that will only work on XP, and the machine computer had Win8.1 on it. Has Win10 now, and now my new software works with the new Galil comm drivers on 64 bit systems. The good news is that I'm almost getting competent writing code in VB.net It's so different from VB6 that it is pretty much like learning a new programming language. Has a lot more features and shortcuts than VB6, but trying to learn all of it is a struggle for an old guy.;) I used to be able to keep an entire 60,000 line program in my head, not so much anymore.:( Not sure how many lines of code are in this program, but at least 10,000, and the Galil program is currently 858 lines.
upload_2016-6-21_20-29-34.png


I had the machine air cutting pretty quickly, a couple of (18 hour) days after I started. In fairness, I already had some of the software modules written because I was planning to change my machines over to more modern control software. Over the last few days I have cut piles of air chips, but they are really easy to clean up.:grin:

I finished up the basic functionality this evening with the completion of the spindle speed control. This mill has a veri-drive and I think the spindle speed change was originally driven by a small induction gearmotor. The mill did not come with that hardware. It now has a NEMA 34 stepper on it. It took me two days to get the speed control software working correctly, it was rather a PITA.
upload_2016-6-21_20-27-27.png


The speed adjustment has to work both in manual and under full computer control, as well as being able to override the set speed on the fly with a pot on the panel. It would have been a lot easier to just adjust the VFD in software. Someday the veri-drive will fail and we can change it over. Getting ready to do that on my mill, I'll get to that in a couple of weeks. There are also Feed and Rapid override pots on the panel. You can adjust the feed on the fly also as a % of the assigned speed, 1 to 200%

Now I need to ''run'' a bunch of different parts to make sure the G-code translator is going to behave. I'll try to post a movie of it actually cutting something and making tool changes.

More later.......
.
.
 
Interesting. I'm curious, Galil had written a gcode interpreter back in the ISA card days. Are you using that?

I can't imagine writing an entire CNC control from scratch. Just something simple, like a JOG_buttons, or a home routine took me a few days. AND then needed a re-write later to bug proof it. My Galil G84 rigid tap routine was a stone ***** to make bug proof.

Karl
 
Interesting. I'm curious, Galil had written a gcode interpreter back in the ISA card days. Are you using that?

No, I just wrote a module in the .Net program to translate the G-code to a Galil command line. Then I store the command line in an array to be transmitted on demand.

G1 F10.0 X-0.875 Y-1.0 Z-0.25 W0.0, becomes:
("XPOS=" & Xpos & ";YPOS=" & Ypos & ";ZPOS=" & Zpos & ";WPOS=" & Wpos & ";VSCUT=" & FEED_VS & ";XQ#G1,3" & "|" & u)

Which is transmitted to Galil as:
XPOS=-22225;YPOS=-25400;ZPOS=-6350;WPOS=0;VSCUT=4233;XQ#G1,3

Which then executes this code on Galil
#G1
#B;WT10;JP#B,(@IN[2]=1)&(Q=1)
L=XPOS-_RPA
M=YPOS-_RPB
N=ZPOS-_RPC
O=WPOS-_RPD
IF(XPOS=0)&(YPOS=0)&(ZPOS<>0)
SPC=VSCUT
PAC=CPOS
BGC
AMC
IF(L=0)&(M=0);JP#Q;ENDIF
ENDIF
CA S
LM ABC
VVS=VSCUT
L=XPOS-_RPA
M=YPOS-_RPB
N=ZPOS-_RPC
O=WPOS-_RPD
IF(L=0)&(M=0)&(N=0)&(O=0);JP#UI1;ENDIF
LI L,M,N<-1>_VVS/10
LE
BG S
AMS
#Q
WT10
JP#V,(ZDIS=0)
JP#Q,(_TEC<-25)|(_TEC>25)
#V
JS#UI1
EN
 
Back
Top