Can this be done with a 7i96?

More
07 Feb 2021 16:51 #197931 by oddwick
I have a laser that i am in the process of refitting with a 7i96 from a parport and i am now in need of some help...

originally it was driven by a cheap chinese parallel breakout, but i had some reliability issues with it especially and high speeds, so this is the last of my machines i am retrofitting with mesa cards. so far i have all of the motion working everything works spiffy, but not much of a laser if i cant turn the laser on and off!

so my question is two parts...

first - the components. i have been using the 2x_laser laserfreq and laserraster components from BJJ and jv4779 which have worked brilliantly in the past especially the ppi/duty cycle for cutting. so this is the old hal file here:
loadrt threads name1=base-thread period1=[EMCMOT]BASE_PERIOD fp1=0 name2=charge-pump-thread period2=100000 fp2=0

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS 
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
loadrt pwmgen output_type=0
loadrt charge_pump
loadrt laserraster linear_units=[TRAJ]LINEAR_UNITS axis_scale=[JOINT_0]SCALE axis_min_limit=[JOINT_0]MIN_LIMIT axis_max_limit=[JOINT_0]MAX_LIMIT
loadrt laserfreq

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

addf charge-pump charge-pump-thread
so obviously since i am not using parport any more, how would i go about loading these components into my current hal file? that is included as an attachment below

second question is wiring -- with the original parallel breakout i was using magic z to control the laser and it had a 4 pin plug - gnd/dir/step/enable. it was wired to the laser psu using ground and direction to the laser's ground and enable-high pins. now with the mesa, i have 6 pins. would i wire it dir+/dir- to psu or would i use dir+/gnd to the psu? when i hit the dir+/dir- pins with a meter, i get a steady 5v no matter the direction. i had also thought about using the digital outs. i would have to check, but im pretty sure they had a relatively low frequency limit for switching
Attachments:

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

More
07 Feb 2021 17:05 #197935 by PCW
Replied by PCW on topic Can this be done with a 7i96?
You will be limited to the servo thread rate for laser rastering with the 7I96

Note that there is firmware for rastering available for the 7I96 but this is not yet
supported in the LinuxCNC driver, as it needs integration of an array or string hal type
to support the data stream (which can reach modulation rates of 1 MHz)

If your interface uses GND/STEP/DIR/ENA you would wire 7I96 pins
GND/STEP+/DIR+ and perhaps use a spare STEP/DIR output for enable

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

More
07 Feb 2021 17:11 #197937 by oddwick
how much of a limit vs parport? i am less interested in raster engraving than cutting and vector engraving. i use it occasionally, but not much.

so i would wire it using ground and dir+? that wont short it out? for enable, i was using a Dout connected to flood for enable as well as a physical pump switch for safety. that is why i went enable-high rather than low. its a rude surprise when you turn the unit on and it goes straight to burning!

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

More
07 Feb 2021 17:28 #197939 by PCW
Replied by PCW on topic Can this be done with a 7i96?
The Mesa step/dir + and - pins are the same signals with opposite polarity
if you are interfacing with a device with a common ground, you would use
either the + or - outputs and 7I96 ground to interface to your device
(the other polarity output would remain unconnected)

Note that you may have to chose the + or - output based on the startup
pin state and perhaps invert the polarity of the driving signal to get
the combination of enable / PWM/step off at startup/shutdown and
working in the correct direction
The following user(s) said Thank You: oddwick

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

More
07 Feb 2021 18:37 #197944 by oddwick
ok that makes sense and explains why i was getting constant 5v from both pins.

now is the servo thread fast enough to run at least ppi and duty cycle functionality? ppi is mainly what i use

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

More
09 Feb 2021 00:20 #198104 by andypugh
A better solution would be a firmware for the 7i96 which puts a PWM Generator on one of the step-dir outputs.

I see a bitfile in the 7i96 software pack called 7i96d_1pwm.bit which looks hopeful.

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

More
09 Feb 2021 02:33 #198113 by oddwick
i am using a pwm on the 5th axis to control the lasers power. i have it set up right now as xyy z fires laser (in theory, right now its either always on or always off still working it out) and pwm for power.

what i need to see is if i can at least load the laserfreq.comp and how to tie it to the servo thread. unless i can access the base thread with a 7i96, but every time i do, i get very generic errors. i guess the servo thread is not fast enough to run the laserraster component.

as long as i can get the duty cycle and ppi to work i would be happy. i really do not want to go back to parport, things run so much smoother on a mesa or use a laser dsp because of the proprietary software headaches besides the computer i am using for this machine only has 1 pcie port and that has been a nightmare finding a card that works with it. my other option is a machine that has a parport, but it only runs at 3.3v and stupid chinese breakouts only seem to like 0 or 5v, not this wooly gray area in the middle...

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

More
09 Feb 2021 08:02 #198128 by rodw
Replied by rodw on topic Can this be done with a 7i96?

Note that there is firmware for rastering available for the 7I96 but this is not yet
supported in the LinuxCNC driver, as it needs integration of an array or string hal type
to support the data stream (which can reach modulation rates of 1 MHz)


Peter, aren't you describing hal_port which is in master branch?
Ref: linuxcnc.org/docs/devel/html/man/man3/hal_port.3hal.html

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

More
09 Feb 2021 09:06 #198130 by andypugh

i am using a pwm on the 5th axis to control the lasers power.


A Mesa PWM or a HAL PWM?

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

More
10 Feb 2021 17:05 - 10 Feb 2021 17:08 #198294 by oddwick
in theory, a mesa pwm. in practice, i can either get the laser to fire continuously or not at all so power levels are moot at this point. middle ground seems to be hard to come by.

So far this is where i am at --

i can use a dsp, but thats expensive and proprietary and i have little control over my jobs

i can use a parport, but this computer only has half height pcie ports and that has been an adventure finding a card that will work with linux. but everything works albeit at a snails pace (relatively for a laser anyway) i can only realistically get about 1m/s before things go bad

or i can use my7i96, in which case it runs so fast it shakes then entire platform, BUT (and this is a big one) i cant get the laser to actually fire which i think is germane to the whole laser cutter thing. right now i can get agout 1700mm/s before the motors stall and once i switch rails, i should be able to get (possibly) 2k/s although that is mechanically not feasible. but i know it can do it, which is the same reason you buy a car with a top end of 180+, not that you are going to go that fast, but just knowing you can :woohoo:

i am starting to get the sense that it seems that i may have to go back to the parport. but the majority of what i use is ppi, and i would think that the pulses sent would be on the order of a fraction of step pulses, so the servo thread -should?- be fast enough to power that?
Last edit: 10 Feb 2021 17:08 by oddwick. Reason: abhorrent grammar

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

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