Laser control via 7i76e - PPI / PPMM / PWM

More
27 Jul 2019 19:54 - 27 Jul 2019 19:56 #140763 by SjCNC
I've recently added a Chinese 15w diode laser to my CNC.

Current test mode consists of : start the program, plug the laser in, watch program run, unplug the laser...

I know, I know, smh... So obviously, any insight would be greatly appreciated!

Machine info:
HP Compaq 8300 Elite USDT PC
LinuxCNC 2.7.14 | Debian 9
Mesa 7i76e
Ox derivative homebrew 3 axis + Chinese 4th/5th axis)
Currently using NEMA 23 steppers, parts on hand to upgrade NEMA 34 closed loop steppers
Currently using DeWalt spindle, parts on hand to upgrade Nakanishi ATC spindle

Laser info:
15w pulsed, average 5.9w max
TTL
0v - off
5v - open
PWM frequency - <9 kHz

link to laser: www.ebay.com/itm/450nm-15W-Blue-Laser-Mo...p2057872.m2749.l2649

Since I'm using all 5 step/dir, and intend to use the spindle PWM in the near future for the ATC, I'm wondering if there's a good way to pulse the laser via the 7i76e field I/O. I've read several threads that almost point me in the right direction, but I'm still at a loss. Thanks in advance for any insight!
Last edit: 27 Jul 2019 19:56 by SjCNC. Reason: rambling italics, operator error

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

More
27 Jul 2019 20:08 #140765 by Todd Zuercher
It probably would be better to use a pwm set up on one of the two expansion headers on the 7i76e.

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

More
27 Jul 2019 20:40 #140767 by SjCNC
Can those be treated as though it's an LPT port, mapping the PWM to one of the pins? Or is it explicitly to extend via a daughtercard?

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

More
27 Jul 2019 21:00 - 27 Jul 2019 21:16 #140769 by PCW
You need to have firmware that has a PWM generator on one of the expansion connectors

EDIT
I just made this bitfile for someone with a 7I78 on the expansion connector,
this just happens to have one PWM generator on P1 ( not necessarily on the most convenient pin )

freeby.mesanet.com/7i76e_7i76x1_7i78x1D.bit
Last edit: 27 Jul 2019 21:16 by PCW.

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

More
27 Jul 2019 21:21 #140772 by SjCNC
I was going to ask if there's a comprehensive guide for the firmware, but I'll graciously dig into the freeby! thanks PCW!

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

More
08 Aug 2019 11:52 #141666 by SjCNC
Well, I'm glad I didn't just ask for a solution right away... I've learned quite a bit trying to solve this on my own, and expanded my circumference of ignorance ;)

The threads I've gotten the most insight out of are emcoturn , laser control using PWM , PWM depending on z axis value , secondary spindle on 7i76e , and the one for Frankenlab... not able to find the link at the moment...

They've all been pretty insightful. I've been top to bottom on all of them (and then some), and went through attached hal and ini looking for solutions... Some examples use parport, then there's hardware vs software PWM, then there's pwm on 4th axis as opposed to expansion port...

At the end of my rope, and ready to ask for help again.

The firmware flash was incredibly simple, thanks PCW. Is the firmware you provided hardware or software based? I've seen a few threads where you mention different hal implementation based on hw/sw. And how to best implement it in hal? What are the pin associations for the expansion ports? This is where I've found the least information...

I've not attached hal/ini because over the past couple of weeks I've ended up with several iterations with varied results. Best result so far is seeing varied output on 'analogout' while running tommylight's elizabeth-hurl.ngc, but I don't have analogout mapped to the expansion port...

Thanks in advance for any insight.
The following user(s) said Thank You: tommylight

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

More
08 Aug 2019 12:10 #141670 by tommylight
Basicaly it goes like this
Net some_signal_name some_function_or_pin some_other_function_or_pin
Some signal name can be any name you like laser_power
Some function or pin has to be something that exists in hal, like pwm_output
Some other function or pin is something that exists in hal to be connected to the above, like parport_pin_7 to be connected to the above pwm_output.

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

More
08 Aug 2019 12:50 #141673 by SjCNC
That seems to be my stumbling block... how does parport_pin_7 equate to 7i76e_expansion_port_pin_1?

I've seen the convention of a single reference i.e. hm2_7i76e.0.stepgen...

and the convention of a double reference i.e. hm2_7i76e.0.7i76.0.0.output...

And for the life of me I can't find info about 'wiring' a hal pin to an expansion port pin

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

More
08 Aug 2019 13:21 #141676 by tommylight
7i76e manual has them listed, but they can change with different firmware.
Use mesaflash to list the pins.

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

More
08 Aug 2019 15:56 #141691 by PCW

That seems to be my stumbling block... how does parport_pin_7 equate to 7i76e_expansion_port_pin_1?


For simple I/O the parallel port pins map to GPIO pins.
The correspondence of parallel port pins/connectors to
GPIO hal pins is as tommylight indicated, listed by the mesaflash utility:
mesaflash --device 7I76e --addr 10.10.10.10 --readhmid

I've seen the convention of a single reference i.e. hm2_7i76e.0.stepgen...

and the convention of a double reference i.e. hm2_7i76e.0.7i76.0.0.output...


These references are different because the first refers to hardware (a stepgen)
in the 7I76Es FPGA, but the second refers to a connected SSerial device
(the isolated field I/O section) For example, if you had a 7I73 control panel
interface connected to the 7I76E's SSerial expansion connector, you would have pins like:

hm2_7i76e.0.7i73.0.1.enc0
The following user(s) said Thank You: tommylight, SjCNC

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

Moderators: snowgoer540
Time to create page: 0.196 seconds
Powered by Kunena Forum