Hello Guest it is April 24, 2024, 01:43:58 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.


Topics - peter81

Pages: 1 2 »
2
Mach4 General Discussion / ESS and Encoder to read angle
« on: March 29, 2020, 01:15:06 PM »
Hello everyone,

i've connected encoder to ESS and I can read encoder counts on my dro. Encoder is 5000ppr. Now I want to convert those counts into degrees so I can read the angle from a dro. What would be the best way of doing this? I've tried to achive this through the PMC but I don't have enough knowlede so any help would be appreciated. Thanks.

Regards,
Peter

3
Mach4 General Discussion / Dust hood
« on: April 29, 2019, 12:41:31 PM »
Hello all,

on my router I have a pneumatic dust hood. I have two M codes to activate and deactivate it in G code. Also in screen I've made a button so I can raise and lower it in the middle of the program if I want to. But there is a problem. When I start the program (any program that I have) dust hood is activated but then suddenly the output is deactivated in the middle of the program. Sometimes this happens after a minute, sometimes after 10 minutes. Then I have to push the button to activate it again. Any help would be appreciated.
Here is the codes:

function m101()
   
   inst = mc.mcGetInstance()

   local hSig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5)
   mc.mcSignalSetState(hSig, 1)
   
end

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

----------------------------------------------------


function m102()
   
   inst = mc.mcGetInstance()

   local hSig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5)
   mc.mcSignalSetState(hSig, 0)
   
end

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

-------------------------------------------------------


-- Dust hood button script


inst = mc.mcGetInstance()

local hSig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5)
local state, rc = mc.mcSignalGetState(hSig)

if state == 1 then
    mc.mcSignalSetState(hSig, 0)
else
    mc.mcSignalSetState(hSig, 1)
end


Regards,
Peter

4
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

6
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

7
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

8
Show"N"Tell ( Your Machines) / O3N250
« on: July 08, 2012, 07:11:58 AM »
Hello,

I almost finished control panel for my O3N250 CNC machine. Still need to implement some functions. Here is the picture of the final look.

Regards,
Peter


9
VB and the development of wizards / De-ref axis
« on: June 23, 2012, 09:18:11 AM »
Hello,

can someone help me how to de-reference just one axis not all of them? Is there a specific OEM code for each axis or can I do it in other way? Thanks.

Peter

10
dspMC/IP Motion Controller / DSPMC and ESTUN
« on: May 04, 2012, 07:38:17 AM »
Hello all,
It's been a while since my last post here. I have upgraded my machine to newer drives and motors (the older ones just didn't perform well) and I have done a lot of changes to machine. I have some problem about connecting. Where on DSPMC can I connect pin 18/36 which can be found on page 40 in the manual?

Thanks,
Peter

Pages: 1 2 »