Hello Guest it is April 26, 2024, 10:41:54 PM

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 - mzc

Pages: 1
1
Mach4 General Discussion / Mach4 license verification check from LUA
« on: March 19, 2023, 03:47:11 AM »
Hi, I'm trying to figure out what the parameters are for the mcCntlCheckLicenseFeature LUA function.

e.g. "requirement" and "feature".

What I'm trying to achieve is a check at startup (in my custom LUA code) to warn me (big nasty popup window)  if I'm running under a demo license (or not if its a full (Hobby in my case) license).

The API reference does not give me too many clues on this, but of the 3 API functions that have "License" in their name, that one seems the most likely candidate.

Why?

After a Windows (10) update that I think ran on my PC a few weeks ago, when I was using my CNC yesterday (running the 1st job on it for the weekend), it stopped half way through. I figured out that Mach was in Demo mode. So I got the PCID, downloaded the license file from the web site and pressed on.

When I was shutting down the PC at the end of the day, Windows wanted to do an update (apply one), so I selected install/apply and shut down and went inside from the shed and didn't think about it again.

The next day (today), I got half way through my 1st CNC job and it paused again! AHHH! It was in Demo mode. It looks like the PCID had changed again after the update. So easily fixed with a new download from the mach website, but certainly irritating. I'd like to avoid that with a simple LUA script that warns at startup if Mach4 is in Demo mode. The title bar is just too easy to miss!

Cheers,

Michael.

2
Mach4 General Discussion / Elgato Stream Deck as controller for mach4
« on: January 17, 2022, 03:15:25 AM »
Hi,

Has anyone tried using an Elgato Stream Deck as a USB 'pendant'/hand control?

I currently use a separate USB numeric keypad at the machine (rather than a full keyboard), but it has limited keys and I need to be careful to disable the keyboard plugin/driver if I want to use the main keyboard for non mach4 tasks while a job is running.

I've looked that the HID Macros driver, and the mach4 keyboard plugin/driver takes full control of keyboard input so that's no good. I was looking at using that as it can take keys from a specific USB device, so I could (if it worked as I'd hoped) program just the num pad to do mach4 commands, and the normal keyboard would not interfere.

The Stream Deck might be good (re-programmable buttons with displays), BUT I'm worried it will suffer the same fate as HID Macros and be ignored by mach4.

Cheers,

Michael.

3
Mach Screens / Mouse scroll wheel zoom in toolpath window
« on: December 24, 2021, 01:08:44 AM »
Hi,

Quick question, from what I've discovered so far, the answer is no, but hopefully I'm missing something...

Is it possible to reverse the sense of the mouse scroll wheel so it zooms in/out the opposite way? Mine seems counter intuitive, and certainly the opposite way I'm used to in Fusion 360 (zooming), so switching between the two is slightly irritating!

Cheers,

Michael.

4
Just wondering if the Display Work Envolop button is meant to actually toggle the display of the soft limits in the tool path windows?

It did not seem to work for me so I was trying to add some lua code to do this with the API, however the API function to set this seems to do nothing.

I can turn the envolop display on and off by editing the screen set, and changing the property for the tool path widget, but surely I'm missing something here?

The "Tool Path Display Mode" that is mapped to the button as the "Left Up Action" does not seem to change the display of the limits in the toolpath, but the "Draw Limits" tick box in the tool path widget properties sure does.

5
Screen designer tips and tutorials / Screen GUI keyboard control
« on: August 08, 2021, 03:46:06 AM »
Hi All,

So I've recently upgraded from Mach3 + cheap USB controller to Mach4 + ESS on my newly re-built 3 axis CNC.

Way better on all accounts from what I've seen so far.

What I'm trying to do is edit the screen script and associated lua code to allow me to use a mini USB number keypad as a 'pendant', so I can use that at the machine to jog/zero and start/stop jobs, including adjusting the FRO and RRO (and ultimately spindle once I get a proper spindle) as jobs run.

I'm using the keyboard plugin, linking key presses to signals, and then assigning lua code to those signals in the signal handler script (which actually calls the signal table that's defined in the screen start script).

So for example, to have a keypress decrease the FRO by 10% (like clicking on the "-" button on the Feed Rate panel on the GUI), I do something like (in the screen load script's siglib):

[mc.ISIG_INPUT45] = function (state)
    if( state == 0) then
   -- FRO up
       btnFROUp_Left_Up_Script()
   mc.mcCntlSetLastError(inst, "FRO increase selected")   
    end
end,

So this works great, just like clicking on the button in the GUI.
The slider and dros are updated fine.

Now comes the hard part...

I want to do the same thing for the jog rate slider!
There is no buttons (and associated lua functions defined that I can find) that process the gui button event.

I can't find anywhere any hints at how SLIDERS in the GUI map to existing screen functionality.

I can see how to add custom functionality to sliders (not what I need to do as I don't want to interact with the GUI as such), and I can map custom functions to keypress events (and I almost had the jog rate changing) but the slider was not updating correctly.

So the general question (which will help me resolve this specific case), is where is the lua code that processes the slider data when it's changed in the screen gui?

Cheers,

Michael.

Pages: 1