- Posts: 1931
- Thank you received: 394
Calling subroutine from mdi?
- newbynobi
- Offline
- Moderator
-
Less
More
9 years 11 months ago #83491
by newbynobi
Replied by newbynobi on topic Calling subroutine from mdi?
Hallo Hakan,
sorry for the late reply, I am very bussy theese days.
What happen if you enter in the MDI window something like
Does the spindle speed change like it should?
I do not understand, why it works in Axis and not in gmoccapy, as both GUI uses the same interpreter and IMHO do handle the MDI commands in a identical way.
Norbert
sorry for the late reply, I am very bussy theese days.
What happen if you enter in the MDI window something like
Code:
G0 X 100
S 275 M3
G96 D2500 S250
G1 X10
Does the spindle speed change like it should?
I do not understand, why it works in Axis and not in gmoccapy, as both GUI uses the same interpreter and IMHO do handle the MDI commands in a identical way.
Norbert
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 1317
- Thank you received: 454
9 years 11 months ago #83510
by Hakan
Replied by Hakan on topic Calling subroutine from mdi?
Yes this works as expected.
Then I wrote the commands as a subroutine and called that. Didn't work. Constant speed.
But I found out what is going on. I put in a G4 P10 after the static rpm command
to read out the rpm from the vfd - and after that the subroutine worked!?
Can it be that the spindle must be up to speed when the G96 command comes.
Why it isn't I don't know. There is a spindle-vfd.at-speed connected to motion.spindle-at-speed
in custom.hal. Perhaps that is not enough?
When I run the small command suite as a subroutine call in the MDI the speedup fails every time.
When I run it as a regular file it works every time.
When I run command by hand in MDI, the spindle speeds up as expected.
I put in a G4 P30 in the MDI and had time to enter the small command suite.
Result: Spindle didn't speedup as it should.
My assumption is the commands where then executed immediately after the G4.
So there is something with timing of commands, or many commands in a row.
Or spindle-at-speed?
Tried again with Axis - worked fine also with G4 P30.
Then I wrote the commands as a subroutine and called that. Didn't work. Constant speed.
But I found out what is going on. I put in a G4 P10 after the static rpm command
to read out the rpm from the vfd - and after that the subroutine worked!?
Can it be that the spindle must be up to speed when the G96 command comes.
Why it isn't I don't know. There is a spindle-vfd.at-speed connected to motion.spindle-at-speed
in custom.hal. Perhaps that is not enough?
When I run the small command suite as a subroutine call in the MDI the speedup fails every time.
When I run it as a regular file it works every time.
When I run command by hand in MDI, the spindle speeds up as expected.
I put in a G4 P30 in the MDI and had time to enter the small command suite.
Result: Spindle didn't speedup as it should.
My assumption is the commands where then executed immediately after the G4.
So there is something with timing of commands, or many commands in a row.
Or spindle-at-speed?
Tried again with Axis - worked fine also with G4 P30.
Please Log in or Create an account to join the conversation.
- newbynobi
- Offline
- Moderator
-
Less
More
- Posts: 1931
- Thank you received: 394
9 years 11 months ago #83533
by newbynobi
Replied by newbynobi on topic Calling subroutine from mdi?
Hallo Hakan,
I found the bug!
It is related with the spindle speed label, I found a solution, but it is only a work around.
I will push as soon as possible.
Norbert
I found the bug!
It is related with the spindle speed label, I found a solution, but it is only a work around.
I will push as soon as possible.
Norbert
Please Log in or Create an account to join the conversation.
- newbynobi
- Offline
- Moderator
-
Less
More
- Posts: 1931
- Thank you received: 394
9 years 11 months ago #83534
by newbynobi
Replied by newbynobi on topic Calling subroutine from mdi?
Solved with gmoccapy 2.1.6.1,
Just pushed to master.
Solutions for 2.6 and 2.7 branch will follow soon!
Norbert
Just pushed to master.
Solutions for 2.6 and 2.7 branch will follow soon!
Norbert
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 1317
- Thank you received: 454
9 years 11 months ago - 9 years 10 months ago #83537
by Hakan
Replied by Hakan on topic Calling subroutine from mdi?
Yes, confirmed. Works fine now.
Thanks!
Edit: Lathemacros now works fine.
NICE!
Thanks!
Edit: Lathemacros now works fine.
NICE!
Last edit: 9 years 10 months ago by Hakan. Reason: Addes result from test of lathemacros
Please Log in or Create an account to join the conversation.
Moderators: newbynobi, HansU
Time to create page: 0.520 seconds