Can this be done with a 7i96?

More
10 Feb 2021 17:14 #198298 by PCW
Replied by PCW on topic Can this be done with a 7i96?
The 7I96 can generate PWM that you can change at the servo thread rate (typically 1000 Hz)
If this is sufficient, the 7I96 should be able to do what you need.

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

More
10 Feb 2021 17:16 #198299 by andypugh
Have you had any success getting a PWM out of the Mesa card?
Did you try the bitfile that I suggested?
It should be trivial, PWM is something that they excel at.

You could consider using a Mesa card for step generation and a parallel card for PWM, but that _really_ should not be necessary.

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

More
13 Feb 2021 06:20 #198654 by oddwick
Ok so i think that i need to rephrase some of the things here because i think something is getting lost in translation!

i am getting pwm just fine from the mesa card.

Did you try the bitfile that I suggested?


i am using jt's setup app for the firmware and have it set as 4 step and 1 pwm. i have movement fine (xyy) and pwm works fine, although i do not know if it is actually controlling the lasers power because i can not get it to fire properly. when i run a job, it is either on or off, no in between.

what i was using was the configuration found here:
github.com/bjj/2x_laser i know it is older, but i have had alot of success with this for some years now. but now that i am using (or trying at any rate) to switch to a 7i96, i cant get my original configuration to work with my new card.

i use cambam as my cam and have a post that uses m3/4 to turn the laser on and off. m3 is ppi where S is the pulses per in and m4 is duty cycle where s is the power.

where i am stuck is with the config where the original had:
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf laserraster.0.make-pulses base-thread
addf laserfreq.0.make-pulses base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf laserraster.0.update servo-thread
addf laserfreq.0.update servo-thread
addf pwmgen.update servo-thread
because the mesa doesnt have a base-thread. the laserraser and laserfreq use the base-thread to generate the pulses. can i access the base thread with a mesa? and if so, will it be too fast to send to the card? according to the docs, the laser pulses ideal are at 3ms and anything less will be continuous at speed. surely that is just a fraction of the step rate, so i should be safe.

any ideas how i can consolidate these two configs?

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

More
13 Feb 2021 15:47 - 13 Feb 2021 15:48 #198685 by andypugh
Just delete these:
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread

addf stepgen.capture-position servo-thread
addf stepgen.update-freq servo-thread
addf pwmgen.update servo-thread


These are more complicated
addf laserraster.0.make-pulses base-thread
addf laserfreq.0.make-pulses base-thread
addf laserraster.0.update servo-thread
addf laserfreq.0.update servo-thread

laserfreq seems to be a version of pwmgen that varies the intensity depending on axis velocity.
This should be doable in other ways.

laserraster does not appear to be from the repository that you linked to.

You _can_ run a base thread with a Mesa card. And, you can even run a base thread and a parallel port alongside a Mesa card.

But, more typically, you would use the special fast-io read and write of the Mesa card:
addf hm2_7i96.0.read   servo-thread
addf hm2_7i96.0.read_gpio  base-thread
...
...
addf hm2_7i96.0.write  servo-thread
addf hm2_7i96.0.write_gpio  servo-thread

Where did you get laserraster from?
Last edit: 13 Feb 2021 15:48 by andypugh.

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

More
13 Feb 2021 15:57 #198686 by PCW
Replied by PCW on topic Can this be done with a 7i96?
I dont think you can really use a base thread with Ethernet cards, the per packet overhead is too high.
The following user(s) said Thank You: oddwick

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

More
14 Feb 2021 17:54 - 14 Feb 2021 17:55 #198819 by oddwick

Just delete these

right now i have those commented out just so it will load without errors. i was unsure if the pwmgen was necessary for the laserfreq and laserraster.

Where did you get laserraster from?


laserraster comes from a fork of the original repo and its brilliant! you input a a b/w image with a few params and it spits out gcode for laser rastering. it is such a shame that there is such little documentation and it seems to be an abandoned project...
github.com/jv4779/2x_laser

and just to make sure that i have this right, so i would use the read_gpio from the mesa for the base-thread as a substitute for parport?

I dont think you can really use a base thread with Ethernet cards, the per packet overhead is too high.

and will the mesa card still be able to handle the output?
Last edit: 14 Feb 2021 17:55 by oddwick.

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

More
18 Feb 2021 11:40 #199238 by andypugh
I think it seems like using base thread and mesa GPIO is a non-starter.

The servo-thread part of laserraster should still work, but I would suggest removing the pulse generation code and adding a PWM duty cycle output pin in it's place to connect to the Mesa pwmgen.
The following user(s) said Thank You: oddwick

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

More
19 Feb 2021 13:36 #199424 by mcurtis
Not sure if you noticed, or if it will help, but there's a 5i25 branch to the repos your using.
The following user(s) said Thank You: oddwick

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

More
23 Feb 2021 14:52 #199835 by oddwick
well this question almost became a moot point last week. while i was retrofitting the laser, i was only using RO water with no coolants added and when it decided to get -20 outside, for the first time in the 16 years i lived here it actually froze INSIDE the shop and shattered the water jacket inside the tube. I was due a new tube because that one had some hours on it, but still... mother nature just got a nice one finger salute from me!

The servo-thread part of laserraster should still work, but I would suggest removing the pulse generation code and adding a PWM duty cycle output pin in it's place to connect to the Mesa pwmgen.

i considered that, but i have 5 outputs, and i am using 4 for stepgen and 1 pwm and i need all 5. the laser is set up as a gantry so its xyy(magic)z for steps and a pwm for laser power.

I think it seems like using base thread and mesa GPIO is a non-starter.

i agree. so since i was in it for a new tube, I bit the bullet and now have a DSP on the way. as much as i am not a fan of that approach, it seem that i have no choice. i would have gone back to parport, but i went through so much grief and money trying to find a pcie parport that works with linux and because of the limitations of step generation, i wasnt even nearly approaching the machine's potential

so now that means that i am sitting on a spare mesa card and we can't have that, now can we? ;)

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

More
23 Feb 2021 14:53 #199837 by oddwick

Not sure if you noticed, or if it will help, but there's a 5i25 branch to the repos your using.


that would possibly work, but a 5i25 is a pci card and the 7i96 is an ethernet card, and that seems to be the bottleneck here

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

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