Spindle scaling factor

More
11 Jan 2013 22:54 #28593 by Diederik
Hi there,

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

File Attachment:

File Name: uni_tech_v...1-11.hal
File Size:20 KB


File Attachment:

File Name: voest.hal
File Size:17 KB


File Attachment:

File Name: voest.hal
File Size:17 KB


File Attachment:

File Name: rivol-gun-drill.hal
File Size:21 KB


File Attachment:

File Name: rivol-gun-...1-11.hal
File Size:20 KB


thanks in advance.

Diekie
Attachments:

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

More
12 Jan 2013 16:59 #28622 by Rick G
Replied by Rick G on topic Spindle scaling factor
You might get some ideas here...

www.linuxcnc.org/index.php/english/forum...-gearchange-and-near

Rick G
The following user(s) said Thank You: Diederik

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

More
12 Jan 2013 18:05 #28623 by ArcEye
Replied by ArcEye on topic Spindle scaling factor

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
The following user(s) said Thank You: Diederik

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

More
14 Jan 2013 23:22 #28682 by Diederik
Replied by Diederik on topic Spindle scaling factor
I think this should be straight forward, I looked at the example sent to me, but still no output scale factor.
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.

More
15 Jan 2013 00:13 #28687 by PCW
Replied by PCW on topic Spindle scaling factor
All of the components have (brief) manpages that you can access
by typing man xxxx in a terminal window

man gearchange

for example
The following user(s) said Thank You: Diederik

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

More
15 Jan 2013 00:22 #28688 by ArcEye
Replied by ArcEye on topic Spindle scaling factor
Hi

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
The following user(s) said Thank You: Diederik

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

More
17 Jan 2013 20:31 #28769 by Diederik
Replied by Diederik on topic Spindle scaling factor
I have now tried the following in my .hal file, but still does not work:
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.

More
17 Jan 2013 21:52 #28770 by BigJohnT
Replied by BigJohnT on topic Spindle scaling factor
A couple of things I noticed is the setp mux8- should be ahead of the mux out pin as they are executed in order. The second thing is you probably need to set the in's with a float value like 400.0. Troubleshooting typos and type errors can be a bit frustrating if you don't take it systematically.

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.

More
17 Jan 2013 21:59 #28772 by Diederik
Replied by Diederik on topic Spindle scaling factor
Hi John,

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.

More
17 Jan 2013 22:03 #28773 by Diederik
Replied by Diederik on topic Spindle scaling factor
When I setp hm2_5i25.0.7i77.0.1.analogout2-scalemax 400/ 400.1, it works, but I need these to select automatically when I change gears. only way I can think of doing it is with mux8. mux 8 and analogout2-scalemax is floats

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

Time to create page: 0.223 seconds
Powered by Kunena Forum