ebox.comp for gearbox 2speed
18 Oct 2023 12:06 #283224
by SOLD
and see the Hal show relay1 = will be 1 when M3S >= 1500 relay1 = will be 0, correct as desired.
I also noticed that when I ordered the M3S2000 it would spin immediately. without stopping and waiting to change gears
Or if increasing speed from S1000-S2000 with GUI relay1 will work on S1500. which means It changes gears as it spins.
As mentioned I still need to study more. before actually using it
If you have a guide, please suggest it. I'm new to this.
Thank you for following.
Replied by SOLD on topic ebox.comp for gearbox 2speed
I connectandypugh โพสต์ = 283218 รหัสผู้ใช้ = 723ส่วนประกอบทำสิ่งที่คุณต้องการจริง ๆ หรือไม่?
net spindle-vel-cmd-rpm ebox.spindle-speed <= spindle.0.speed-out
I also noticed that when I ordered the M3S2000 it would spin immediately. without stopping and waiting to change gears
Or if increasing speed from S1000-S2000 with GUI relay1 will work on S1500. which means It changes gears as it spins.
As mentioned I still need to study more. before actually using it
If you have a guide, please suggest it. I'm new to this.
Thank you for following.
Please Log in or Create an account to join the conversation.
18 Oct 2023 12:18 #283225
by andypugh
Replied by andypugh on topic ebox.comp for gearbox 2speed
I have no guide, and my only understanding of what it does is from re-reading the code.
What do you actually require it to do?
What do you actually require it to do?
The following user(s) said Thank You: SOLD
Please Log in or Create an account to join the conversation.
18 Oct 2023 12:26 #283226
by SOLD
Replied by SOLD on topic ebox.comp for gearbox 2speed
Or maybe I neglected the connection?
pin in spindle-on-in
pin out spindle-on-out
Therefore, the spindle does not stop turning before changing.
pin in spindle-on-in
pin out spindle-on-out
Therefore, the spindle does not stop turning before changing.
Please Log in or Create an account to join the conversation.
18 Oct 2023 12:28 #283227
by andypugh
Replied by andypugh on topic ebox.comp for gearbox 2speed
Yes, you will need to route the spindle-on connection through the component for it to be able to turn the spindle off to change gear.
The following user(s) said Thank You: SOLD
Please Log in or Create an account to join the conversation.
18 Oct 2023 12:29 #283228
by SOLD
Replied by SOLD on topic ebox.comp for gearbox 2speed
Need relay signal 1 Go to turn on the air cylinder to change the gear.I have no guide, and my only understanding of what it does is from re-reading the code.
What do you actually require it to do?
Please Log in or Create an account to join the conversation.
18 Oct 2023 12:31 #283229
by SOLD
Replied by SOLD on topic ebox.comp for gearbox 2speed
Got it, I'll get back to making it right.Yes, you will need to route the spindle-on connection through the component for it to be able to turn the spindle off to change gear.
Please Log in or Create an account to join the conversation.
26 Oct 2023 05:16 - 26 Oct 2023 06:42 #283842
by SOLD
Replied by SOLD on topic ebox.comp for gearbox 2speed
ฉันกำหนดเส้นทางการเชื่อมต่อสปินเดิลผ่านส่วนประกอบ
When the spindle is on ,ebox.0.spindle-on-in is activated. But the spindle-out pin doesn't respond.
I edit the ebox.comp( spindle_on_out = 1; )The ebox.0.spindle-on-out and spindle-enable pin is always active.
I have no knowledge of basic C Please suggest how to fix this problem.
Thank.
loadrt ebox
addf ebox.0 servo-thread
net spindle-vel-cmd-rpm <= spindle.0.speed-out => ebox.0.spindle-speed
#net spindle-enable <= spindle.0.on
net spindle-enable.ebox <= spindle.0.on
net spindle-enable.ebox => ebox.0.spindle-on-in
net spindle-enable <= ebox.0.spindle-on-out
I edit the ebox.comp( spindle_on_out = 1; )The ebox.0.spindle-on-out and spindle-enable pin is always active.
I have no knowledge of basic C Please suggest how to fix this problem.
Thank.
Last edit: 26 Oct 2023 06:42 by SOLD.
Please Log in or Create an account to join the conversation.
26 Oct 2023 09:41 - 26 Oct 2023 09:46 #283851
by andypugh
Replied by andypugh on topic ebox.comp for gearbox 2speed
I see the problem, the component does a check for a change in the spindle speed:
But it never updates the "last_speed" so this comparison always returns "false" so the code continues and the timer is set back to 2000.
Try this version.
// Only do anything if the spindle speed has changed
if ( fabs(spindle_speed - last_speed) < 50) return;
But it never updates the "last_speed" so this comparison always returns "false" so the code continues and the timer is set back to 2000.
Try this version.
component ebox "electronic gearbox component";
license "GPL";
pin in bit spindle-on-in;
pin out bit spindle-on-out;
pin in float spindle-speed;
pin out bit relay1;
pin out bit relay2;
pin out bit relay3;
function _;
include "rtapi_math.h";
;;
FUNCTION(_){
static int timer;
static double last_speed = -100;
if (timer > 0){
timer -= 1;
spindle_on_out = 0;
} else {
spindle_on_out = spindle_on_in;
}
// Only do anything if the spindle speed has changed
if ( fabs(spindle_speed - last_speed) < 50) return;
last_speed = spindle_speed;
if (spindle_speed >= 1500 ){
relay1 = 0;
relay2 = 0;
relay3 = 0;
spindle_on_out = 0;
timer = 2000;
} else {
relay1 = 1;
relay2 = 0;
relay3 = 0;
spindle_on_out = 0;
timer = 2000;
}
}
Last edit: 26 Oct 2023 09:46 by andypugh.
The following user(s) said Thank You: SOLD
Please Log in or Create an account to join the conversation.
26 Oct 2023 09:44 #283852
by andypugh
Replied by andypugh on topic ebox.comp for gearbox 2speed
I still don't know if this component does what you need, you haven't really given an adequate specification.
It only ever changes the state of one relay
It won't ever change gear with slowly-changing speed requests (this might be good, as it avoids changes during constat-surface speed operations)
It only ever changes the state of one relay
It won't ever change gear with slowly-changing speed requests (this might be good, as it avoids changes during constat-surface speed operations)
The following user(s) said Thank You: SOLD
Please Log in or Create an account to join the conversation.
26 Oct 2023 11:33 - 26 Oct 2023 12:04 #283856
by SOLD
Replied by SOLD on topic ebox.comp for gearbox 2speed
Requirements of the gear shifting system: alternating gear teeth between low gear 10:40 and high gear 100:75 with an air cylinder.
I thought of the process.
1. Connect spindle.0.on to the spindle-on-in pin.
2. Check RPM from spindle encoder. whether it is 0 or not. If not, wait until it is 0 and then continue.
3. Read speed from spindle-speed pin. If less than or equal to 2000, relay 1 output = 1 to open the air cylinder, push the gear down, wait 4 seconds and check the sensor 1 input. Read the value as 1 or not. If not 1 then display a warning message and cancel and if it is 1 then spindle-on-out pin =1.
4.. Read speed from spindle-speed pin. If more than 2000, relay 1 output = 0 to open the air cylinder, push the gear up, wait 4 seconds and check the sensor 2 input. Read the value as 1 or not. If not 1 then display a warning message and cancel and if it is 1 then spindle-on-out pin =1.
I will use 1 relay and let NC = cylinder pull up, NO = cylinder push down.
Sorry, my reply may be glitchy and delayed. I had to use translate.google.
I thought of the process.
1. Connect spindle.0.on to the spindle-on-in pin.
2. Check RPM from spindle encoder. whether it is 0 or not. If not, wait until it is 0 and then continue.
3. Read speed from spindle-speed pin. If less than or equal to 2000, relay 1 output = 1 to open the air cylinder, push the gear down, wait 4 seconds and check the sensor 1 input. Read the value as 1 or not. If not 1 then display a warning message and cancel and if it is 1 then spindle-on-out pin =1.
4.. Read speed from spindle-speed pin. If more than 2000, relay 1 output = 0 to open the air cylinder, push the gear up, wait 4 seconds and check the sensor 2 input. Read the value as 1 or not. If not 1 then display a warning message and cancel and if it is 1 then spindle-on-out pin =1.
I will use 1 relay and let NC = cylinder pull up, NO = cylinder push down.
Sorry, my reply may be glitchy and delayed. I had to use translate.google.
Last edit: 26 Oct 2023 12:04 by SOLD.
Please Log in or Create an account to join the conversation.
Time to create page: 0.109 seconds