Python Interface SPINDLE_FORWARD - rpm ignored
- fletch
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 131
- Thank you received: 69
22 May 2023 18:33 #271955
by fletch
Python Interface SPINDLE_FORWARD - rpm ignored was created by fletch
I'm on a vanilla v2.8.4 heavily using the Python Interface for the Manualmatic Pendant and all works pretty much as expected, except.. every so often when calling this command:
the rpm specified is ignored and substituted with the one from gmoccpy. This occurs every 5-10 starts, with (it would seem) no particular pattern. I can change the specified rpm, leave it the same, start/stop the spindle frequently, infrequently or sporadically and the result is the same: the specified rpm is ignored.
Am I missing a 'reset' or some such command (I am setting the spindle override to 1 first) that will prevent this?
I've posted this in 'General' but please move to a more appropriate category if required.
self.lc.spindle(self.linuxcnc.SPINDLE_FORWARD, rpm, 0)
the rpm specified is ignored and substituted with the one from gmoccpy. This occurs every 5-10 starts, with (it would seem) no particular pattern. I can change the specified rpm, leave it the same, start/stop the spindle frequently, infrequently or sporadically and the result is the same: the specified rpm is ignored.
Am I missing a 'reset' or some such command (I am setting the spindle override to 1 first) that will prevent this?
I've posted this in 'General' but please move to a more appropriate category if required.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7776
- Thank you received: 2073
23 May 2023 02:41 #271991
by cmorley
Replied by cmorley on topic Python Interface SPINDLE_FORWARD - rpm ignored
Sounds like gmoccapy might be overriding your commands sometimes.
undoubtedly a race condition.
Hard to say for sure without digging in deep to gmoccapy code.
undoubtedly a race condition.
Hard to say for sure without digging in deep to gmoccapy code.
Please Log in or Create an account to join the conversation.
- fletch
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 131
- Thank you received: 69
23 May 2023 08:16 #272008
by fletch
Replied by fletch on topic Python Interface SPINDLE_FORWARD - rpm ignored
Thank you for your reply Chris - I was afraid you'd (also) say that.
I'm not sure why gmoccapy would issue a spindle control command without *any* interaction with the gmoccapy interface - it is a little concerning that it would/could do so.
This feels like it is worthy of a bug report?
I'm not sure why gmoccapy would issue a spindle control command without *any* interaction with the gmoccapy interface - it is a little concerning that it would/could do so.
This feels like it is worthy of a bug report?
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7776
- Thank you received: 2073
24 May 2023 01:18 #272064
by cmorley
Replied by cmorley on topic Python Interface SPINDLE_FORWARD - rpm ignored
Well I'm really guessing based on your comment that it uses Gmoccapy's spindle speed - I'm not sure how you confirmed that.
Please Log in or Create an account to join the conversation.
- fletch
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 131
- Thank you received: 69
25 May 2023 12:06 #272146
by fletch
Replied by fletch on topic Python Interface SPINDLE_FORWARD - rpm ignored
My 'logic' was based on the spindle starting at the same RPM as specified in gmoccapy's prefs file (via the Settings->Hardware->Starting RPM option) - the DEFAULT_SPINDLE_SPEED is not present in my ini file (as it s in the sims).
I will try to write a Python script to replicate the issue. In the mean time, I just shouted at it:
Not going to pretend I'm happy using the sleep() but it's better than the spindle spinning too fast for the edge finder!
I will try to write a Python script to replicate the issue. In the mean time, I just shouted at it:
if ( self.ls.spindle[0]["direction"] == 0 ):
#Hit it twice or it'll start at gmoccapy default!!!
self.lc.spindle(self.linuxcnc.SPINDLE_FORWARD, float(rpm), 0)
time.sleep(0.12)
self.lc.spindle(self.linuxcnc.SPINDLE_FORWARD, float(rpm), 0)
Not going to pretend I'm happy using the sleep() but it's better than the spindle spinning too fast for the edge finder!
Please Log in or Create an account to join the conversation.
Time to create page: 0.079 seconds