2-speed spindle configuration - help

More
5 years 7 months ago - 5 years 6 months ago #201522 by RotarySMP
Jaro, I would love to see some pictures of your machine and conversion.
Mark
Last edit: 5 years 6 months ago by RotarySMP.

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

More
5 years 6 months ago #204612 by endian
Hello folks,

excuse me - I am new here. I need some brain stroming for gearchange for project of turn retrofit which I am doing now(pic below). It is my first real machine retrofit if we will not count alu profiles mills etc...

It has manual gearchange lever in from panel. It has 3 static position at gearbox 1st gear-neutral-2nd gear.
1st and 2nd gear have sensors if it is shifted NO character when shifted. Neutral has no signal both are opened. These signals I have connected to digital ins at 7i76e unit.
1st gear has 1/1 gear ratio which is "something less" - 3000 rpms. 2nd gear has 1/6 gear ratio which is 0 - 500 rpms.

I read tons of topic about this problematic. I do not know if I am right if I am wrong please make it clear to me.
I need to create some program (I am familiar with C/C++) which should be started via spindle cw or ccw command.
I should create some component file which it will have name something like "my_custom_gearchange.comp" which I will include to .hal file. I will add them to real time "loadrt " and to servothread task.

Then I need to read some variabiles for my custom component like are:
spindle_on;
spindle_cw;
spindle_ccw;
g96_on;
g97_on;
input_signal_1st_gear shifted;
input_signal_2nd_gear shifted;
spindle_speed_comand;
spinde_at_speed; ... these guys I will take from .hall file?

after these steps C magic happend and I will have nice stabile working gearchange please?

regards Foxind

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

More
5 years 6 months ago #204619 by andypugh
You shouldn't need a custom component. What you have should be easily managed by an existing component.
linuxcnc.org/docs/2.8/html/man/man9/gearchange.9.html
Is probably all you need. The system can treat neutral and gear 1 the same with little penalty. Unless you want to have specific behaviour in neutral?

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

More
5 years 6 months ago - 5 years 6 months ago #204719 by endian
Thanks, I will save default gearchange.comp at safe place. where I will find gearchange.comp please? I need next functions from gearchange.comp program.

In neutral not turn on spinle at all and tell user about issue. telegram neutral shifted

In MDI mode I need to avoid run spindle at wrong gear with wrong speed. if it will be wrong gear or neutral it will abort program and it will tell you shift right gear. I need to show user telegram about what happpend and what issue is here.

in automatic run I need to G96 run only with 1/1 gear ratio and in G97 I need to run with both gears.
if will be wrong gear or neautal it will abort program and it will tell you shift right gear.
Last edit: 5 years 6 months ago by endian.

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

More
5 years 6 months ago #204726 by andypugh
OK, that's slightly more complicated and will need a custom (or at least customised) .comp file.

One option is to create a number of extra (bit) outputs from the .comp that go to a "message" component .
Or you could just use rtapi_print_msg directly, but the message .comp has already got the logic set up. Also, if you decide that you want something more graphical it is easier to substitute it in (look at hal_manualtoolchange for how to pop up a dialog box on a hal pin input)
If you want to actually abort the program, then you will also need another bit output to net to halui .program.stop.

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

More
5 years 6 months ago #204738 by endian
yes it is little bit complicated and messy to me becouse I am just plc && hardware guy not clear developer. Need to avoid human issuing factor from automatic process and it is everytime difficult process.

name of my machine from pncconfig is "my_lathe"

If I am undestand right, to dos next things - in config directory/my_lathe/ will create empty component named "my_gearchange_subrutine.comp"; and in same directory will create "message_popup.comp" for telegrams to user.

next I will add to "my_lathe.hal" file :

loadrt my_gearchange_subrutine
loadrt message_popup

addf my_gearchange_subrutine.0 servo-thread
addf message_popup.0 servo-thread

This steps will add custom components to .hal, after startup lcnc it will add everything else and my custom component to servothread loop which is runs every "xy ms" time?

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

Time to create page: 0.207 seconds
Powered by Kunena Forum