Driving a charge pump with a Mesa 5i25 stepgen

More
07 Feb 2022 22:13 #234297 by PCW
flat lined high or low?

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

More
07 Feb 2022 22:18 #234299 by PCW
Ack! I didn't look carefully at the hal file you posted

It has nothing setting x-enable at all (nor are any of the other stepgen axis enabled)

I would start with a pncconf created hal/ini file set,
there seems to be a lot missing from yours

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

More
07 Feb 2022 23:12 - 07 Feb 2022 23:13 #234304 by dbotos
The HAL file was based on one generated by pncconf (see attached for pnconf one).  I deleted out all the PID-related stuff because my system has no position feedback and the home / limit switch stuff because it doesn't have those either.  I also got rid of the "closed loop stepper signals" section for each joint, which looks like it was probably a mistake to do looking back at it now (I just saw closed loop and thought it didn't apply to my system).  Those sections look like:

# ---closedloop stepper signals---

net x-pos-cmd    <= joint.0.motor-pos-cmd
net x-vel-cmd    <= joint.0.vel-cmd
net x-output     <= [HMOT](CARD0).stepgen.00.velocity-cmd
net x-pos-fb     <= [HMOT](CARD0).stepgen.00.position-fb
net x-pos-fb     => joint.0.motor-pos-fb
net x-enable     <= joint.0.amp-enable-out
net x-enable     => [HMOT](CARD0).stepgen.00.enable

Also got rid of HALUI, coolant, probe, and toolchange sections toward the end.

But, the charge pump section still has the line

net x-enable => [HMOT](CARD0).stepgen.04.enable

So I'm not sure why that's not outputting.
Attachments:
Last edit: 07 Feb 2022 23:13 by dbotos.

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

More
07 Feb 2022 23:30 #234307 by PCW
Are you saying the that complete pncconf created file does not drive the chargepump? It should (though at 2500 Hz)

Your original hal file will not because x-enable is unconnected (not driven by any pin so always has the value of 0)

I would start with a pncconf created file and only change the chargepump frequency (it looks like pncconf calculates it wrong)

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

More
08 Feb 2022 01:17 - 08 Feb 2022 01:18 #234313 by dbotos
I went back and edited the pncconf-generated INI file as follows:

-commented out these lines:

#HALFILE = custom.hal
#POSTGUI_HALFILE = postgui_call_list.hal
#SHUTDOWN = shutdown.hal

-changed [KINS] and [TRAJ] coordinates to XYZY (were XYYZ)
-put joint 3 as Y2 and joint 2 as Z
-made step scale value for Y2 negative

And edited the pncconf-generated HAL file as follows :

-changed stepgen.04.position-scale and stepgen.04.velocity-cmd values to fix charge pump frequency
-removed toolchange, coolant, probe, HALUI, and home / limit switch sections (tried commenting out each section one at a time so I could see the effect)

The PID stuff is apparently important - if you comment that out, LinuxCNC will start up fine, the charge pump works, and you can home the axes, but the second you go to jog, it faults.  So that stuff should be left alone in the INI and HAL files.  The "closed loop stepper signals" sections in the HAL file should be left alone too.  Working INI and HAL files attached.

Once I was able to jog and issue MDI commands, there was only one thing left to check - the "spindle".  Grabbed my laser safety googles (and respirator) and was able to turn it on and off via MDI.  I loaded up an old nc file that I had for a wooden bracket and ran that on some scrap cardboard, which came out swimmingly.  See attached pic.

Lesson of the day is don't delete stuff you're not really sure about and if you are going to delete stuff, trying commenting one thing or section out at a time.

Thanks again for your help, Peter!
Attachments:
Last edit: 08 Feb 2022 01:18 by dbotos.

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

More
08 Feb 2022 05:28 - 08 Feb 2022 13:36 #234325 by dbotos
P.S. Other changes to the INI file that I forgot to list:

-got rid of kinstype=BOTH callout in [KINS] section
-added HOME_SEQUENCE values in each [JOINT_#] section:

joint 0 (X) --> 0
joint 1 (Y1) --> -2
joint 2 (Z) --> 1
joint 3 (Y2) --> -2

Negative for the Ys keeps them from being jogged independently in joint mode.  More info in section 8.3.6.10 of the 2.8.2 documentation .
Last edit: 08 Feb 2022 13:36 by dbotos.

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

More
10 Feb 2022 06:36 #234466 by HaroldH
Thank you for interesting post

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

More
07 Dec 2022 17:12 #258819 by COFHAL
I have a question: with the parallel port, can the frequency be generated with a stepgen, for Driving a charge pump?

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

More
07 Dec 2022 18:05 #258821 by PCW
Yes, you can run a stepgen in velocity mode to generate a square wave at a
selectable frequency.

man stepgen

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

More
07 Dec 2022 20:16 #258828 by COFHAL
Thanks for your answer, could you post a general example of how to do it?

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

Moderators: PCWjmelson
Time to create page: 0.107 seconds
Powered by Kunena Forum