- Posts: 1635
- Thank you received: 595
Schaublin 125-CNC retrofit.
- RotarySMP
- Offline
- Platinum Member
-
Less
More
2 years 10 months ago #289192
by RotarySMP
Replied by RotarySMP on topic Schaublin 125-CNC retrofit.
This joystick only mechanically allows single axis jogging. No diagonal. I wanted it like that.
Cheers,
Mark
Cheers,
Mark
The following user(s) said Thank You: spumco, smc.collins
- RotarySMP
- Offline
- Platinum Member
-
Less
More
- Posts: 1635
- Thank you received: 595
2 years 9 months ago #290084
by RotarySMP
Anyone have any input on why the Gmoccapy spindle override doesn't work CCW? I guess could add an abs comp in the signal change before passing off the rpm to Gmoccapy.
What about the turtle jog behavior? I don't see a way to switch the behavior to default to turtle, and need the button held to rabbit jog fast. That seems safer than the current behavior.
Replied by RotarySMP on topic Schaublin 125-CNC retrofit.
Anyone have any input on why the Gmoccapy spindle override doesn't work CCW? I guess could add an abs comp in the signal change before passing off the rpm to Gmoccapy.
What about the turtle jog behavior? I don't see a way to switch the behavior to default to turtle, and need the button held to rabbit jog fast. That seems safer than the current behavior.
- spumco
- Offline
- Platinum Member
-
Less
More
- Posts: 2180
- Thank you received: 905
2 years 9 months ago #290127
by spumco
Replied by spumco on topic Schaublin 125-CNC retrofit.
Mark,
I think you're on the right track for SRO, but it might help if you posted your hal/config for the spindle, but maybe try this for turtle jog:
First thing to check is if pin gmoccapy.jog.turtle-jog is high or low on startup. (halshow)
The use setp in post-gui hal to set it to the state you want. If you can't setp because it's already connected to the matrix key, use sets on the signal and maybe need to connect to the matrix-not pin.
Something to think about... I assume you'll be using your joystick to jog continuous (mostly). Do you really want to require a two-handed rapid jog?
This is obviously personal preference, but I think I'd either set up a toggle for the turtle/rabbit, or I'd disable to turtle/rabbit and set up a multiswitch component with 3 or 4 jog percentages and cycle through them with the momentary.
Starts up at 5% of max_vel, then 25%, then 50%, and loops back to 10% (or whatever you want)
I think you're on the right track for SRO, but it might help if you posted your hal/config for the spindle, but maybe try this for turtle jog:
First thing to check is if pin gmoccapy.jog.turtle-jog is high or low on startup. (halshow)
The use setp in post-gui hal to set it to the state you want. If you can't setp because it's already connected to the matrix key, use sets on the signal and maybe need to connect to the matrix-not pin.
Something to think about... I assume you'll be using your joystick to jog continuous (mostly). Do you really want to require a two-handed rapid jog?
This is obviously personal preference, but I think I'd either set up a toggle for the turtle/rabbit, or I'd disable to turtle/rabbit and set up a multiswitch component with 3 or 4 jog percentages and cycle through them with the momentary.
Starts up at 5% of max_vel, then 25%, then 50%, and loops back to 10% (or whatever you want)
The following user(s) said Thank You: RotarySMP
- RotarySMP
- Offline
- Platinum Member
-
Less
More
- Posts: 1635
- Thank you received: 595
2 years 8 months ago #294116
by RotarySMP
Replied by RotarySMP on topic Schaublin 125-CNC retrofit.
Hi All,
I am struggling with variable assignment in Classic ladder, and would appreciate help with some syntax please.
As I have a back gear and the variator in my lathe drive train, and neither has feedback, but need the gear ratio for S words in G-code to map to the correct VFD control voltage, I need to calculate the gear ratio. Since I can infer motor speed, and measure spindle speed, the ratio can be calculated in real time.
This can be calculated based on VFD commanded frequency (in volts, multiplied by a constant for RPM, (lets call it C= 60 for now)), divided by spindle encoder RPM out.
If I do it in classic ladder, I can have this gear ratio calculated at the servo thread rate. I intend to net this calculated ratio to the scale.gear.gain variable, so that G-Code can command an S speed, and actually get that speed set.
Inputs:
The encoder readout of spindle speed (RPM) is netted to classicladder.0.floatin-00 which is %IF0 within the ladder interface.
The spindle speed command output voltage (0-10V) to the VFD is netted to classicladder.0.floatin-01 which is %IF1 within the ladder interface.
Output:
%QF0 is classicladder.0.floatout-00
I am struggling to get classic ladder to do the math within the variable assignment box.
%QF0=%IF0 works.
%QF0=%IF1/IF0 errors. The helpful error message is that I need @xx/yy@, symbols around the calculation.
%QF0=5/10 seems to work though.
%QF0=@%IF0/%IF1@ converts to %B0300/0%B1300/1?? (question marks are also from classic ladder)
Does anyone know the syntax to perform division on the values of two variables within classic ladders "#assignment" box please? I have reread and reread the docs but it says nothing about the use of the @.
Thanks
Mark
I am struggling with variable assignment in Classic ladder, and would appreciate help with some syntax please.
As I have a back gear and the variator in my lathe drive train, and neither has feedback, but need the gear ratio for S words in G-code to map to the correct VFD control voltage, I need to calculate the gear ratio. Since I can infer motor speed, and measure spindle speed, the ratio can be calculated in real time.
This can be calculated based on VFD commanded frequency (in volts, multiplied by a constant for RPM, (lets call it C= 60 for now)), divided by spindle encoder RPM out.
If I do it in classic ladder, I can have this gear ratio calculated at the servo thread rate. I intend to net this calculated ratio to the scale.gear.gain variable, so that G-Code can command an S speed, and actually get that speed set.
Inputs:
The encoder readout of spindle speed (RPM) is netted to classicladder.0.floatin-00 which is %IF0 within the ladder interface.
The spindle speed command output voltage (0-10V) to the VFD is netted to classicladder.0.floatin-01 which is %IF1 within the ladder interface.
Output:
%QF0 is classicladder.0.floatout-00
I am struggling to get classic ladder to do the math within the variable assignment box.
%QF0=%IF0 works.
%QF0=%IF1/IF0 errors. The helpful error message is that I need @xx/yy@, symbols around the calculation.
%QF0=5/10 seems to work though.
%QF0=@%IF0/%IF1@ converts to %B0300/0%B1300/1?? (question marks are also from classic ladder)
Does anyone know the syntax to perform division on the values of two variables within classic ladders "#assignment" box please? I have reread and reread the docs but it says nothing about the use of the @.
Thanks
Mark
- spumco
- Offline
- Platinum Member
-
Less
More
- Posts: 2180
- Thank you received: 905
2 years 8 months ago #294129
by spumco
Replied by spumco on topic Schaublin 125-CNC retrofit.
Mark,
Don't know if this helps, but I also had problems with variable syntax.
As displayed in the ladder view when it first opens, variables appear as such (my spindle speed interlock example)
But if I open the editor, select modify, then select the variable, the following is displayed in the Properties pop-up
i.e. no extra % signs. The first one doesn't work if i paste that in to the editor, but the second one does.
So maybe try:
And disregard the @ symbols.
I've also discovered some sort of bug in Ladder that causes it to crash when I click on a vairable without the editor open... but I suspect that may be related to my particular installation if you're not experiencing similar problems.
[url] forum.linuxcnc.org/25-classicladder/5165...dder-crashing#293056 [/url]
Don't know if this helps, but I also had problems with variable syntax.
As displayed in the ladder view when it first opens, variables appear as such (my spindle speed interlock example)
%ABS(%IF0)<1%
But if I open the editor, select modify, then select the variable, the following is displayed in the Properties pop-up
ABS(%IF0)<1
i.e. no extra % signs. The first one doesn't work if i paste that in to the editor, but the second one does.
So maybe try:
%QF0=(%IF1)/(%IF0)
And disregard the @ symbols.
I've also discovered some sort of bug in Ladder that causes it to crash when I click on a vairable without the editor open... but I suspect that may be related to my particular installation if you're not experiencing similar problems.
[url] forum.linuxcnc.org/25-classicladder/5165...dder-crashing#293056 [/url]
The following user(s) said Thank You: RotarySMP
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
2 years 8 months ago #294174
by cmorley
Replied by cmorley on topic Schaublin 125-CNC retrofit.
Also keep in mind floats are truncated to S32 internally
so 1.6 internally will be 1
If you need the fractional part, then you could multiply everything by a hundred or a thousand before the calculation and divide by the same after.
so 1.6 internally will be 1
If you need the fractional part, then you could multiply everything by a hundred or a thousand before the calculation and divide by the same after.
The following user(s) said Thank You: RotarySMP
Moderators: piasdom
Time to create page: 0.433 seconds