Hello Guest it is April 24, 2024, 10:05:34 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 - RecceDG

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 »
1
Mach4 General Discussion / Re: Upgrade problem - 4498 to 5310
« on: April 01, 2024, 09:50:33 PM »
Oho!

The "disable keyboard jogging" button does NOT work!

A bit of a surprise when editing an MCI program!

2
Mach4 General Discussion / Re: Upgrade problem - 4498 to 5310
« on: March 23, 2024, 11:51:32 AM »
Verified - thanks!

3
Mach4 General Discussion / Re: Upgrade problem - 4498 to 5310
« on: March 10, 2024, 11:30:49 AM »
Some quick tests:

1. Wear offset is editable. Check.

2. Tool change works and applies offset. Check.

3. Tool offset is applied and changes DRO. Check.

4. Cycle Start panel button works. Check.

5. Jog buttons on UI work. Not at first. Enabling machine"ungreyed" the panel, but the buttons would not highlight on mouseover. Then they did, and I don't know what triggered that. Incremental step change button works. Speed slider works. Axes work. Button jog mode button does NOT work (always continuous)

Good progress, thanks!

4
Mach4 General Discussion / Re: Upgrade problem - 4498 to 5310
« on: March 09, 2024, 03:05:45 PM »
Wow, that was fast. And on a Saturday too!

>  but some of it could be optimized.

Oh, no doubt.

My prime concern is that the code never fails is a way that does something undefined or dangerous. Uncommanded movements, movements faster than expected or in the wrong direction, etc.

And you are looking at the remnants of my first generation Lua coding. The lathe control panel was the first Lua I ever wrote, and my understanding of the language and how Mach works has gotten slightly better since then. I have some code for tool-length-probe on toolchange for mill in another thread - a project that got derailed by the lathe shenanigans.

> I think it could do with recoding to utilize the signal library to prevent it unnecessarily running functions every time a switch state is changed.

I'm listening. Where is this documented?

> A question regarding your pendant, does the 'Off' setting have it's own signal or are you saying it's considered off when there is no axis selected or speed selected?

For jog?

The jog section of the panel has 3 controls:

- an MPG handle
- an axis select switch, two positions, SPDT, with lines for each axis (X, Z)
- a rotary select switch, 4 positions, 3 lines, OFF (no lines connected) 0.001 (line 1 connected) 0.010 (line 2 connected) 0.100 (line 3 connected)

The reason why there is no "off line" is because I wanted JOG ENABLE to fail OFF if the panel was unplugged or a line broke

The "so what" there is that the function that handles turning on jogging must handle not just the line going ON (to turn jog active) but also OFF (to turn jog inactive). So the fact that Mach calls the function on state change is a feature here.

Axis select, in retrospect, could have been a single line - Z if OFF, X if ON, but at the time I was going for positive control - the axis was only selected if its select line was HIGH, so a broken or unplugged cable disabled jogging.

You should see the mill control - I've overloaded the MPG handle. There's not just an axis select switch, there's a handle function select switch: JOG - SPINDLE OVERRIDE - FEED OVERRIDE. In jog mode the handle jogs like the lathe. In SPINDLE mode the handle changes the spindle speed up or down, and in FEED mode the handle changes the feed speed up or down. And there are separate lights to indicate if the handle is active in JOG mode, or active in SPEED mode...

Anyway, thanks for the fixes - I'll try them tomorrow.


5
Mach4 General Discussion / Re: Upgrade problem - 4498 to 5310
« on: March 09, 2024, 10:18:49 AM »
Here you go.

Thanks again.

6
Mach4 General Discussion / Re: Upgrade problem - 4498 to 5310
« on: March 09, 2024, 08:23:04 AM »
> If you go to Help>Support>Package Current Profile and upload the file it creates. This will include the screenset, macros, and the machine.ini file

OK, will do. I'll post it later today, thanks.

> Looks like DRO names were updated but the code is still referencing the old names

I'll bet something similar is going on with the screen jog buttons too.

7
Mach4 General Discussion / Re: Upgrade problem - 4498 to 5310
« on: March 09, 2024, 07:25:57 AM »
> Can you post your profile and screenset including required modules?

Can you describe what files you want for "my profile"?

The screenset is the new wxLathe. The only thing I have changed is I deleted the screen button/light for "spindle reverse" (as my spindle doesn't run backwards) and I have added my Lua code to the screen run script.

> I thought tool wear was only enabled on Mach4 Industrial, do you have an industrial licence? I could be wrong though...

I have a hobby licence. Tool wear may not be implemented, but there is a screen widget for it, and it has a value in it (that I cannot change). Presumably it is being applied, or it would be "0".

> Homing is all related to the ESS and the plugin.. does Warp9 have a working plugin for 5310? Their documentation site is still saying they had problems with build 5000 onwards

They do.

From the Warp 9 Forum:

Code: [Select]
Here is a link to a plugin that has the proper code to work with the v5000 versions of Mach4. Technically it goes back a little further than that, but some other changes to Mach4 made v5000+ behave badly and that is when it was noticed. I believe it was a timing issue, and v5000+ had improved performance which created the problem. It has to do with how the device reports to Mach that it has stopped moving. Every motion control plugin had issues with this except for the ones that Steve Murphree of Artsoft wrote (of course he knew how it was supposed to work!).
Because I know there are issues with the Mach versions leading up to v5305, I set a cutoff date in the plugin. You can ignore the warning if you want to use an older version such as v5036 (I never used that version). I would use v5305 or later.

https://warp9td.com/files/Plugins/ESS/Mach4/ESS_Mach4_v306.zip

Here is where you can download the latest Mach4 installers:

https://www.machsupport.com/ftp/Mach4/DevlopmentVersions/

Please let me know of any bug reports. I am unsure about Height Control. I will definitely be looking at that closely this week.

As far as I can tell (I have not tested it extensively) this combination of ESS 306 and Mach 4 5310 works fine with mill. But the upgrade from 4498 introduced a new lathe screen set with extensive changes and that is the source of the trouble.

8
Mach4 General Discussion / Re: Upgrade problem - 4498 to 5310
« on: March 08, 2024, 07:54:59 PM »
Now I have these other issues:

- The Cycle Start panel button doesn't work
- The Feed Hold panel button doesn't work
- Tool changes don't work (might be a case of a missing macro file)
- The cycle start UI button is behaving oddly
- Entering in tool offsets from the UI does not change the DRO
- UI jog buttons do not work
- There's an indicated 0.010 wear offset that I cannot clear
- Tool table wear does nothing
- On one homing sequence, the UI put up "Homing Complete" after it homed to X, then homed Z but ignored the home switch, necessitating an EStop. After restarting and jogging off the switch, a second attempt worked fine

...and that's just the issues I found so far.

9
Mach4 General Discussion / Re: Upgrade problem - 4498 to 5310
« on: March 08, 2024, 07:52:01 PM »
I got some assistance over at Warp 9 and have some fixes:

Manual Spindle Button

Code: [Select]
function InputManualSpindle()

        -- Momentary pushbutton, so we get TWO signals with each button press:
        -- an "ON" and an "OFF"
        -- So check state and ignore the "OFF"

local hSpindleButton
local SpindleButtonState
hSpindleButton, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT3)      -- signal 3
SpindleButtonState, rc = mc.mcSignalGetState(hSpindleButton)

if (SpindleButtonState == 1) then

mc.mcCntlSetLastError(inst, "Control Panel Manual Spindle PRESS")

local hsig = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON)  -- This turns on the spindle
local hsig2 = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEFWD)  -- This turns on the UI button on screen
local spindstate, rc = mc.mcSignalGetState(hsig)

if (spindstate == 0) then         -- If spindle is off, turn it on
mc.mcSignalSetState(hsig, 1)
mc.mcSignalSetState(hsig2, 1)
mc.mcCntlSetLastError(inst, "Control Panel Manual Spindle ON")

else                              -- Otherwise, turn it off
mc.mcSignalSetState(hsig, 0)
mc.mcSignalSetState(hsig2, 0)
mc.mcCntlSetLastError(inst, "Control Panel Manual Spindle OFF")
end
else
            mc.mcCntlSetLastError(inst, "Control Panel Manual Spindle RELEASE")
end
end

Jog Axis Select Switch:

Code: [Select]
function PendantAxisChange()
 
    -- handles
  local hAxis_X
  local hAxis_Z
local SelectAxis_X
local SelectAxis_Z

local PanelMachMPGNumber = 7 -- setting this here because of suspicions that the "constant" we were using is getting garbage collected by Lua 5.3

-- March 8 2024
-- All of a sudden, following an update, MACH is picking up on the split second when it appears that both lines are HIGH
-- Adding noise reduction to the ESS config had not effect, so I suspect that the switch really does have both lines HIGH
-- as the switch moves across the contacts.
-- LUA does nt appear to have a native DELAY function and I'm not sure about OS dependancies so a simple delay isn't (yet) an option
-- so we need another solution

-- The status of the JOG ON light can be used as a flag. Is this yucky, or brilliant?
local hJogLight
    hJogLight, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5)
local JogState, rc = mc.mcSignalGetState(hJogLight)

    local AxisState
    AxisState, rc = mc.mcMpgGetAxis(inst, PanelMachMPGNumber)

hAxis_X, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT5)   
SelectAxis_X, rc = mc.mcSignalGetState(hAxis_X)
   
hAxis_Z, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT4)
SelectAxis_Z, rc = mc.mcSignalGetState(hAxis_Z)

-- mc.mcCntlSetLastError(inst, "Entered PendantAxisChange()")        -- Hoe many times is this thing getting called per switch? The answer is TWO.

if (AxisState == AxisNumber_X) then
-- We started at X, so we must want Z
if (JogState == 1) then -- Make sure jog is active
if (SelectAxis_Z== 1) then
mc.mcMpgSetAxis(inst, PanelMachMPGNumber, AxisNumber_Z)    -- Map the MPG to control the Z Axis
mc.mcCntlSetLastError(inst, "Panel Jog Axis Z Selected")        -- Show a message in the Screen Set
else
-- Should this fail like this?
-- This traps the second call
-- mc.mcCntlSetLastError(inst, "I think we want Z but the Z line isn't HIGH - ABEND")
end
else
mc.mcCntlSetLastError(inst, "Changed axis select to Z while jog disabled - IGNORED")
end
elseif (AxisState == AxisNumber_Z) then
-- We started at Z, so we must want X
if (JogState == 1) then -- Make sure jog is active
if (SelectAxis_X == 1) then
mc.mcMpgSetAxis(inst, PanelMachMPGNumber, AxisNumber_X)    -- Map the MPG to control the X Axis
mc.mcCntlSetLastError(inst, "Panel Jog Axis X Selected")        -- Show a message in the Screen Set
else
-- Should this fail like this?
-- mc.mcCntlSetLastError(inst, "I think we want X but the X line isn't HIGH - ABEND")
-- This traps the second call
end
else
-- This never seems to execute
mc.mcCntlSetLastError(inst, "Changed axis select to X while jog disabled - IGNORED")
end
else
-- We somehow have a wrong axis?
-- Actually this triggers when we change the axis switch with jogging disabled
mc.mcCntlSetLastError(inst, "Jog Axis Switch does not recognize previously enabled axis - ABEND")
end

-- Disabled while we try the new regime because of debounce

    --if (AxisState ~= -1) then -- Temporarily (?) hardcoded to see if our constant was getting garbage collected in Lua 5.3
--
  --      hAxis_X, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT5)   
    --    SelectAxis_X, rc = mc.mcSignalGetState(hAxis_X)
   --
     --   hAxis_Z, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT4)
       -- SelectAxis_Z, rc = mc.mcSignalGetState(hAxis_Z)
--
  --      -- Now actual axis Selection Switch processing code
-- if ((SelectAxis_X == 1) and (SelectAxis_Z== 1)) then
-- This is a problem - the switch is shorted or something
-- mc.mcMpgSetAxis(inst, PanelMachMPGNumber, -1 )                      -- Unmap the MPG, so it won't control any axes
--            mc.mcCntlSetLastError(inst, "ABEND - Both control panel axis select lines are HIGH")  -- Show a message in the Screen Set
--
--        elseif (SelectAxis_X == 1) then
--            mc.mcMpgSetAxis(inst, PanelMachMPGNumber, AxisNumber_X)    -- Map the MPG to control the X Axis
--            mc.mcCntlSetLastError(inst, "Pendant Axis X Selected")      -- Show a message in the Screen Set
--       
--        elseif (SelectAxis_Z== 1) then
--            mc.mcMpgSetAxis(inst, PanelMachMPGNumber, AxisNumber_Z)    -- Map the MPG to control the Z Axis
--            mc.mcCntlSetLastError(inst, "Pendant Axis Z Selected")      -- Show a message in the Screen Set
--   
--        else
--            -- This is a problem, because the axis select switch is one or the other
-- -- We have no high pin - so shut off jogging
--            mc.mcMpgSetAxis(inst, PanelMachMPGNumber, -1 )                      -- Unmap the MPG, so it won't control any axes
--            mc.mcCntlSetLastError(inst, "ABEND -Both control panel axis select lines are LOW")  -- Show a message in the Screen Set
--        end
--     else
--        mc.mcCntlSetLastError(inst, "Changed axis select while jog disabled - IGNORED")
--     end
end

10
Mach4 General Discussion / Re: Tool table undo
« on: March 08, 2024, 07:36:32 PM »
Which build would it be fixed in?

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 »