Spindle scaling factor
I'm busy retrofitting a Mazak M4. I have done a couple of machines before, but on all machines so far I still have questions pending. But first things first. on the machine that I'm busy on at the moment, I'm trying to add a scaling factor to each of 3 gears. attached is my .hal file. the 3 gears gets selected from solenoid valves, which I'm activating with M101,M102,M103&M104(on/off for 3 gears.(setp hm2_5i25.0.7i77.0.0.output-12&setp hm2_5i25.0.7i77.0.0.output-13-specified in the m1nn files))
I'm trying to add the scaling factors with Mux4. obviously doing something wrong. I would like a example or suggestions if someone has this available. on some previous machines I normally change the output-scale in .ini file when I change the gears manually. I have limit switches to detect in what gear I am in currently. (gearbox1,gearbox2, and gearbox3.)
then, the chuck clamp/unclamp is secondary priority from spindle output scale. I'm using a combination of relays to prevent the hydraulic chuck from unclamping unexpectedly. I'm using classicladder for it, and it works, but I'm sure there's better methods of doing this, like if linuxcnc can have a memory if output bit was true or false last time linuxcnc was closed.
then, ... third on my priority list is turret indexing. the way I've done it previously works, but also sure there's better methods. I'm attaching files of machines I've done so far. I'll appreciate some examples and suggestions please.
ok... the uni_tech_vert_2, is a double ram 1.6m chuck vertical lathe, with nothing fancy.
Voest has 4 gears, which mannually gets selected by hand lever.
first rivol-gun-dril is a rivol lathe which we added a bt40 spindle on the copy attachment side. so 2 spindles corresponding with each other.
second rivol_gun_drill is the Mazak M4 that I'm still busy with... will change file names as soon as machine is running, then I'll also post some foto's of the machines I've done
thanks in advance.
Diekie
Please Log in or Create an account to join the conversation.
www.linuxcnc.org/index.php/english/forum...-gearchange-and-near
Rick G
Please Log in or Create an account to join the conversation.
then, the chuck clamp/unclamp is secondary priority from spindle output scale. I'm using a combination of relays to prevent the hydraulic chuck from unclamping unexpectedly. I'm using classicladder for it, and it works, but I'm sure there's better methods of doing this, like if linuxcnc can have a memory if output bit was true or false last time linuxcnc was closed.
All Linuxcnc persistant data is saved in config files, tool table etc. so you will have to do likewise.
See for example
www.linuxcnc.org/index.php/english/forum...fter-shut-down#28048
You could do this by way of a simple M1nn script also
regards
Please Log in or Create an account to join the conversation.
the actual gearchange is working fine, and my encoder is coupled 1:1 with my spindle.
I want to do something like this:
if gearswitch 1 is true, then output scale = 400
if gearswitch 2 is true, then output scale = 800
if gearswitch 3 is true, then output scale = 1600.
I've tried a couple of examples, and adjusted it for my machine, but then Linux comes with errors. so I've been busy with this the whole day, but I'm wasting my time, because I don't have a clue what I'm doing.
please if someone can tell me where I can read more about this, or how to use the terminal to get the manuals on how to use these components, as I am trying to do research, but difficult without examples.
thank you in advence. I basically only want to focus on how to get the spindle output scale to change if different switches is made.
Please Log in or Create an account to join the conversation.
by typing man xxxx in a terminal window
man gearchange
for example
Please Log in or Create an account to join the conversation.
You will need to post what it is you are trying to change ie. your hal file that contains the scale component.
If you look at www.linuxcnc.org/index.php/english/forum...-gearchange-and-near post 15762
you will see that I changed the ratio parameter for each pulley setting, so that the detected spindle speed matched the actual speed at the chuck, thus giving a true commanded speeds.
Once you get things so that you can set the params correctly from the command line, you can look at automating it.
regards
Please Log in or Create an account to join the conversation.
loadrt mux8 count=1
addf mux8.0 servo-thread
net gearbox1 mux8.0.sel0
net gearbox2 mux8.0.sel1
net gearbox3 mux8.0.sel2
setp hm2_5i25.0.7i77.0.1.analogout2-scalemax mux8.0.out
setp mux8.0.in1 400
setp mux8.0.in2 800
setp mux8.0.in4 1600
net gearbox1 hm2_5i25.0.7i77.0.0.input-07-not
net gearbox2 hm2_5i25.0.7i77.0.0.input-14-not
net gearbox3 hm2_5i25.0.7i77.0.0.input-15-not
then I get the following error:
rivol-gun-drill.hal:419: value 'mux8.0.out' invalid for float
please. can someone help me? basically: when pin 07 then output scale must be 400, when pin 14 true, then output scale must be 800, and when pin 1600 is true, then output must be 1600
Please Log in or Create an account to join the conversation.
Try
setp hm2_5i25.0.7i77.0.1.analogout2-scalemax 400
and
setp hm2_5i25.0.7i77.0.1.analogout2-scalemax 400.0
John
Please Log in or Create an account to join the conversation.
Thank you for your input. I have tried swapping the orders around, and I have tried what you suggested, still no joy.
check my other thread just posted. I attached the hal file.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.