Gantry machine progress

More
31 Jul 2017 09:12 #96731 by Yannis
Replied by Yannis on topic Gantry machine progres
i make this changes but i still

File Attachment:

File Name: my_LinuxCN...31-2.hal
File Size:14 KB
have error(how can i post the error message i try to copu it with no success
Attachments:

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

More
31 Jul 2017 09:15 - 31 Jul 2017 09:16 #96732 by andypugh
Replied by andypugh on topic Gantry machine progres

Hi
the A display issue solved
the problem now is to connect the y1 motor to the mesa board i try to copy the y (joint1) and edit the values
with no success
what i missing here?


You are close, but you need to edit things a bit more.

The second motor needs its own PID component. In the file you showed us the Y1 axis is trying to link to the Y PID.
You can, if you want, use the same PID gains for both sides of the gantry. This is likely to be correct and means you can't mis-match them.

I suggest, for clarity:
...
loadrt pid names=pid.x,pid.y0,pid.y1,pid.z,pid.s
...
#*******************
#  JOINT Y0
#*******************

setp   pid.y0.Pgain     [JOINT_1]P
setp   pid.y0.Igain     [JOINT_1]I
...

# ---PWM Generator signals/setup---

setp   hm2_5i25.0.7i77.0.1.analogout1-scalemax  [JOINT_1]OUTPUT_SCALE
setp   hm2_5i25.0.7i77.0.1.analogout1-minlim    [JOINT_1]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i77.0.1.analogout1-maxlim    [JOINT_1]OUTPUT_MAX_LIMIT

net y0-output                             => hm2_5i25.0.7i77.0.1.analogout1
net y0-pos-cmd    joint.1.motor-pos-cmd
net y0-enable     joint.1.amp-enable-out

#*******************
#  JOINT Y1
#*******************

setp   pid.y1.Pgain     [JOINT_1]P
setp   pid.y1.Igain     [JOINT_1]I
...

net y1-index-enable  <=> pid.y1.index-enable
net y1-enable        =>  pid.y1.enable
net y1-pos-cmd       =>  pid.y1.command
net y1-vel-cmd       =>  pid.y1.command-deriv
net y1-pos-fb        =>  pid.y1.feedback
net y1-output        =>  pid.y1.output

# ---PWM Generator signals/setup---

setp   hm2_5i25.0.7i77.0.1.analogout2-scalemax  [JOINT_1]OUTPUT_SCALE
setp   hm2_5i25.0.7i77.0.1.analogout2-minlim    [JOINT_1]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i77.0.1.analogout2-maxlim    [JOINT_1]OUTPUT_MAX_LIMIT

net y1-output                             => hm2_5i25.0.7i77.0.1.analogout2
net y1-pos-cmd    joint.2.motor-pos-cmd
net y1-enable     joint.2.amp-enable-out
Last edit: 31 Jul 2017 09:16 by andypugh.

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

More
31 Jul 2017 09:41 #96735 by Yannis
Replied by Yannis on topic Gantry machine progres
Attachments:

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

More
31 Jul 2017 09:48 #96736 by andypugh
Replied by andypugh on topic Gantry machine progres
./my_LinuxCNC_machine12-7.hal:168: "pid.y1.index-enable" does not exist.

This tells you that line 168 of the HAL file my_LinuxCNC_machine12-7.hal contains a reference to a pid.y1 pin that dos not exist.

So, why does that pin not exist? Have you changed the "loadrt" line to create a pid.y1 function?

Don't forget that you need a matching addf for the pid.y1 too.

If you make the edit I suggested then you will have pid.y0 and pid.y1 but _not_ pid.y. I think that this is a better idea as then you can't accidentally leave a pid.y in the wrong section of the HAL file without raising an error.

Don't worry about going through the files one error at a time. It is what I always end up doing with a new machine setup.

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

More
31 Jul 2017 09:59 #96738 by Yannis
Replied by Yannis on topic Gantry machine progres

File Attachment:

File Name: my_LinuxCN...31-4.hal
File Size:14 KB

File Attachment:

File Name: my_LinuxCN...31-4.hal
File Size:14 KB
Attachments:

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

More
31 Jul 2017 10:09 #96740 by Yannis
Replied by Yannis on topic Gantry machine progres
if i change the y to y0 i sud change it in all the y section??

setp pid.y.Pgain [JOINT_1]P
setp pid.y.Igain [JOINT_1]I
setp pid.y.Dgain [JOINT_1]D
setp pid.y.bias [JOINT_1]BIAS
setp pid.y.FF0 [JOINT_1]FF0
setp pid.y.FF1 [JOINT_1]FF1
setp pid.y.FF2 [JOINT_1]FF2
setp pid.y.deadband [JOINT_1]DEADBAND
setp pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.y.error-previous-target true

net y-index-enable <=> pid.y.index-enable
net y-enable => pid.y.enable
net y-pos-cmd => pid.y.command
net y-vel-cmd => pid.y.command-deriv
net y-pos-fb => pid.y.feedback
net y-output => pid.y.output

# ---PWM Generator signals/setup---

setp hm2_5i25.0.7i77.0.1.analogout1-scalemax [JOINT_1]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout1-minlim [JOINT_1]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout1-maxlim [JOINT_1]OUTPUT_MAX_LIMIT

net y-output => hm2_5i25.0.7i77.0.1.analogout1
net y-pos-cmd joint.1.motor-pos-cmd
net y-enable joint.1.amp-enable-out

# ---Encoder feedback signals/setup---

setp hm2_5i25.0.encoder.01.counter-mode 0
setp hm2_5i25.0.encoder.01.filter 1
setp hm2_5i25.0.encoder.01.index-invert 0
setp hm2_5i25.0.encoder.01.index-mask 0
setp hm2_5i25.0.encoder.01.index-mask-invert 0
setp hm2_5i25.0.encoder.01.scale [JOINT_1]ENCODER_SCALE

net y-pos-fb <= hm2_5i25.0.encoder.01.position
net y-vel-fb <= hm2_5i25.0.encoder.01.velocity
net y-pos-fb => joint.1.motor-pos-fb
net y-index-enable joint.1.index-enable <=> hm2_5i25.0.encoder.01.index-enable
net y-pos-rawcounts <= hm2_5i25.0.encoder.01.rawcounts

# ---setup home / limit switch signals---

net y-home-sw => joint.1.home-sw-in
net y-neg-limit => joint.1.neg-lim-sw-in
net y-pos-limit => joint.1.pos-lim-sw-in

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

More
31 Jul 2017 11:13 #96747 by andypugh
Replied by andypugh on topic Gantry machine progres

if i change the y to y0 i sud change it in all the y section??


Yes, I think that is the best way, it saves any confusion later.

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

More
31 Jul 2017 11:19 #96748 by Yannis
Replied by Yannis on topic Gantry machine progres

File Attachment:

File Name: my_LinuxCN...31-5.hal
File Size:14 KB
Attachments:

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

More
31 Jul 2017 11:50 #96752 by andypugh
Replied by andypugh on topic Gantry machine progres
You have both
net y1-pos-fb => joint.2.motor-pos-fb
and
net z-pos-fb => joint.2.motor-pos-fb

The rest of Z seems to be joint.3. so I think you need to make a couple of changes on lines 251 and 252.

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

More
31 Jul 2017 12:08 #96755 by Yannis
Replied by Yannis on topic Gantry machine progres

File Attachment:

File Name: my_LinuxCN...31-6.hal
File Size:14 KB
Attachments:

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

Time to create page: 0.438 seconds
Powered by Kunena Forum