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

More
8 years 1 month ago #117339 by tecno
Have modified comp to this
Code:
component GB_2speed; 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 out bit motorhighspeed; pin in bit gear-high; pin in bit motor-high; 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; pin out unsigned gear-required; pin out bit message-##[14]; license "gpl"; function _; ;; FUNCTION(_){ int actual, message, motor_max_speed; int i; // These need to be edited to suit the gearbox int speeds[13] = {0, 125, 160, 215, 270, 360, 450, 595, 750, 1000, 1191, 1500, 2500}; int reqd_gear[13] = {0x0, 0x01, 0x21, 0x02, 0x22, 0x04, 0x24, 0x08, 0x28, 0x10, 0x48, 0x68, 0x50, 0x70}; if (spindle_speed_in == 0) return; actual = (motor_high * 0x40 + gear_high * 0x20 + gear_A * 0x10 + gear_B * 0x08 + gear_C * 0x04 + gear_D * 0x02 + gear_E * 0x01); for (i = 0; spindle_speed_in > speeds[i] && i < 12; i++); gear_required = reqd_gear[i]; motorhighspeed = reqd_gear[i] & 0x40 ? 1 : 0; if (gear_required == actual && gear_required != 0x0){ // We are in the right gear spindle_enable_out = spindle_enable_in; if (motor_high) motor_max_speed = 2500; else motor_max_speed = 1850; motor_speed_out = motor_max_speed * (spindle_speed_in / speeds[i+1]); message = 0; } else { int j; motor_speed_out = 0; spindle_enable_out = 0; for (j = 0; j < 13; j++) { message(j) = 0; } message(i) = 1; } }


And this in hal
Code:
# Motor High net motor-high-signal <= GB-2speed.0.motorhighspeed net motor-high-signal => hm2_7i76e.0.7i76.0.0.output-10 net motor-high-signal => GB-2speed.0.motor-high

Will try to test maybe later today or tomorrow, any comments ?

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

More
8 years 1 month ago #117340 by andypugh
I have explained twice now that I don't think that an _output_ for motor high is a good idea. Instead the comp is written to use an _input_ that shows that motor-high is engaged.

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

More
8 years 1 month ago #117341 by tecno
So what you say is that it should be manually actuated?

If so then it is better to redo all and always have highspeed ON as I have used before. Just a bit worried if I get full torq at low speeds that really concerns me as I have seen the *dark side* of that destroying parts and tools when X and/or Y pushes on with spindle at halt.

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

More
8 years 1 month ago - 8 years 1 month ago #117353 by tecno
OK, here is a new table and comp file. Can you have look and see if there is any boo boos. Now 10 gears

Your browser does not support embedded PDFs. Please download the file here: Download PDF.

Last edit: 8 years 1 month ago by tecno. Reason: added data

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

More
8 years 1 month ago #117383 by tecno
Some typos edited but I get nothing out to VFD

File Attachment:

File Name: GB_3speed_...-12.comp
File Size:1.23 KB

File Attachment:

File Name: GB_3speed_...9-12.hal
File Size:19.33 KB


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

More
8 years 1 month ago - 8 years 1 month ago #117518 by andypugh
In the screenshot, it is waiting for you to satisfy the conditions specified in message 2 (Gear 33, ie 0x21)
Last edit: 8 years 1 month ago by andypugh.

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

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