Hello Guest it is April 18, 2024, 08:15:54 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - chris@wortz.com

Pages: 1
1
Mach4 General Discussion / Re: Mach4 Variable Counter
« on: October 25, 2015, 10:35:35 AM »
Ok, I bailed on the dro, so I opted for a UserLabel,
Edited my screen, created a label, called is UserLable25, put UserLabel25 in the text of it,
changed my vb to setuserlabel(25,"test")

Didn't work either, any thoughts?  I guess I just don't understand the way that Mach is handling it?

2
Mach4 General Discussion / Re: Mach4 Variable Counter
« on: October 25, 2015, 08:14:48 AM »
Ok, I understand that, and I do show my info in the history line at the bottom, too.  But, how about making a dro or some kind of larger text field on screen
that I can put that value in as it increments?

3
Mach4 General Discussion / Re: Mach4 Variable Counter
« on: October 24, 2015, 07:41:22 AM »
I created M60.mcs with the following code.

function m60()
   local inst = mc.mcGetInstance()
   local counter = mc.mcCntlGetPoundVar(inst, 500);
   mc.mcCntlSetLastError(inst, 'Counter # ' .. tostring(counter));
   mc.mcCntlSetPoundVar(inst, 500, counter); --saves it to the ireg variable
        SetOemDRO(dro1501,counter)
end

if (mc.mcInEditor() == 1) then
    m60()
end

I created a g code file with the following code

#500=1

G91 G21
F160

m98 P1000 l5
m98 P1000 l5

G0x2
G90
G0z50
m60
M30
%

o1000
#500 = [#500+1]
G0x-12.700  (Move - 1/2 inch each increment)
#500 = [#500+1]
G0x-12.700  (Move - 1/2 inch each increment)
M60
m99
%

I created a dro on screen and named it
dro(1501)

Why doesn't it update?

4
Mach4 General Discussion / Re: Mach4 Variable Counter
« on: October 22, 2015, 10:54:40 AM »
ok, is there any naming convention that I should use? Or just add another file to that folder names Mymacros.mcs?

5
Mach4 General Discussion / Re: Mach4 Variable Counter
« on: October 22, 2015, 07:58:08 AM »
Ok, I understand your code, now I have to get the placement part understood.  The code you posted, where would I put that, since it would not work in my g code routine?  This is where I am getting lost on all the posts, trying to clarify the location of some of this stuff.  Thanks!

6
Mach4 General Discussion / Mach4 Variable Counter
« on: October 21, 2015, 08:05:31 PM »
Heres My code, Heres my issue:

What I'd like to implement here is ever time that M1003 loops, I want to have a variable increment like a counter
and for it to show up on the screen.   I have read all this about variable and DRO and macropump,,,.... 
My brain is smoking... Any ideas?

N01 G20 G40 G49 G54 G80 G90 G91.1
;N02 G53 Z0.

(starting Position)
N05 G00 G90 X13.000 Y-5
G00 Z-0.29  (HEATER HEAD HEIGHT)         (START POSITION)

M98 P1010 ;first purge


G91 G21
F160

M98 P1001   
M98 P1002     
M98 P1003 L27   (all colors)

G0x-76.200  (move to start pos of next plate relative to last location)

M98 P1001     
M98 P1002     
M98 P1003 L27   (all colors)

G0x2
G90
G0z50
M30
%


o1001   ; make  1 color subroutine
G0x-12.700  (Move - 1/2 inch each increment)

(ROW x  1 color)

(ON)
M200    (HEAD 1)
   (HEAD 2)
   (HEAD 3)

G0 Y63.500 F160.        (MOVE TO -5 NO CHANGE ON X AXIS F215 IS SPEED RATE)
G0 Y25.400 F180.        (MOVE TO -4 NO CHANGE ON X AXIS F200 IS SPEED RATE)
G0 Y30.480 F200.        (MOVE TO -2 NO CHANGE ON X AXIS F125 IS SPEED RATE)

M201    (HEAD 1)
M203    (HEAD 2)
M205    (HEAD 3)
(end  code)

(ROW x 2 color)
G0 Y25.400 F200   (start pos of 2)
(ON)
M200    (HEAD 1)
    (HEAD 2)
    (HEAD 3)

G0 Y63.500 F160.        (MOVE TO -5 NO CHANGE ON X AXIS F215 IS SPEED RATE)
G0 Y25.400 F180.        (MOVE TO -4 NO CHANGE ON X AXIS F200 IS SPEED RATE)
G0 Y30.480 F200.        (MOVE TO -2 NO CHANGE ON X AXIS F125 IS SPEED RATE)


M201    (HEAD 1)
M203    (HEAD 2)
M205    (HEAD 3)
(end  code)

G0 Y-264.160
m99
%


o1002   ; make  2 colors subroutine
G0x-12.700  (Move - 1/2 inch each increment)

(ROW x  1 color)

(ON)
M200    (HEAD 1)
M202    (HEAD 2)
   (HEAD 3)

G0 Y63.500 F160.        (MOVE TO -5 NO CHANGE ON X AXIS F215 IS SPEED RATE)
G0 Y25.400 F180.        (MOVE TO -4 NO CHANGE ON X AXIS F200 IS SPEED RATE)
G0 Y30.480 F200.        (MOVE TO -2 NO CHANGE ON X AXIS F125 IS SPEED RATE)

M201    (HEAD 1)
M203    (HEAD 2)
M205    (HEAD 3)
(end  code)

(ROW x M 2 color)
G0 Y25.400 F200   (start pos of  2)
(ON)
M200    (HEAD 1)
M202    (HEAD 2)
   (HEAD 3)

G0 Y63.500 F160.        (MOVE TO -5 NO CHANGE ON X AXIS F215 IS SPEED RATE)
G0 Y25.400 F180.        (MOVE TO -4 NO CHANGE ON X AXIS F200 IS SPEED RATE)
G0 Y30.480 F200.        (MOVE TO -2 NO CHANGE ON X AXIS F125 IS SPEED RATE)


M201    (HEAD 1)
M203    (HEAD 2)
M205    (HEAD 3)
(end code)

G0 Y-264.160
m99
%


o1003   ; make all 3 colors subroutine
G0x-12.700  (Move - 1/2 inch each increment)

(ROW x  1 color)

(ON)
M200    (HEAD 1)
M202    (HEAD 2)
M204    (HEAD 3)

G0 Y63.500 F160.        (MOVE TO -5 NO CHANGE ON X AXIS F215 IS SPEED RATE)
G0 Y25.400 F180.        (MOVE TO -4 NO CHANGE ON X AXIS F200 IS SPEED RATE)
G0 Y30.480 F200.        (MOVE TO -2 NO CHANGE ON X AXIS F125 IS SPEED RATE)

M201    (HEAD 1)
M203    (HEAD 2)
M205    (HEAD 3)
(end code)

(ROW x 2 color)
G0 Y25.400 F200   (start pos of  2)
(ON)
M200    (HEAD 1)
M202    (HEAD 2)
M204    (HEAD 3)

G0 Y63.500 F160.        (MOVE TO -5 NO CHANGE ON X AXIS F215 IS SPEED RATE)
G0 Y25.400 F180.        (MOVE TO -4 NO CHANGE ON X AXIS F200 IS SPEED RATE)
G0 Y30.480 F200.        (MOVE TO -2 NO CHANGE ON X AXIS F125 IS SPEED RATE)


M201    (HEAD 1)
M203    (HEAD 2)
M205    (HEAD 3)
(end code)

G0 Y-264.160
m99
%



o1010
(purge routine)
N05 G00 G90 G54 X13.0 Y-5.0
/N06 G43 H1 Z0.
G00 Z-0.29  (HEATER HEAD HEIGHT)

(PURGE POSITION)
(PURGE START ON)
M200    (HEAD 1)
G4 P.25   (PAUSE)
M201    (HEAD 1)
M202    (HEAD 2)
G4 P.25   (PAUSE)
M203    (HEAD 2)
M204    (HEAD 3)
G4 P.25   (PAUSE)
M205    (HEAD 3)

M200    (HEAD 1)
G4 P.25   (PAUSE)
M201    (HEAD 1)
M202    (HEAD 2)
G4 P.25   (PAUSE)
M203    (HEAD 2)
M204    (HEAD 3)
G4 P.25   (PAUSE)
M205    (HEAD 3)
m99
(PURGE END)
%


Pages: 1