laser signal stays on with test gcode and 5i25

More
03 Nov 2015 15:47 #64669 by poofjunior
Hi all,

I'm using the Mesa6i25 + 7i75 parallel port breakout board combo and the 5i25 branch of bjj/2x_laser to drive a corexy laser cutter.



Currently, running some simple test gcode keeps the laser signal on after the program runs. (parallel port pin 17, or 0 on the 7i75 breakout) Could I be writing my gcode incorrectly for the add-on?

Here's the sample code to draw a square:
G21 (All units in mm)

M68 E0 Q100
G00 Z0.000000
G00 X6.0 Y50.
M3 S5
M4 S50
G01 X6.0 Y50 Z0   F1500.000000
G01 X12.0 Y50 Z0
G01 X12.0 Y56 Z0
G01 X6.0 Y56 Z0
G01 X6.0 Y50 Z0
M4 S0
G00 Z0.000000


(Footer)
M5
G00 X0.0000 Y0.0000
M2 (Program End)

One last note: the 6i25 is in 5i25 configuration with the 5i25_g540x2.bit file flashed onto it. A quick call on the terminal
sudo mesaflash --device 5i25 --readhmid
brings up lots of info, but the relevant part is here and the pinouts are as I expect (I think):
Configuration pin-out:

IO Connections for P3
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 1      0   IOPort       None           
14      1   IOPort       PWM              0        PWM             (Out)
 2      2   IOPort       StepGen          0        Step/Table1     (Out)
15      3   IOPort       None           
 3      4   IOPort       StepGen          0        Dir/Table2      (Out)
16      5   IOPort       StepGen          4        Step/Table1     (Out)
 4      6   IOPort       StepGen          1        Step/Table1     (Out)
17      7   IOPort       None           
 5      8   IOPort       StepGen          1        Dir/Table2      (Out)
 6      9   IOPort       StepGen          2        Step/Table1     (Out)
 7     10   IOPort       StepGen          2        Dir/Table2      (Out)
 8     11   IOPort       StepGen          3        Step/Table1     (Out)
 9     12   IOPort       StepGen          3        Dir/Table2      (Out)
10     13   IOPort       QCount           0        Quad-A          (In)
11     14   IOPort       QCount           0        Quad-B          (In)
12     15   IOPort       QCount           0        Quad-IDX        (In)
13     16   IOPort       None           

IO Connections for P2
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 1     17   IOPort       None           
14     18   IOPort       PWM              1        PWM             (Out)
 2     19   IOPort       StepGen          5        Step/Table1     (Out)
15     20   IOPort       None           
 3     21   IOPort       StepGen          5        Dir/Table2      (Out)
16     22   IOPort       StepGen          9        Step/Table1     (Out)
 4     23   IOPort       StepGen          6        Step/Table1     (Out)
17     24   IOPort       None           
 5     25   IOPort       StepGen          6        Dir/Table2      (Out)
 6     26   IOPort       StepGen          7        Step/Table1     (Out)
 7     27   IOPort       StepGen          7        Dir/Table2      (Out)
 8     28   IOPort       StepGen          8        Step/Table1     (Out)
 9     29   IOPort       StepGen          8        Dir/Table2      (Out)
10     30   IOPort       QCount           1        Quad-A          (In)
11     31   IOPort       QCount           1        Quad-B          (In)
12     32   IOPort       QCount           1        Quad-IDX        (In)
13     33   IOPort       None

Thanks for taking a look!

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

More
03 Nov 2015 19:27 #64693 by BigJohnT
If your using M68 to turn on your laser you're not turning it off.

JT

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

More
07 Nov 2015 12:31 #64948 by poofjunior
Whoop--it looks like I didn't completely understand the README.txt instructions. Laser Power Control and the Laser Enable features are on two separate pins.


Ok, as a heads-up, here's the pinout:

ParPort 14 --> 7i75 IO1 --> Laser Power Control (a 20[KHz] pwm signal)
ParPort 17 --> 7i75 IO7 --> Laser Enable Control (~a 3[ms] pulse for actually firing the laser)

I missed the line in the readme where the Laser Enable Control pin only fires if the Z axis is less than 0.

The only part that still confuses me is that IO7, according to
sudo mesaflash --device 5i25 --readhmid
, is not mapped to any functionality, although it is indeed pulsing the laser.... (I had to use a logic analyzer to find it.)

All that said, everything appears to be working now. Here's my test GCode for reference:
G21 (All units in mm)                                                           
                                                                                
G00 Z-0.001000 (must be negative to enable laser to fire)
G00 X6.0 Y50.                                                                   
M3 S1                  (set to 1 pulse per millimeter)
G01 X6.0 Y50 Z0   F1500.000000                                                  
G01 X12.0 Y50 Z0                                                                
G01 X12.0 Y56 Z0                                                                
G01 X6.0 Y56 Z0                                                                 
G01 X6.0 Y50 Z0                                                                 
M3 S0                  (disable laser, aka: set to 0 pulses per millimeter)
G00 Z0.000000                                                                   
                                                                                
                                                                                
(Footer)                                                                        
M5                                                                              
G00 X0.0000 Y0.0000                                                             
M2 (Program End)

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

More
09 Nov 2015 15:50 #65017 by andypugh

The only part that still confuses me is that IO7, according to mesaflash is not mapped to any functionality, although it is indeed pulsing the laser.


Any pin without a specific function (and any pin that has the specific function disabled, such as stepgens 3 and 4 with num_stepgens set to 3, can be used as a general purpose IO pin.

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

Time to create page: 0.065 seconds
Powered by Kunena Forum