Hello Guest it is April 18, 2024, 08:15:06 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 - SimonRafferty

Pages: « 1 2 3 4 5 »
11
Mach4 General Discussion / Re: UC100 and Taig Controller Spindle On Issue
« on: December 22, 2020, 09:27:16 AM »
Thanks Brian.
In my case, it turned out my UC100 was too old and wasn't properly compatible with the Mach4 Plugin, though it worked OK with Mach3 originally.  Using the UCCNC software seemed the easiest option - and actually for a plasma, it's fine.

12
Mach4 General Discussion / Re: macro for Reference All Axes
« on: December 22, 2020, 05:16:57 AM »
I guess I've just got used to my Fanuc controller insisting on referencing the axis at startup and on a toolchange.  I also leave the machine (or at least the controller) running all the time - but something like this just saves the machine from my sometimes less than perfect memory!

Such a small addition to the code seems worthwhile compared to the cost of a tool-crash.

13
Mach4 Toolbox / Re: Troubles with ATC script and Disable / Stop
« on: December 22, 2020, 05:12:31 AM »
I also could not find a signal to indicate a stopped state.  However a possible fix is to add code to the stop button to set a register to indicate this - and read it in your code.  Add similar to the start button to reset the register.

For ATC moves, it might make sense to use machine coordinates (G53) and to check at the start of the ATC cycle that the machine has been referenced.  That way zero will always be in the same place!
Code to check if referenced: https://www.machsupport.com/forum/index.php?topic=36295.msg283262#msg283262




14
Mach4 Toolbox / Re: Edit M6
« on: December 22, 2020, 04:54:05 AM »
I guess it depends what sort of toolchanger you have!
Use the script editor [Operator] [Open Script Editor]
Then look in the tree on the left <Profiles><Your profile name><Macros>m6.mcs
Add the code there.  There's a good example script in the Mach4 Scripting manual which should get you started.

15
Mach4 Toolbox / Re: I need help with rewriting a macro
« on: December 22, 2020, 04:39:07 AM »
I'll help you - having just written mine!  No need for payment - it may be useful to other people.
Post your code / problems here.
https://youtu.be/70LTVpqiZYg
Previous (more complicated) one:
https://youtu.be/WpjGpXOVs3M

16
Mach4 General Discussion / Re: UC100 and Taig Controller Spindle On Issue
« on: December 22, 2020, 04:34:54 AM »
That's a good tip!
I also spent hours banging my head against the wall, trying to get the UC100 to play nicely with Mach4.  I eventually gave up & used UCCNC on that machine (Plasma) which worked OK.  Maybe I'll have another go!

17
Mach4 General Discussion / Re: macro for Reference All Axes
« on: December 22, 2020, 04:06:52 AM »
Brian - this is a pretty geeky forum!  I think concurrent programming barely counts compared to machining and programming generally!

A low level spin lock is the kind of thing I was hoping for.

If registers are thread safe - and you can make a private button act as the arbiter to prevent deadlocks, I can have the MCode set registers as a signal / handshake, arbitrated by the button to either the PLC or a screen timer to kick off the referencing.  I'll give it a go!

Another (even more geeky) question.  The API reference gives the syntax in both Lua and C++ forms.  Does this mean there is the possibility of scripting in C++ through a different IDE? (he says hopefully!).  While Lua is OK, the lack of explicit type casting kind of makes my skin crawl!

18
Mach4 General Discussion / Re: macro for Reference All Axes
« on: December 21, 2020, 05:16:33 PM »
Brian - that could be cool!
I'd also like something that can execute the homing from an M-Code / macro outside a button (more easily). 

Since the screen & machine control run concurrently, I wondered if any kind of semaphores have been implemented for cooperation between the two threads - and if these are exposed to the user (coder)? 

For anybody wondering what I'm talking about: https://en.wikipedia.org/wiki/Semaphore_(programming)

19
Mach4 General Discussion / Re: macro for Reference All Axes
« on: December 21, 2020, 03:01:12 PM »
As a result I re-did the code behind the cycle start button which prevents me from hitting <cycle start>
UNTIL the machine has been referenced. Not hard to do.

Just in case any of you hadn't figured out how (it isn't hard - so long as coding is your thing!), Here's my code.  Replace what's in the cycle start button, Left Up Script in the screen editor with the below:
Code: [Select]
local inst = mc.mcGetInstance()
local hXHome = mc.mcSignalGetHandle(inst, mc.OSIG_HOMED_X)
local hYHome = mc.mcSignalGetHandle(inst, mc.OSIG_HOMED_Y)
local hZHome = mc.mcSignalGetHandle(inst, mc.OSIG_HOMED_Z)
local XHomed = mc.mcSignalGetState(hXHome)
local XHomed = mc.mcSignalGetState(hYHome)
local ZHomed = mc.mcSignalGetState(hZHome)

if ((XHomed~=0) and (YHomed~=0) and (ZHomed~=0)) then
CycleStart()
else
wx.wxMessageBox("Please Reference All first!")
end

Obviously, if you have more or less Axis, you'll have to add or remove lines to reflect what you have.

I suspect this has saved me from some expensive mistakes!

20
Works in progress / (Mach4) wxLathe TouchScreen Friendly Version
« on: December 19, 2020, 07:12:46 AM »
The touch screen on my Lathe is fairly small (11") and I was struggling to see the text on buttons / controls.  Also, my fingers are big enough to press several buttons at the same time.

This is the standard wxLathe screen with the buttons enlarged, moved around a bit (to suit the way I like to use it) and the text size increased to make it all more readable.

I've removed some of the controls I tend not to use to make more space.

I've only made one small change to the page load script to make it run, having removed a control it referenced (spindle ratio).  Other than that, everything is as standard.

I've been using it for a couple of weeks, making tweaks here & there - but it seems to be OK.  Let me know if you find otherwise or if you think of a better way of doing something!


Pages: « 1 2 3 4 5 »