Spindle Step/Dir servo ramp down before stop on M stop command.

More
15 May 2021 16:43 #208928 by NoJo

Is C showing a "homed" marker in the DRO at this point?


Yes, X,Z and C have the little marker left of the axis letter.

I think that this is just Axis GUI behaviour. If you switch to the MDI window then the machine is put in MDI mode. You can only jog in Manual mode. Just switching to the Manual tab is probably enough to re-enable jogging.


You are correct ( partially?) -
went to test again just to be sure -
Home all - home marker present on all three - X and Z physically moved to the home sensor, etc. C axis did not move.
X and Z axes all jog manually ok

However - jogging the C axis with the handwheel causes the C axis DRO to increment/decrement ). The axis itself does not move - it is not enabled) - I apologize for this - the axis DRO does jog, the axis itself does not - I had intimated both did not work.

Then MDI screen selected - Axes still jog OK with handwheels as above.
Then M100 - now no axes jog with handwheels anymore.
Go to Manual screen - All axes jog again, now C moves as well, since it is in M100.
Back to MDI screen - all Axes still jog OK.
Then do M101
Now no axes jog anymore.
Go back to manual screen and X and Z axes jog fine again, C DRO works, with C axis not moving ( not active - M101)

I misled you in saying the 'axis' does not jog - the DRO 'jogs' , but the axis does not move if it is not enabled..

I will try the pid.c.maxoutput fix and let you know what happens..I think that is neat!

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

More
15 May 2021 17:50 - 15 May 2021 18:26 #208939 by RBC
Hi Nojo-
I am working on a similar system with success with some glitches. (The delays are not always preventing a follow error. )
I am using a MESA 7i92 board.
I have M101 (to switch to C mode)
#!/bin/bash
#SWITCHES TO ANGLE MODE

halcmd setp hm2_7i92.0.stepgen.04.position-reset 1
sleep 1
halcmd setp hm2_7i92.0.stepgen.04.position-reset 0
sleep 1
halcmd unlinkp hm2_7i92.0.stepgen.04.velocity-cmd
halcmd net c-output hm2_7i92.0.stepgen.04.velocity-cmd
halcmd net c-pos-fb joint.4.motor-pos-fb
halcmd net c-pos-fb hm2_7i92.0.stepgen.04.position-fb

and M102 (switch back to spindle mode)
#!/bin/bash
# SWITCHES TO SPINDLE MODE
halcmd unlinkp hm2_7i92.0.stepgen.04.velocity-cmd
halcmd unlinkp joint.4.motor-pos-fb
halcmd unlinkp hm2_7i92.0.stepgen.04.position-fb
halcmd net spindle-mode spindle-ramp.out hm2_7i92.0.stepgen.04.velocity-cmd
Last edit: 15 May 2021 18:26 by RBC.

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

More
15 May 2021 18:15 #208947 by andypugh

halcmd setp hm2_7i92.0.stepgen.04.position-reset 1


This is the easy way to prevent a large error on switchover, but it has the disadvantage of not giving a repeatable zero for the C axis.

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

More
15 May 2021 18:20 #208948 by andypugh

Then MDI screen selected - Axes still jog OK with handwheels as above.
Then M100 - now no axes jog with handwheels anymore.


This sounds very much like M100 puts the system in Auto mode. I am afraid that that is stock behaviour and not easy to work around.

You could _try_ adding
halcmd setp halui.mode.manual 0
sleep 1
halcmd setp halui.mode.manual 1
at the end of the M100 and M101 scripts. That might help, but I can't guarantee it.



[quote[Go to Manual screen - All axes jog again, now C moves as well, since it is in M100.[/quote]


I had a lathe with a joypad and it used to annoy me that I had to switch to the manual tab to use it.

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

More
15 May 2021 18:30 #208949 by RBC
That is true. I am trying to see if I can modify the mesa stepgen.c to turn the C to 360 position before resetting.
Also, in stepgen.c, I am working to wait before executing the position-reset action.

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

More
15 May 2021 18:58 #208957 by RBC
Is it possible to use any programming statements in these M101 files.
Like Do loops or if statements. ?

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

More
15 May 2021 20:36 - 15 May 2021 20:39 #208971 by PCW

halcmd setp hm2_7i92.0.stepgen.04.position-reset 1


This is the easy way to prevent a large error on switchover, but it has the disadvantage of not giving a repeatable zero for the C axis.


This can be avoided by using an index input and stepgen index

If LinuxCNCs motion comp could be asked to rehome a joint including
the part where it forces its commanded joint position to equal the current
joint feedback position, this would be easier.
Last edit: 15 May 2021 20:39 by PCW.

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

More
16 May 2021 00:28 - 16 May 2021 00:29 #209013 by RBC
Indexing:
It seems to me that this indexing can be done in the Mesa firmware. This way we wont have to add a hardware encoder/indexer to the motor. In my case, I am using a teknic servo, and it does not/cannot miss a step, and does not have available encoder outputs. The only output it has is the fault output, which I connected to a fault input of the joint. It aborts if motor goes above its limits.

Following Errors on switch over:
Somehow, I need to add a loop to wait until joint speed is 0 and execute the position-reset. Adding arbitrary delays here and there works for some cases, and does not work for others.
I have tried this using a M201 in remap.py without much success.
Last edit: 16 May 2021 00:29 by RBC.

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

More
16 May 2021 00:56 #209016 by PCW
If you are not using a physical index, no firmware support is needed
you would just make a simulated index component in hal
The following user(s) said Thank You: RBC

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

More
16 May 2021 01:30 - 16 May 2021 01:56 #209018 by RBC
I tried to add similar functionality in stepgen.c. It was not able to update fast enough to be useful.
I will look into creating a hal component.
Last edit: 16 May 2021 01:56 by RBC.

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

Time to create page: 0.104 seconds
Powered by Kunena Forum