Hello Guest it is July 27, 2021, 04:17:32 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 - SwiftyJ

Pages: 1 2 3 4 5 6 7 8 9 10 »
1
Mach4 General Discussion / Re: API For Axis Homed
« on: July 22, 2021, 04:49:41 AM »
It doesn't, but you can use the following. I've also attached a picture showing the deref on estop option

Code: [Select]
rc = mc.mcAxisDeref(
                    number mInst,
                    number axisId)

or

Code: [Select]
rc = mc.mcAxisDerefAll(
                       number mInst)


2
Mach4 General Discussion / Re: API For Axis Homed
« on: July 21, 2021, 03:56:56 PM »
There is an option in the config to de-reference axes when e-stop is pressed

3
Mach4 General Discussion / Re: Mach4 Homing and Machine Coordinates
« on: July 16, 2021, 07:02:49 AM »
Can you post a screenshot of your homing/soft limits tab in the config screen?

4
Mach4 General Discussion / Re: Need help with some strange behavior.
« on: July 13, 2021, 01:54:38 PM »
Is the pendant and touchscreen connected by USB? Could this be a noise issue? If you run without the spindle does it look ok?

5
I have written this example below which will blink output 5 when the tool change output is active as suggested by jbuehn. This should automatically turn on when running M6. Instead of using the feed hold output for your LED, I think it is better to map it to a normal output so that we are not overriding the state of the feed hold output which is controlled by Mach when going into/coming out of feed hold.

Drop this code into your screen load script. It is the timer that will 'blink' the output. Remember to change the output number where stated (currently set to output 5)

Code: [Select]
FeedHoldTimerPanel = wx.wxPanel (wx.NULL, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxSize( 0,0 ) )
FeedHoldTimer = wx.wxTimer(FeedHoldTimerPanel)
FeedHoldTimerPanel:Connect(wx.wxEVT_TIMER,
function (event)
    local inst = mc.mcGetInstance()
local hSig = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5) --SET OUTPUT NUMBER
local sSig = mc.mcSignalGetState(hSig)
if sSig == mc.MC_ON then
mc.mcSignalSetState(hSig, mc.MC_OFF)
else
mc.mcSignalSetState(hSig, mc.MC_ON)
end
end)

Put this into your signal library. Remember to change the output number where stated (currently set to output 5)

Code: [Select]
[mc.OSIG_FEEDHOLD] = function (state)
--Use mach controlled feed hold output to activate the feed hold LED
local inst = mc.mcGetInstance()     
local hSig = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5) --SET OUTPUT NUMBER
    if( state == 1) then
mc.mcSignalSetState(hSig, mc.MC_ON)
else
mc.mcSignalSetState(hSig, mc.MC_OFF)
    end
end,

[mc.OSIG_TOOL_CHANGE] = function (state)
    local inst = mc.mcGetInstance()   
    if( state == 1) then
--Start timer to flash feed hold LED 500ms interval
        FeedHoldTimer:Start(500, false)
else
--Stop timer and turn off feed hold LED in case it's still on.
FeedHoldTimer:Stop()
local hSig = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5) --SET OUTPUT NUMBER
mc.mcSignalSetState(hSig, mc.MC_OFF)
    end
end

6
I would just map it to an input and use the signal library to run any code

7
Mach4 General Discussion / Re: Which output signal is which?
« on: June 21, 2021, 07:28:11 AM »
You would just map 'Gcode Running' signal in the ESS config to the output you have the LED connected to. Same with the Feed hold.

You shouldn't need to do anything with lua to turn the LEDs on as these outputs should activate automatically when mach is either running gcode or in feed hold.

8
Mach4 General Discussion / Re: Which output signal is which?
« on: June 21, 2021, 03:51:36 AM »
These outputs will help, but the gcode running does not turn off when feed hold is active.

Gcode Running = mc.OSIG_RUNNING_GCODE
Feed Hold = mc.OSIG_FEEDHOLD

For the manual jog you may just have to use a normal output as there is OSIG_JOG_ENABLED but this would activate no matter where it was turned on from.


9
Mach4 General Discussion / Re: Buggy config in mach4
« on: May 24, 2021, 03:14:06 AM »
If this happens it's the parameter.ini file in your profile. Just replace it and it will sort the issue

Edit: This will fix the Tool change radio button, not sure about the DRO issue

10
Mach4 General Discussion / Re: Again with the tool setter
« on: May 04, 2021, 03:35:30 AM »
You may have seen this already but this video provides a good walkthrough of setting up the tool offsets in Mach4 https://www.youtube.com/watch?v=tywAByswH2Q

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