ATC Project - Debug phase

More
4 years 6 months ago #239578 by spumco
[LCNC 2.9, Probe Basic GUI (python3 branch), Mesa 7i76ED]

All,

Starting a tool changer build and could use some assistance with the LCNC side of things.  Maybe the mechanical stuff, too, but I think I've got that figured out.

Here's the plan:
  • Design - bog-standard carousel disk arrangement
  • Disk rotation - stepper motor controlled by Mesa 7i76 in pulse/dir mode.
  • Carriage slide - 2-way air cylinder
  • Spindle - encoder w/index, connected 1:1 via belt.
    • Encoder & index already connected to Mesa.
    • Motor driven by VFD
    • VFD has no internal homing or positioning functions.
  • Drawbar - pneumatic PDB
    • Air valve is currently connected to Mesa through a relay
    • Cylinder has a piston position sensor connected to Mesa
    • Working fine now manually (both sensor and actuation)
  • Sensors - separate PNP-NC for each of
    • PDB Cylinder up (tool clamped)
    • Slide in
    • Slide out
    • Disk index/home (one pulse per rev)
    • Disk position (one pulse per slot)
First question: Anyone see anything I'm missing on the hardware or sensor side?

As far as LCNC goes, I'm planning to use the ORIENT and CAROUSEL components.  I've browsed through a few sample configs posted here and I think I've got a very basic idea.

Second question - how do I connect the CAROUSEL pins to the joint pins in HAL?  Or is there no joint?  I'm unclear on the basic scheme of connecting CAROUSEL to the Mesa step outputs.  I sort of get using a couple of relays connected to carousel.N.motor-fwd or carousel.N.motor-rev pins for a 'dumb' DC motor, but the connections from "T1M6" to the stepper drive inputs is hazy.

Third question: should I be using some other Lcnc control scheme than CAROUSEL?

Note - I have no idea how to code anything in python or C or other computer language, and I'm very reluctant to expend time & energy stumbling through yet another foreign language.  Yes, I'm sure it's insanely powerful but I've got limited brainpower.  I kinda understand HAL now, a little Classic Ladder, and G-code - that's about it.

Comments & suggestions are most welcome.

-Ralph

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

More
4 years 6 months ago - 4 years 6 months ago #239605 by andypugh

Second question - how do I connect the CAROUSEL pins to the joint pins in HAL?  Or is there no joint?

There is no joint.

I'm unclear on the basic scheme of connecting CAROUSEL to the Mesa step outputs.  I sort of get using a couple of relays connected to carousel.N.motor-fwd or carousel.N.motor-rev pins for a 'dumb' DC motor, but the connections from "T1M6" to the stepper drive inputs is hazy.


Use a stepgen in velocity mode, and then wire the carousel.N.motor-vel to stepgen.N.velocity-cmd
Adjust the speed with the fwd-dc and rev-dc pins of carousel.
Last edit: 4 years 6 months ago by andypugh.
The following user(s) said Thank You: spumco

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

More
4 years 6 months ago #239610 by spumco
Replied by spumco on topic ATC Project - Planning phase
Very helpful Andy.

I'm sure I'll be back with more questions as I get to the bench testing phase.

-R

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

More
4 years 5 months ago #242996 by spumco
Replied by spumco on topic ATC Project - Planning phase
I've got the mechanicals done to the point where I'm working on the HAL side of the ATC.

Having a bit of a struggle finding an example of a simple velocity mode stepgen arrangement.  There are plenty of control-type "1" examples for axis/joints (PnCconf does a nice job), but I can't seem to find a basic example to use for simple FWD/REV in the carousel function.

I've got this from my A-axis section of HAL:

setp   [HMOT](CARD0).stepgen.03.dirsetup        [JOINT_3]DIRSETUP
setp   [HMOT](CARD0).stepgen.03.dirhold         [JOINT_3]DIRHOLD
setp   [HMOT](CARD0).stepgen.03.steplen         [JOINT_3]STEPLEN
setp   [HMOT](CARD0).stepgen.03.stepspace       [JOINT_3]STEPSPACE
setp   [HMOT](CARD0).stepgen.03.position-scale  [JOINT_3]STEP_SCALE
setp   [HMOT](CARD0).stepgen.03.step_type        0
setp   [HMOT](CARD0).stepgen.03.control-type     1
setp   [HMOT](CARD0).stepgen.03.maxaccel         [JOINT_3]STEPGEN_MAXACCEL
setp   [HMOT](CARD0).stepgen.03.maxvel           [JOINT_3]STEPGEN_MAXVEL


Do I just replace the [JOINT...} INI file values with values right in HAL, then add:

net Carousel-vel      <= carousel.0.motor-vel
net Carousel-vel      => [HMOT](CARD0).stepgen.03.velocity-cmd

Missing anything?

-R

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

More
4 years 5 months ago #243118 by andypugh

Do I just replace the [JOINT...} INI file values with values right in HAL,

You can do that, or add your own INI entries and reference those in the HAL.

net Carousel-vel      <= carousel.0.motor-vel
net Carousel-vel      => [HMOT](CARD0).stepgen.03.velocity-cmd



Looks right.
The following user(s) said Thank You: spumco

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

More
4 years 5 months ago #243124 by spumco
Replied by spumco on topic ATC Project - Debug phase
WOO!

It's spinning now - very satisfying.

I'm doing basic testing now, no toolghange.ngc or remap yet. Just manually triggering the various hardware bits to check function and I've encountered the next problem:

The carousel is index mode, so according to the document triggering carousel.0.enable starts a homing routine.  It should then start rotating until both the index and pulse pins go high and then it stops and considers that location to be pocket 1.

M64 P0 starts the rotation, and carousel.0.enable goes high, but the carousel just keep rotating forever.  Both sense-0 and sense-1 go high each time it rotates past, but it doesn't seem to conclude the homing process.

carousel.0.ready goes high the first time sense-0 and sense-1 go high
carousel.0.active goes high whenever it's rotating
carousel.0.current-position changes to 1 after the first sense-0 & -1 trigger.

M68 E0 Qnnn changes carousel.pocket-number, but it still keep rotating.

Is this a hal mis-wire or a misunderstanding on my part on how it's supposed to work?

HAL snippet:
Warning: Spoiler!

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

Time to create page: 0.112 seconds
Powered by Kunena Forum