Hello Guest it is April 10, 2021, 11:16:05 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 - jderou

Pages: 1 2 »
1
Mach4 General Discussion / License error 4
« on: December 24, 2018, 09:29:50 PM »
I was just touching off a group of tools and on the last one I noticed my Z position was around double what it should have been (machine position -30ish when it only has 20ish inches of travel).  Machine returns to zero at top of travel, as if the scaling is off.  This happened twice tonight.  The second time I looked in the history and just before I set the last tool offset it said "license error 4".
The only way I found to recover from this issue is to restart Mach.

2
I have dealt with this annoyance for a couple years now, but I need to find a solution.  My steps/unit is 10,000, so I should have a resolution of .0001.  Through MDI I can move in .0001 steps (G0 G91 Z-.0001) successfully.  I am not able to jog in mpg or incremental mode at .0001.  If I give the mpg wheel a spin it will move a few tenths, nothing predictable though.
My setup is MPG and jog buttons through Pokeys 56e, configured through Pokeys plugin for Mach4.  Motion is using a Hicon Integra 7766.  I don't know if this is a pokeys issue or Mach.
Thanks!

3
This toolchange macro used to work fine in both MDI and when called from a program, now for some reason it is skipping the "loosendraw" lines - and only during program execution.  It works fine when called from MDI.

The lines it is skipping are

--LOOSEN DRAWBAR
hsig, rc=mc.mcSignalGetHandle(inst, loosendraw)
mc.mcSignalSetState(hsig, 1)

rc=mc.mcSignalWait(inst, mc.ISIG_INPUT19,mc.WAIT_MODE_HIGH, 5.);

if (rc==mc.MERROR_TIMED_OUT) then
    hsig, rc=mc.mcSignalGetHandle(inst, loosendraw)
    mc.mcSignalSetState(hsig, 0)
    hsig, rc=mc.mcSignalGetHandle(inst, spindleorient)
    mc.mcSignalSetState(hsig, 0)
    mc.mcCntlSetLastError(inst, "LOOSEN DRAWBAR TIMED OUT")
    mc.mcCntlFeedHold(inst)
    mc.mcCntlCycleStop(inst)
    do return end
end   

hsig, rc=mc.mcSignalGetHandle(inst, loosendraw)
mc.mcSignalSetState(hsig, 0)


I hope someone can help, I am beyond frustrated right now.

Code: [Select]
function m6()

local inst = mc.mcGetInstance()
local selectedtool = mc.mcToolGetSelected(inst)
local currenttool = mc.mcToolGetCurrent(inst)
--local selectedtool = 2
--local currenttool = 1
local spindleorient = mc.OSIG_OUTPUT2
local spindleoriented=mc.ISIG_INPUT18
local loosendraw = mc.OSIG_OUTPUT3
local drawloose = mc.ISIG_INPUT19
local tightendraw = mc.OSIG_OUTPUT4
local drawtight = mc.ISIG_INPUT20
local shuttleout = mc.OSIG_OUTPUT5



local xoffset = -29.7469
local yoffset = -14.2502
local zoffset = -22.30

if selectedtool == currenttool then
mc.mcCntlSetLastError(inst, "Current tool == Selected"..selectedtool)
else

--SHUTTLE IN
hsig, rc=mc.mcSignalGetHandle(inst, shuttleout)
mc.mcSignalSetState(hsig, 0)

hsig, rc=mc.mcSignalGetHandle(inst, spindleorient)
mc.mcSignalSetState(hsig, 1)
mc.mcCntlGcodeExecuteWait(inst, "G0 G53 Z-14.")
if currenttool == 0 then
else
mc.mcCntlGcodeExecuteWait(inst, "G53 X"..xoffset+2.5+currenttool*5-5. .. " Y"..yoffset-2.5)
--mc.mcCntlGcodeExecuteWait(inst,"G53 Y"..yoffset-2.5)
mc.mcCntlGcodeExecuteWait(inst, "G53 Z"..zoffset+3.)
end
hsig, rc=mc.mcSignalGetHandle(inst, spindleoriented)
orient =mc.mcSignalGetState(hsig)
while orient do
    orient =mc.mcSignalGetState(hsig)
    if orient == 1 then break end
end
--if currenttool > 0 then
mc.mcCntlGcodeExecuteWait(inst," F100.")
mc.mcCntlGcodeExecuteWait(inst, "G53 G1 Z"..zoffset)

--LOOSEN DRAWBAR
hsig, rc=mc.mcSignalGetHandle(inst, loosendraw)
mc.mcSignalSetState(hsig, 1)

rc=mc.mcSignalWait(inst, mc.ISIG_INPUT19,mc.WAIT_MODE_HIGH, 5.);

if (rc==mc.MERROR_TIMED_OUT) then
    hsig, rc=mc.mcSignalGetHandle(inst, loosendraw)
    mc.mcSignalSetState(hsig, 0)
    hsig, rc=mc.mcSignalGetHandle(inst, spindleorient)
    mc.mcSignalSetState(hsig, 0)
    mc.mcCntlSetLastError(inst, "LOOSEN DRAWBAR TIMED OUT")
    mc.mcCntlFeedHold(inst)
    mc.mcCntlCycleStop(inst)
    do return end
end   

hsig, rc=mc.mcSignalGetHandle(inst, loosendraw)
mc.mcSignalSetState(hsig, 0)
--end
--MOVE UP
mc.mcCntlGcodeExecuteWait(inst, "G0 G53 Z"..zoffset+4.)

if selectedtool == 0 then
    hsig, rc=mc.mcSignalGetHandle(inst, spindleorient)
    mc.mcSignalSetState(hsig, 0)
    mc.mcToolSetCurrent(inst, selectedtool)
    hsig, rc=mc.mcSignalGetHandle(inst, shuttleout)
    mc.mcSignalSetState(hsig, 1)

    do return end
end

mc.mcCntlGcodeExecuteWait(inst, "G53 X"..xoffset+2.5+(selectedtool*5)-5. .. " Y"..yoffset-2.5)
mc.mcCntlGcodeExecuteWait(inst, "G53 Z"..zoffset+1.5)
mc.mcCntlGcodeExecuteWait(inst, "G53 G1 Z"..zoffset)
--TIGHTEN DRAWBAR
hsig, rc=mc.mcSignalGetHandle(inst, tightendraw)
mc.mcSignalSetState(hsig, 1)
rc=mc.mcSignalWait(inst, mc.ISIG_INPUT20,mc.WAIT_MODE_HIGH, 5.);

if (rc==mc.MERROR_TIMED_OUT) then
    hsig, rc=mc.mcSignalGetHandle(inst, tightendraw)
    mc.mcSignalSetState(hsig, 0)
    hsig, rc=mc.mcSignalGetHandle(inst, spindleorient)
    mc.mcSignalSetState(hsig, 0)
    mc.mcCntlSetLastError(inst, "DRAWBAR TIGHTEN TIMED OUT")
    mc.mcCntlFeedHold(inst)
    mc.mcCntlCycleStop(inst)
    do return end
end   

hsig, rc=mc.mcSignalGetHandle(inst, tightendraw)
mc.mcSignalSetState(hsig, 0)

mc.mcCntlGcodeExecuteWait(inst, "G53 G0 Z-14.")




hsig, rc=mc.mcSignalGetHandle(inst, spindleorient)
mc.mcSignalSetState(hsig, 0)
mc.mcToolSetCurrent(inst, selectedtool)
end
--SHUTTLE OUT
hsig, rc=mc.mcSignalGetHandle(inst, shuttleout)
mc.mcSignalSetState(hsig, 1)


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


4
Is their a parameter equivalent to the fanuc 1722 (overlap for consecutive G00 blocks) in Mach4?  This would, for example, start the acceleration of the x axis when the z-axis has reached a certain deceleration point, essentially rounding corners.  I have over 60,000 holes to drill in 150 parts, and this time savings can really add up.  Right now it looks like in a drill cycle when the z retracts it will decel to zero before x/y moves start.  Are these moves controlled by the trajectory planner or is that only for feed moves?
I may have to post this out in longhand G1 moves at max feedrate to make it work.

5
the .mctoolgetselected doesn't seem to be updating with the correct tool number when attempting a toolchange (i.e. T4M06 just says currenttool = previous).  It seems I have been working around this by turning on M01 stop at toolchanges, but now I have a toolchanger mostly functional.  It seems to always stay at tool 1.  Maybe this is a bug that has been fixed?  I haven't updated in around a year.

6
Mach4 General Discussion / How to make Lua wait for signal state to change
« on: December 02, 2017, 06:44:55 PM »
I am working on an automatic toolchange and I need the Lua code within the macro to wait for the spindle orient signal from the PLC to change from 0 to 1.  I would have used a while wend in mach3, what is the best way to do this with Lua?
My input signal is Input 18.
I found the below example on the web but I am not quite sure how to use it in mach4.  I don't understand what the a in a is.

local i = 1
    while a do
      if a == v then break end
      i = i + 1
end

7
Mach4 General Discussion / Mach4 Random Crash
« on: October 25, 2016, 07:56:03 PM »
Mach has been crashing on me lately with the below message.  Shortly after the message it will blue screen.  Usually happens when machine is sitting idle.  Machine is windows 7 with pokeys56e and hicon integra controller.  Mach version is 4.2.0.3155 (licensed).  Any way to trace this down?

8
PoKeys / PoIL and Mach4 plugin
« on: September 10, 2016, 02:43:02 PM »
Is it possible to program the pokeys 56e with poblocks and use the mach4 plugin at the same time?

9
This problem has taken me over a year to diagnose.  The problem seemed to be random.  In the middle of a program, a popup window will say "error triggered, attempt to recover?"  the program continues to run but allows no input.  Only option is to close mach.
Tonight I was running a program that crash consistently every time in almost the same spot.  This made it possible to track it down.  It turns out it has something to do with my analog input controlling the FRO DRO.  setting the analog input to something other than the FRO DRO eliminates the error.
Any ideas what may be causing this?  Sure would like to have my override knob back.
I am using a Pokeys 56E, windows 7, mach3.
Thanks!

10
PoKeys / select increment per pulse MPG
« on: August 17, 2015, 03:41:47 PM »
In step/velocity mode, should it be possible to set the step value with the incremental step?  Right now in this mode my mpg step is some random number, i.e. .027" per pulse.  On the pro machines it is equal to the incremental selection and the velocity is also proportional to this setting.  Is this a Mach3 thing that isn't going to get better, or a Pokeys thing?
If it is something that cannot be solved, what is the best calibration settings to get the lowest step/pulse possible.
Joe

Pages: 1 2 »