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

More
8 years 1 month ago #117257 by tecno

Hakan wrote: Yes you are right, the table looks ok, although I just checked the two first gears
The message you get, can that be that the message is "off by one" gear?
If so you can change the numbering either in hal or in the comp, but maybe try in the hal file?


Can you see anything why High-Gear is not working = nothing to VFD.
Maybe the comp is needed to be changed and not hal.

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

More
8 years 1 month ago #117284 by tecno

tecno wrote: Always better with another pair of eyes, suspected 1step off.

Will dive into this tomorrow, thanks for the help HÃ¥kan always appreciated.

Assuming you are following the election as everybody else in Sweden.


OK, I think I have found the error

actual = (gear_high * 0x40 + motor_high * 0x20

these two are flipped and should be motor_high * 0x40 + gear_high * 0x20

Look in table here forum.linuxcnc.org/39-pncconf/33069-help...ing?start=590#116905

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

More
8 years 1 month ago #117289 by tecno
Edited comp file

int speeds[15] = {0, 125, 160,

Deleted 80 so now first gear goes from 0 to 125 (I can live with that ;) )

All gears work up to 1000rpm (not running at correct speeds that I have to tune) with gear settings.

But all gears over 1000rpm involve motor to be set at high speed does not work.

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

More
8 years 1 month ago #117294 by tecno
It looks like this with not correct spindle rpm. S160 shows up in gmoccapy as 158 and in reality 74.2rpm




File Attachment:

File Name: GB_2speed_...-10.comp
File Size:1.44 KB

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

More
8 years 1 month ago #117296 by tecno

tecno wrote: Edited comp file

int speeds[15] = {0, 125, 160,

Deleted 80 so now first gear goes from 0 to 125 (I can live with that ;) )

All gears work up to 1000rpm (not running at correct speeds that I have to tune) with gear settings.

But all gears over 1000rpm involve motor to be set at high speed does not work.


This must be the problem == No output for motor-high

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 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";


How can this be solved? Not interested to have a manual switch for this if possible to have it in comp/hal.

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

More
8 years 1 month ago #117305 by tecno
How do I tie motor-high to get output ?

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 motor-high;

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[15] = {0, 125, 160, 215, 270, 360, 450, 595, 750, 1000, 1191, 1500, 2500, 0x1P30};
int reqd_gear[15] = {0x0, 0x01, 0x21, 0x02, 0x22, 0x04, 0x24, 0x08, 0x28, 0x10, 0x48, 0x68, 0x50, 0x70, 0x0};

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 < 14; i++);
gear_required = reqd_gear;
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;
}
}

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

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