4th Axis rotation angle limit problem

More
07 Nov 2017 21:01 #101507 by andypugh
What isn't working? It looks basically OK.

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

More
07 Nov 2017 22:40 - 07 Nov 2017 22:41 #101509 by eFalegname
Hi Andy
Thanks for your prompt answer. I use the Iso experimental version debian stretch, when linuxcnc doesn't reboot there is not error window that tells what problems there are. After I compile the custom.hal file with mux component linuxcnc doesn't run anymore and I can't see what is the problem. Please take a look to the files I attached because I can't find my errors.
Thank you
Floris
Last edit: 07 Nov 2017 22:41 by eFalegname.

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

More
07 Nov 2017 23:10 #101510 by andypugh
If you start Linuxcnc from the command line (command "linuxcnc") then you should get at least _some_ output giving a hint as to the nature of the problem.

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

More
07 Nov 2017 23:52 - 07 Nov 2017 23:56 #101511 by eFalegname
Hi Andy
I did as you told me. The errors were these two lines below
net astep <= stepgen.3.step
net adir <= stepgen.3.dir
disconnecting these two functions linuxcnc started as normal (I don't try to run it on the cnc yet)
setp stepgen.3.position-scale [AXIS_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 1
setp stepgen.3.dirhold 27000
setp stepgen.3.dirsetup 27000
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb
################################################
 #net astep <= stepgen.3.step
 #net adir <= stepgen.3.dir
################################################
net aenable axis.3.amp-enable-out => stepgen.3.enable

I have another question, how can I command the rpm of the A axis with M66 P0 ?
Thanks very much for your time and dedication
Last edit: 07 Nov 2017 23:56 by eFalegname.

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

More
08 Nov 2017 00:03 #101512 by andypugh

I have another question, how can I command the rpm of the A axis with M66 P0 ?
Thanks very much for your time and dedication


You ned something like
net a-vel-cmd motion.analogout-00 => stepgen.4.velocity-cmd

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

More
09 Nov 2017 17:17 - 09 Nov 2017 17:37 #101573 by eFalegname
Hi Andy,
sorry for bothering you again mate, let me know please where I'm failing:
1- M64 P0 from MDI windows turns the velocity mode ON,
2- then I write M68 E0 Q20000 code and pass the speed value 20000,
3- save the value of the parameter #5399 in the variable #1 (#1=#5399),
4- at this point I type A#1, or whatever else and A axis doesn't move anymore...
I don't know how to spin the 4th axis, please help me.
Floris

PS: I added:
net a-vel-cmd motion.analog-out-00 => stepgen.4.velocity-cmd
to my .hal configuration
Last edit: 09 Nov 2017 17:37 by eFalegname.

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

More
09 Nov 2017 23:26 #101583 by andypugh
Is the stepgen enabled?

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

More
10 Nov 2017 10:34 #101590 by eFalegname
Good morning Andy!
I added the enable signal to my "3rd axis" and now the 4th axis is alive:
setp stepgen.3.position-scale [AXIS_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 1
setp stepgen.3.dirhold 27000
setp stepgen.3.dirsetup 27000
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb
######################################################################
net aenable axis.3.amp-enable-out => stepgen.3.enable stepgen.4.enable
######################################################################

###########################################
setp stepgen.4.position-scale [AXIS_4]SCALE
setp stepgen.4.steplen 1
setp stepgen.4.stepspace 1
setp stepgen.4.dirhold 27000
setp stepgen.4.dirsetup 27000
setp stepgen.4.maxaccel [AXIS_4]STEPGEN_MAXACCEL
net a-vel-cmd motion.analog-out-00 => stepgen.4.velocity-cmd
############################################################

I have another one problem to resolve,
I type the following command in the MDI windows:
1- M64 P0, active the speed mode
2- M68 E0 Q2000,command the speed value to the axis
3- M65 P0, I turn off the axis and switch to the position mode
4- M64 P0, I active again the speed mode, and the stepping motor suddenly and always stall
5- Anytime I type (debug, #5399) the answer is 0
6- At this point any other Q value of M68 I write on the MDI does not change the speed of the motor that remains blocked, to restore all this I have to restart my Linuxcnc

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

More
10 Nov 2017 10:58 #101592 by andypugh
I think this is likely to be due to the stepgen accel rates. What happens if you do M68 E0 Q0 before switching to position mode, and then only set the speed after switching to velocity mode?

The robust way to do this is probably to only enable each stepgen when the corresponding mode is active. Then the stepgens will ramp up speed inside their own limits.

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

More
10 Nov 2017 11:42 - 10 Nov 2017 11:58 #101596 by eFalegname
Yes, M68 E0 Q0 works, but I can't do any velocity changes before M65.
I changed my settings without succes:
setp stepgen.3.position-scale [AXIS_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 1
setp stepgen.3.dirhold 27000
setp stepgen.3.dirsetup 27000
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb
net aenable axis.3.amp-enable-out => stepgen.3.enable


setp stepgen.4.position-scale [AXIS_4]SCALE
setp stepgen.4.steplen 1
setp stepgen.4.stepspace 1
setp stepgen.4.dirhold 27000
setp stepgen.4.dirsetup 27000
setp stepgen.4.maxaccel [AXIS_4]STEPGEN_MAXACCEL
net a-vel-cmd motion.analog-out-00 => stepgen.4.velocity-cmd
####################
sept stepgen.4.enable 1
####################

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?
Last edit: 10 Nov 2017 11:58 by eFalegname.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum