- Posts: 19311
- Thank you received: 4655
NoJo wrote: Then connect joint.2.index-enable to the encoder index-enable
Not sure how to do this - where/what is 'encoder index-enable' ?
Yes.Do you mean remove set S spindle-index-enable ?
Please Log in or Create an account to join the conversation.
andypugh wrote:
NoJo wrote:
Code:net spindle-index-enable joint.2.index-enable net spindle-index-enable pid.c.index-enable
Shows still how little I understand...
I tried 'almost' that in the file, but swapped like so
net joint.2.index-enable spindle-index-enable
as you sort of had that sentence order in your comment:
Then connect joint.2.index-enable to the encoder index-enable...
And it gave an error about same name pins...
Ok, I have the files set as I think you want, but am sure I still have something incorrect.
The behaviour now -
Do HOME ALL - All axes home, C rotates slowly to index and stops ( is it the index position?)
Then in MDI, do M100
> gives error = 'must be in joint mode or disabled to un-home'
Then M101, and spin the axis in manual - M03 S100 M05.
The M100 > C oscillates wildly, and goes back to the C DRO position that was set before the M101. The axis is not 'homed' .
and > gives error = 'must be in joint mode or disabled to un-home'
Hal file section:Code:#******************* # AXIS C JOINT 2 #******************* setp pid.c.Pgain [JOINT_2]P setp pid.c.Igain [JOINT_2]I setp pid.c.Dgain [JOINT_2]D setp pid.c.bias [JOINT_2]BIAS setp pid.c.FF0 [JOINT_2]FF0 setp pid.c.FF1 [JOINT_2]FF1 setp pid.c.FF2 [JOINT_2]FF2 setp pid.c.deadband [JOINT_2]DEADBAND setp pid.c.maxoutput [JOINT_2]MAX_OUTPUT setp pid.c.error-previous-target true net c-pos-cmd => pid.c.command net spindle-revs scale.degrees.in setp scale.degrees.gain 360 net spindle-degrees scale.degrees.out => pid.c.feedback net c-output pid.c.output => mux2.0.in1 net spindle-index-enable joint.2.index-enable net spindle-index-enable pid.c.index-enable # Here we setup to start machine in C_Axis mode setp pid.c.enable 1 setp mux2.0.sel 1 net c-pos-cmd <= joint.2.motor-pos-cmd joint.2.motor-pos-fb net c-vel-cmd <= joint.2.vel-cmd
INI Section:Code:#****************************************** #-# Add Axis C [AXIS_C] MAX_VELOCITY = 1440.0 #was 360 MAX_ACCELERATION = 12000.0 #was 3000 MIN_LIMIT = -3600 MAX_LIMIT = 3600 [JOINT_2] TYPE = ANGULAR HOME = 0 FERROR = 1.0 MIN_FERROR = .1 MAX_VELOCITY = 1440 MAX_ACCELERATION = 12000 P =0.1 I = 0.0 D = 0.0 FF0 = 0.0 FF1 = 0.0027777 FF2 = 0.0 BIAS = 0.0 DEADBAND = 0.05 MAX_OUTPUT = 400 MIN_LIMIT = -3600 MAX_LIMIT = 3600 HOME_OFFSET = 0.000000 HOME_SEARCH_VEL = 0.0 HOME_LATCH_VEL = 50 HOME_SEQUENCE = 1 HOME_USE_INDEX = 1 #******************************************
M100 Script:Code:#! /bin/bash halcmd setp pid.c.enable 1 halcmd setp mux2.0.sel 1 halcmd setp halui.joint.2.unhome 1 sleep 1 halcmd setp halui.joint.2.unhome 0 halcmd setp joint.2.home 1 sleep 1 halcmd setp joint.2.home 0
M101 ScriptCode:#! /bin/bash halcmd setp pid.c.enable 0 halcmd setp mux2.0.sel 0
Please Log in or Create an account to join the conversation.
NoJo wrote: Shows still how little I understand...
I tried 'almost' that in the file, but swapped like so
net joint.2.index-enable spindle-index-enable
More likely I have something incorrect, actually.Ok, I have the files set as I think you want, but am sure I still have something incorrect.
The behaviour now -
Do HOME ALL - All axes home, C rotates slowly to index and stops ( is it the index position?)
Then in MDI, do M100
> gives error = 'must be in joint mode or disabled to un-home'
Please Log in or Create an account to join the conversation.
NoJo wrote: Do HOME ALL - All axes home, C rotates slowly to index and stops ( is it the index position?)
Please Log in or Create an account to join the conversation.
andypugh wrote:
NoJo wrote: Do HOME ALL - All axes home, C rotates slowly to index and stops ( is it the index position?)
Should be. Does it look like it?
You can make it move faster by changing the [JOINT_2]LATCH_VELOCITY
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.