Hello Guest it is January 26, 2022, 06:56:49 AM

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 - peter81

Pages: « 1 2 3 4 5 6 7 8 9 10 11 »
21
Mach4 General Discussion / Spindle warm
« on: March 22, 2019, 05:24:22 PM »
Hello,

today I've updated mach4 to version build 4124 and I have some problem with the code in plc script. This code was working just fine with version build 3804. It's a code to warm up my spindle. It activates this code by pressing button to activate the led to start the timer dro and set the spindle rpm to 6000 for 4minutes. The rest of the code is in plc. With new update this code in plc doesent work when dro reads value of 4000, 8000 and 12000. Can someone please help me make it work again. Thanks.

PLC code:

local inst = mc.mcGetInstance()
local zero = 0
local SpindleWarmStartLED = scr.GetProperty("SpindleWarmStartLED", "Value")
local droSpindleWarm = scr.GetProperty("droSpindleWarm", "Value")
local machEnbld = mc.mcSignalGetState (mc.mcSignalGetHandle (inst, mc.OSIG_MACHINE_ENABLED))

if (SpindleWarmStartLED == "1") then   
     local droSpindleWarmVar =(droSpindleWarm + 1)
     droSpindleWarm = tostring(droSpindleWarmVar)
     scr.SetProperty("droSpindleWarm", "Value",droSpindleWarm)
     end


     if (droSpindleWarm == "4000") then
         mc.mcSpindleSetDirection(inst, 1);
         mc.mcSpindleSetCommandRPM(inst, 12000);
     end

             if (droSpindleWarm == "8000") then
             mc.mcSpindleSetDirection(inst, 1);
             mc.mcSpindleSetCommandRPM(inst, 18000);
             end

                     if (droSpindleWarm == "12000") then
                     scr.SetProperty('droSpindleWarm', 'Value', tostring(zero))
                     scr.SetProperty("SpindleWarmStartLED", "Value", "0")
                     mc.mcSpindleSetDirection(inst, 0);
                     mc.mcSpindleSetCommandRPM(inst, 0);
                     end

                             if (machEnbld == 0) then
                             scr.SetProperty("SpindleWarmStartLED", "Value", "0")
                             mc.mcSpindleSetCommandRPM(inst, 0);
                             end

22
General Mach Discussion / Re: Need help stepper + drive
« on: August 27, 2018, 03:37:20 PM »
Ok thanks very much for help.

Regards,
Peter

24
Mach4 General Discussion / Re: Tools led
« on: February 24, 2018, 02:41:49 PM »
Thank you very much for that. I knew that was something simple. It work now thanks again.

Regards,
Peter

25
Mach4 General Discussion / Tools led
« on: February 24, 2018, 01:10:04 PM »
Hello,

can someone please help me with the code bellow. I have two led's on my screen named T01LED and T02LED and I want them to light up when tool number changes. I've put this code in PLC but it doesn't work. Thanks.

local inst = mc.mcGetInstance()
local currenttool = mc.mcToolGetCurrent(inst)

if (currenttool == "1") then
scr.SetProperty("T01LED", "Value", "1")
     else
         scr.SetProperty("T01LED", "Value", "0")
end
--------------------------
if (currenttool == "2") then
scr.SetProperty("T02LED", "Value", "1")
     else
         scr.SetProperty("T02LED", "Value", "0")
end


Regards,
Peter

26
G-Code, CAD, and CAM discussions / Re: Gcode offset
« on: May 20, 2015, 12:41:17 PM »
Hello Graham Waterworth,

thank you very much for reply. I think that is exatly what I need. Thanks again.

Best regards,
Peter

27
G-Code, CAD, and CAM discussions / Gcode offset
« on: May 17, 2015, 02:45:34 PM »
Hello all,

I having trouble to find a way to automaticly add a number for offset G55 and hope someone can help me. Bellow is the sample of codes.

N1 G49 G80 G40 G90 G00
N2 G21
N3 G10  X0  Y0  Z-442 P1  L2
N4 G10  Z75 P1  L1
N5 G54
N6 T2 M6
N7 G0 X19.311 Y71.415 S18000 M3
N8 G43 Z71.88 H2
N9 G1 G94 Z61.88 F8000.
N10 X17.189 Y73.537
N11 X8.393 Y82.332 F2000.
N12 X19.311 Y71.416
N13 X17.189 Y73.537 Z59.63
N14 X8.393 Y82.332
N15 X19.311 Y71.416
N16 X21.432 Y69.295 F8000.
N17 Z150
N18 M5
N19 M30


N1 G49 G80 G40 G90 G00
N2 G21
N3 G10  X243  Y-21.45  Z-382 P2  L2
N4 G10  Z66 P2  L1
N5 G55
N6 T2 M6
N7 G0 X19.311 Y71.415 S18000 M3
N8 G43 Z71.88 H2
N9 G1 G94 Z61.88 F8000.
N10 X17.189 Y73.537
N11 X8.393 Y82.332 F2000.
N12 X19.311 Y71.416
N13 X17.189 Y73.537 Z59.63
N14 X8.393 Y82.332
N15 X19.311 Y71.416
N16 X21.432 Y69.295 F8000.
N17 Z150
N18 M5
N19 M30

I'm using two spindles in 3 axis machine. G54 is the offset of the first spindle (X0 Y0) and G55 is the offset of the second spindle (X243 Y-21.45).
I want in gcode both offsets (G54 and G55) set to zero and then, if I add any number to that line instead of zero (for X andY) mach3 will automatically add 243 for X and -24.45.

Regards,
Peter

28
Show"N"Tell ( Your Machines) / Re: O3N250
« on: January 27, 2013, 08:42:55 AM »
Hi danilom, here is the picure

29
Show"N"Tell ( Your Machines) / Re: O3N250
« on: December 29, 2012, 03:24:51 PM »
Hello,

I have made a little update to my machine. I have raised Z axis for 200mm to have more space underneath the bridge for use with longer tools.

Regards,
Peter

30
Hello Garry,

I'm using only one home switch for slave axis.

Peter

Pages: « 1 2 3 4 5 6 7 8 9 10 11 »