Some questions about JA3 and gantrykins/probekins
28 Feb 2013 00:58 #30657
by alan_3301
Some questions about JA3 and gantrykins/probekins was created by alan_3301
I have started using LINUXCNC - 2.6.0~pre joints_axes.
I have modified my hal and ini using gantry_mm.hal and gantry_mm.ini as reference.
I will use probekins eventually, but to get things working I am using gantrykins with 3 joints. (My BOB does the job of slaving my secondary gantry motor)
The problem I have is with following errors. I am getting a lag between stepgen.X.position-cmd and stepgen.X.position-fb.
My question is where do I look for the link between the cmd and fb for each joint? I am using steppers open loop, so no feedback.
I am testing with my Z axis only to start, which is joint 2. These are the relevant lines in my hal file.
this is what was in the sample configI was getting movement on the screen in axis, but no motor movement, Im guessing because the stepgen wasn't used in these lines.
One thing I noticed is there is no base thread in the sample ini, I had to change all base_period params to servo_period to fix an error relating to base period.
I have since changed them back to base_period and can load without that error. Not sure what was up with that.
Other things I noticed and I'm not sure which way to go. In the sample config, there is a cycle_time specified in [DISPLAY],[TASK], and [EMCIO].
In INI that I have now, cycle_time is specified in [TRAJ],[TASK], and [EMCIO]
Also when I start up axis, I get the error, command (EMC_JOG_CONT) cannot be executed until the machine is out of E-stop and turned on
I have modified my hal and ini using gantry_mm.hal and gantry_mm.ini as reference.
I will use probekins eventually, but to get things working I am using gantrykins with 3 joints. (My BOB does the job of slaving my secondary gantry motor)
The problem I have is with following errors. I am getting a lag between stepgen.X.position-cmd and stepgen.X.position-fb.
My question is where do I look for the link between the cmd and fb for each joint? I am using steppers open loop, so no feedback.
I am testing with my Z axis only to start, which is joint 2. These are the relevant lines in my hal file.
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 15500
setp stepgen.2.dirsetup 15500
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable joint.2.amp-enable-out => stepgen.2.enable
net home-z => joint.2.home-sw-in
this is what was in the sample config
# loop position commands back to motion module feedback
#net Xpos joint.0.motor-pos-cmd => joint.0.motor-pos-fb
#net Ypos joint.1.motor-pos-cmd => joint.1.motor-pos-fb
#net Zpos joint.2.motor-pos-cmd => joint.2.motor-pos-fb
One thing I noticed is there is no base thread in the sample ini, I had to change all base_period params to servo_period to fix an error relating to base period.
I have since changed them back to base_period and can load without that error. Not sure what was up with that.
Other things I noticed and I'm not sure which way to go. In the sample config, there is a cycle_time specified in [DISPLAY],[TASK], and [EMCIO].
In INI that I have now, cycle_time is specified in [TRAJ],[TASK], and [EMCIO]
Also when I start up axis, I get the error, command (EMC_JOG_CONT) cannot be executed until the machine is out of E-stop and turned on
Please Log in or Create an account to join the conversation.
28 Feb 2013 04:51 #30660
by alan_3301
Replied by alan_3301 on topic Some questions about JA3 and gantrykins/probekins
Ok I think I am going to hold off on this indefinitely.
The reason I tried JA3 was to see if soft-limits worked, and probe tripped on jogs would stop motion.
Both of these behave the same as non-triv kins on 2.5.1, and there are a number of other problems I'd have to figure out.
I think the easy solution is to run my config that works for everyday stuff, and when I need probekins, I will be careful of my limits and probe on jogs.
It's too easy to get caught up in trying to do things that are way over my head.
Oh well..
The reason I tried JA3 was to see if soft-limits worked, and probe tripped on jogs would stop motion.
Both of these behave the same as non-triv kins on 2.5.1, and there are a number of other problems I'd have to figure out.
I think the easy solution is to run my config that works for everyday stuff, and when I need probekins, I will be careful of my limits and probe on jogs.
It's too easy to get caught up in trying to do things that are way over my head.
Oh well..
Please Log in or Create an account to join the conversation.
28 Feb 2013 20:29 #30675
by andypugh
These may be related.
In a stepper system you get a following error when the stepgen has not been called enough times between servo threads to make enough steps to get to the requested position. This typically happens when the base thread is too slow.
if your base thread is the servo thread, then it will be very much too slow indeed. You can only manage (at best) 1000 steps/sec. That's probably 75rpm with x4 microstepping.
The lag you are seeing may be related to the stepgen,,maxaccel being too low, that needs to be higher than the axis max accel to give some overhead.
Note that a non-trivial kinematics in World Mode will use the [TRAJ]DEFAULT_ACCELERATION parameter, not the axis value. So that value needs to both exist in the INI and be correct.
Replied by andypugh on topic Some questions about JA3 and gantrykins/probekins
My question is where do I look for the link between the cmd and fb for each joint? I am using steppers open loop, so no feedback.
One thing I noticed is there is no base thread in the sample ini, I had to change all base_period params to servo_period to fix an error relating to base period.
These may be related.
In a stepper system you get a following error when the stepgen has not been called enough times between servo threads to make enough steps to get to the requested position. This typically happens when the base thread is too slow.
if your base thread is the servo thread, then it will be very much too slow indeed. You can only manage (at best) 1000 steps/sec. That's probably 75rpm with x4 microstepping.
The lag you are seeing may be related to the stepgen,,maxaccel being too low, that needs to be higher than the axis max accel to give some overhead.
Note that a non-trivial kinematics in World Mode will use the [TRAJ]DEFAULT_ACCELERATION parameter, not the axis value. So that value needs to both exist in the INI and be correct.
Please Log in or Create an account to join the conversation.
01 Mar 2013 04:56 #30697
by alan_3301
Replied by alan_3301 on topic Some questions about JA3 and gantrykins/probekins
Hey, thanks for the response.
In my testing I had the base period set as 30000 with servo period as 1000000.
The sample config I looked at had DEFAULT_LINEAR_ACCEL and MAX_LINEAR_ACCEL defined in [TRAJ]
I will ad DEFAULT_ACCELERATION in [TRAJ] as see what happens.
I had reduced my aceleration values to very low compared to stepgen_maxacell and still had ferrors.
I probably wont try ja3 anymore as I wasn't able to adjust jog speeds, and a few other things I cant remember right now. The sample configs were a little confusing as some using gantrykins, used joint.0.blah and other used axis.0.blah.
In my testing I had the base period set as 30000 with servo period as 1000000.
The sample config I looked at had DEFAULT_LINEAR_ACCEL and MAX_LINEAR_ACCEL defined in [TRAJ]
I will ad DEFAULT_ACCELERATION in [TRAJ] as see what happens.
I had reduced my aceleration values to very low compared to stepgen_maxacell and still had ferrors.
I probably wont try ja3 anymore as I wasn't able to adjust jog speeds, and a few other things I cant remember right now. The sample configs were a little confusing as some using gantrykins, used joint.0.blah and other used axis.0.blah.
Please Log in or Create an account to join the conversation.
01 Mar 2013 07:19 #30700
by andypugh
www.linuxcnc.org/docs/html/config/ini_co...d_sub_traj_section_a
Makes no mention of DEFAULT_LINEAR_ACCEL and I can't find it anywhere in the code either.
Replied by andypugh on topic Some questions about JA3 and gantrykins/probekins
I will ad DEFAULT_ACCELERATION in [TRAJ] as see what happens.
www.linuxcnc.org/docs/html/config/ini_co...d_sub_traj_section_a
Makes no mention of DEFAULT_LINEAR_ACCEL and I can't find it anywhere in the code either.
Please Log in or Create an account to join the conversation.
Time to create page: 0.154 seconds