4th Axis rotation angle limit problem

More
10 Nov 2017 13:03 #101599 by andypugh

I have not idea on how to enable each signal of the "[AXIS_4]" only with the velocity mode, maybe I have to add "stepgen.4.enable" to the mux function? Should I change the value of the signals to 0 and activate them with the mux function?


I would need to see the HAL to be sure how to do it, but I think that, ideally, you would want
stepgen.3.enable = axis.a.amp-enable AND position-mode
stepgen.4.enable = axis.a.amp-enable AND velocity-mode

So, certainly, a bit-style mux2 for each is an option, but you could also do it with and2 components.
If you don't have a position-mode (I suspect that is simple NOT velocity mode?) then you will need the HAL "not" component if you use the "and2" approach.

I would be tempted to set the stepgen_maxaccel for the velocity stepgen to quite a low value for smooth spindle-mode ramping.

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

More
10 Nov 2017 13:54 #101603 by eFalegname

I would need to see the HAL to be sure how to do it

Here you have my configuration files:

File Attachment:

File Name: custom_2017-11-10.hal
File Size:1 KB

File Attachment:

File Name: custom_pos...1-10.hal
File Size:0 KB

File Attachment:

File Name: XYZA-T_201...10-3.hal
File Size:4 KB

File Attachment:

File Name: XYZA-T_201...10-3.ini
File Size:3 KB
Attachments:

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

More
11 Nov 2017 00:11 #101635 by andypugh
Something like this (i decided to use mux2). I think there is a 40% chance I enable the stepgens the wrong way round,
Attachments:

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

More
11 Nov 2017 06:48 - 11 Nov 2017 06:51 #101639 by eFalegname
In this way it works also I can change now the rpm values. Thank you so much Andy!

There are still some safety tips to do. The problem is that when I turn off LinuxCNC and the fourth axis is working in velocity mode it remains "ON" and continues to turn without any control,

Then is there some way to zeroing the spindle speeds with the M65 command? so that at the next start on the velocity mode M64, the axis does not start run immediately with the previously setted speed without any further waiting for the speed control.

How can I stop the axis revolutions with a smooth spindle-mode ramping?
Last edit: 11 Nov 2017 06:51 by eFalegname.

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

More
11 Nov 2017 10:33 #101651 by andypugh
What you are asking for now is a little more complicated, because you would need to delay the switch to position mode until the velocity mode has ramped down.

I think that the best way to do this is with completely different logic :-)

You could use a "near" HAL component to enable position mode any time that the velocity command is zero _and_ the velocity feedback is zero. In some ways this is more convenient, as you would only need the M68 command, and no need to use the digital pins to switch.

I don't have time to look at this in detail now, I will try to look at it this evening.

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

More
11 Nov 2017 11:59 - 11 Nov 2017 13:11 #101653 by eFalegname
Wooow, Awesome solution! You are the best!!!
don't worry master, take your time, I thank you very much for the fact that you are giving me a hand in what otherwise I alone would have never solve. I mean, hats off to you.
Last edit: 11 Nov 2017 13:11 by eFalegname.

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

More
11 Nov 2017 21:48 #101671 by andypugh
I am away from home this weekend, and I think I need a linuxcnc machine to work this out on.

It might be best to use a limit2 HAL function on the velocity command rather than rely on the stepgen built-in limits. Then we only need to check one value for non-zero before switching to velocity mode, or out of velocity mode.

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

More
14 Nov 2017 13:59 #101778 by eFalegname
Hi Andy
Do you have any news for me? where you able to verify on a linuxcnc pc?
thanks for sharing your knowledge
Floris

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

More
15 Nov 2017 00:40 #101811 by andypugh
Sorry, I find myself rather over committed. To the extent that I am thinking about taking a couple of days of work to get on with all the stuff I have promised people I will do for them.

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

More
16 Nov 2017 00:29 #101869 by andypugh
Try this:
For extra fun set the velocity stepgen accel rate really low in the iNI and see how feed is inhibited as it slows down.
Attachments:
The following user(s) said Thank You: eFalegname

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

Time to create page: 0.218 seconds
Powered by Kunena Forum