- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
11 Aug 2018 21:31 #115920
by andypugh
Yes, you have more than 2 gears to the normal HAL component won't work.
Does the machine have a way to work out which gear it is in?
Replied by andypugh on topic Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
Can anybody give me a hint on what to do next?
I think that above new *table* of gear handling may need changes in gearcomp2 ?
Yes, you have more than 2 gears to the normal HAL component won't work.
Does the machine have a way to work out which gear it is in?
Please Log in or Create an account to join the conversation.
12 Aug 2018 06:53 #115944
by tecno
Replied by tecno on topic Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
I have following *aids* to let LCNC know what gear is set
forum.linuxcnc.org/39-pncconf/33069-help...ing?start=410#103461
Hi / Lo = Input 15 Hi or Lo
forum.linuxcnc.org/39-pncconf/33069-help...ing?start=410#103440
A to E = Inputs 10 - 11 - 12 - 13 - 14
On given Sxxxx command
I want LCNC to check what gear setting is now, if within gear range OK start spindle.
If not, find a solution to given Sxxxx and then start spindle when in range for a gear set.
Cheers
Bengt
forum.linuxcnc.org/39-pncconf/33069-help...ing?start=410#103461
Hi / Lo = Input 15 Hi or Lo
forum.linuxcnc.org/39-pncconf/33069-help...ing?start=410#103440
A to E = Inputs 10 - 11 - 12 - 13 - 14
On given Sxxxx command
I want LCNC to check what gear setting is now, if within gear range OK start spindle.
If not, find a solution to given Sxxxx and then start spindle when in range for a gear set.
Cheers
Bengt
Please Log in or Create an account to join the conversation.
12 Aug 2018 10:26 #115950
by rodw
Replied by rodw on topic Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
I had forgotten I had written a component for you.
As I said I don't understand spindles and Andy might have some cleverer solution but I think I would expand the component idea so it took
motion.spindle−speed−out (so it knows the requested speed)
motion.spindle−on (so it knows when to turn the spindle on)
and an output pin that is connected to your VFD (to turn it on) that would not be enabled until the right gear was selected.
Just make sure motion.spindle−at−speed is connected so motion will not start until you are at speed so if you have to change gears, motion is enabled.
As I said I don't understand spindles and Andy might have some cleverer solution but I think I would expand the component idea so it took
motion.spindle−speed−out (so it knows the requested speed)
motion.spindle−on (so it knows when to turn the spindle on)
and an output pin that is connected to your VFD (to turn it on) that would not be enabled until the right gear was selected.
Just make sure motion.spindle−at−speed is connected so motion will not start until you are at speed so if you have to change gears, motion is enabled.
Please Log in or Create an account to join the conversation.
12 Aug 2018 12:29 #115954
by tecno
Replied by tecno on topic Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
Thanks Rod,
lets see what kind of card Andy has in his sleeve for this.
Cheers
Bengt
lets see what kind of card Andy has in his sleeve for this.
Cheers
Bengt
Please Log in or Create an account to join the conversation.
13 Aug 2018 13:19 #116003
by andypugh
Replied by andypugh on topic Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
I think Rod is on the right track with intercepting motion.spindle-on and only passing it through when conditions are met.
It is fairly easy with a component, though the pin numbering is not easy to make neat.
Writing from scratch in C you could make the pin names AL, AH, BL, BH, CL, CH etc, but for this component the same gears would be 1,7,2,8,3,9 etc
It is fairly easy with a component, though the pin numbering is not easy to make neat.
Writing from scratch in C you could make the pin names AL, AH, BL, BH, CL, CH etc, but for this component the same gears would be 1,7,2,8,3,9 etc
component gearblocker;
pin in bit spindle-enable-in;
pin out bit spindle-enable-out;
pin in float spindle-speed-in;
pin out float motor-speed-out;
pin in float gear.#.min-speed[10];
pin in float gear.#.max-speed[10];
pin in float gear.#.ratio[10];
pin in bit high-gear;
pin in bit gear-A;
pin in bit gear-B;
pin in bit gear-C;
pin in bit gear-D;
pin in bit gear-E;
license "gpl";
function _;
;;
FUNCTION(_){
int i;
int gear;
if (spindle_speed_in == 0) return;
switch (gear_A + gear_B * 2 + gear_C * 4 + gear_D * 8 + gear_E * 16 ) {
case 1: // Gear A
gear = (high_gear != 0) ? 1 : 6;
break;
case 2: // Gear B
gear = (high_gear != 0) ? 2 : 7;
break;
case 4: // Gear C
gear = (high_gear != 0) ? 3 : 8;
break;
case 1: // Gear D
gear = (high_gear != 0) ? 4 : 9;
break;
case 1: // Gear E
gear = (high_gear != 0) ? 5 : 10;
break;
case else: // gear selection is bitmasked to be able to spot double-engagement
gear = 0;
}
if (spindle_speed_in >= min_speed(gear) && spindle_speed_in <= max_speed(gear)) {
motor_speed_out = spindle_speed_ * gear_ratio(gear);
spindle_enable_out = spindle_enable_in;
} else {
motor_speed_out = 0;
spindle_enable_out = 0;
}
}
Please Log in or Create an account to join the conversation.
13 Aug 2018 18:33 #116010
by tecno
Replied by tecno on topic Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
OK, thanks Andy for that. Now som questions.
Is this correct entries in HAL ?
How do I net following?
pin in bit high-gear;
pin in bit gear-A;
pin in bit gear-B;
pin in bit gear-C;
pin in bit gear-D;
pin in bit gear-E;
Is this correct entries in HAL ?
# gearbox input signals
# gearbox Hi/Lo
net high-gear <= hm2_7i76e.0.7i76.0.0.input-15
# gearbox A - B - C - D - E
net gear-A <= hm2_7i76e.0.7i76.0.0.input-10
net gear-B <= hm2_7i76e.0.7i76.0.0.input-11
net gear-C <= hm2_7i76e.0.7i76.0.0.input-12
net gear-D <= hm2_7i76e.0.7i76.0.0.input-13
net gear-E <= hm2_7i76e.0.7i76.0.0.input-14
How do I net following?
pin in bit spindle-enable-in;
pin out bit spindle-enable-out;
pin in float spindle-speed-in;
pin out float motor-speed-out;
pin in float gear.#.min-speed[10];
pin in float gear.#.max-speed[10];
pin in float gear.#.ratio[10];
Please Log in or Create an account to join the conversation.
13 Aug 2018 18:38 #116011
by andypugh
Replied by andypugh on topic Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
First of all, does that component even compile?
Secondly, your net statements in the code above will also need to mention the component pins. (I am not 100% sure what they will be called, probably gearblocker.0.gear-A and similar.
(Unless you change the component name, and you might want to)
And you might want "change up" and "change down" outputs too. Or an output to display the suggested gear.
Secondly, your net statements in the code above will also need to mention the component pins. (I am not 100% sure what they will be called, probably gearblocker.0.gear-A and similar.
(Unless you change the component name, and you might want to)
And you might want "change up" and "change down" outputs too. Or an output to display the suggested gear.
Please Log in or Create an account to join the conversation.
13 Aug 2018 18:47 #116012
by tecno
Replied by tecno on topic Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
Ahh, will give a try tomorrow to see if it compiles.
Please Log in or Create an account to join the conversation.
14 Aug 2018 09:39 #116026
by tecno
Replied by tecno on topic Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
Sorry No-Go
bengt@debian:~/linuxcnc$ halcompile gearblocker.comp
Traceback (most recent call last):
File "/usr/bin/halcompile", line 1353, in <module>
main()
File "/usr/bin/halcompile", line 1322, in main
process(f, mode, outfile)
File "/usr/bin/halcompile", line 1192, in process
a, b = parse(filename)
File "/usr/bin/halcompile", line 417, in parse
a, b = f.split("\n;;\n", 1)
ValueError: need more than 1 value to unpack
bengt@debian:~/linuxcnc$
Obviously I am doing something wrong but what?
bengt@debian:~/linuxcnc$ halcompile gearblocker.comp
Traceback (most recent call last):
File "/usr/bin/halcompile", line 1353, in <module>
main()
File "/usr/bin/halcompile", line 1322, in main
process(f, mode, outfile)
File "/usr/bin/halcompile", line 1192, in process
a, b = parse(filename)
File "/usr/bin/halcompile", line 417, in parse
a, b = f.split("\n;;\n", 1)
ValueError: need more than 1 value to unpack
bengt@debian:~/linuxcnc$
Obviously I am doing something wrong but what?
Please Log in or Create an account to join the conversation.
14 Aug 2018 10:05 #116027
by andypugh
Much more likely to be my fault. I typed that component on a Windows PC in my lunch break.
The problem is that halcompile is not finding the ;; separator.
Specifically, it is looking for \n;;\n (newline, two semi colons, newline)
There is a ;; in the file, but it turns out to be wrapped in Windows-style CR / LF sequences. I have fixed this. The attached file should work well enough to find the next problem.
Replied by andypugh on topic Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
Obviously I am doing something wrong but what?
Much more likely to be my fault. I typed that component on a Windows PC in my lunch break.
The problem is that halcompile is not finding the ;; separator.
Specifically, it is looking for \n;;\n (newline, two semi colons, newline)
There is a ;; in the file, but it turns out to be wrapped in Windows-style CR / LF sequences. I have fixed this. The attached file should work well enough to find the next problem.
Please Log in or Create an account to join the conversation.
Moderators: cmorley
- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.
Time to create page: 0.131 seconds