Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.

More
8 years 2 months ago #116219 by Hakan

tecno wrote: Hmmm looking at .comp we have this

case 1: // Gear E
gear = (high_gear != 0) ? 5 : 10;
break;

Should it not be like this then? Hi gear is 5 and Lo gear is 10 right?

setp gearblocker.0.gear.10.min-speed 80

Sure somebody will correct us ;)

Think you found a bug there.
This is one of those areas where it is soo easy to make a problem. Index starting at 0 or 1.
Uhhm. I think you can replace the whole case-switch block with
Code:
gear = input_1 + 2*input_B + 3*input_C + 4*input_D + 5*input_E + 5*high_gear -1;
This will directly calculate the engaged gear. You promise only one of the input_ABCDE is engaged at any given time?
The -1 is to make the indexing into speed_max, etc zero-based.

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

More
8 years 2 months ago #116220 by Hakan

tecno wrote: Is this correct?

Code:
#GearShift Lo # E gear setp gearblocker.0.gear-E.min-speed 80 setp gearblocker.0.gear-E.max-speed 160 setp gearblocker.0.gear-E.ratio 0.064 # D gear setp gearblocker.0.gear-D.min-speed 160 setp gearblocker.0.gear-D.max-speed 270 setp gearblocker.0.gear-D.ratio 0.108 # C gear setp gearblocker.0.gear-C.min-speed 270 setp gearblocker.0.gear-C.max-speed 450 setp gearblocker.0.gear-C.ratio 0.18 # B gear setp gearblocker.0.gear-B.min-speed 450 setp gearblocker.0.gear-B.max-speed 750 setp gearblocker.0.gear-B.ratio 0.3 # A gear setp gearblocker.0.gear-A.min-speed 750 setp gearblocker.0.gear-A.max-speed 1250 setp gearblocker.0.gear-A.ratio 0.5 #GearShift Hi #B gear setp gerablocker.0.high_gear.gear-B.min-speed 1250 setp gerablocker.0.high_gear.gear-B.max-speed 11500 setp gearblocker.0.high_gear.gear-B.ratio 0.6 #A gear setp gerablocker.0.high_gear.gear-A.min-speed 1250 setp gerablocker.0.high_gear.gear-A.max-speed 11500 setp gearblocker.0.high_gear.gear-A.ratio 1


You can test in a hal file to see if the syntax is correct.
But there are no pins called what you write above. Didn't it work in the way I wrote it?

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

More
8 years 2 months ago #116228 by andypugh
On holiday and on the phone, so quoting is difficult.

The gears probably are switched,yes. As i explained I did it at lunchtime in a widows pc at work. It is entirely untested.

There are other ways to do it. I chose the switch block to explicitly reject invalid gear selections.
The single line calculation returns gear 5 if both B and C are selected. And that seems something to reject.

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

More
8 years 2 months ago #116242 by tecno
Relax and have fun on your holiday.

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

More
8 years 2 months ago #116243 by tecno
So down in my shop and trying to install linuxcnc-dev but no-go in my Mint installation. Need to get my comp file working.

Any clues what can be wrong?

sudo apt-get install linuxcnc-dev is what I try to use

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

More
8 years 2 months ago #116246 by tecno
Hmmm appears o be installed but again errors

bengt@CombiMll ~/linuxcnc/configs/CM_GEARBOX $ sudo halcompile --compile gearbox3.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


Can you guys see what is wrong in the comp file

File Attachment:

File Name: gearbox3.comp
File Size:1.67 KB


Cheers
Bengt

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

Moderators: cmorley
Time to create page: 0.193 seconds
Powered by Kunena Forum