Hello Guest it is April 19, 2024, 07:16:58 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.


Messages - mzc

Pages: 1 2 »
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
Thanks Craig, this was just the info I needed for my mach4 GUI.

Hi,
I reused a piece of LUA code I found in one of the LUA Examples folder that ships with Mach4.
It is a file navigation panel which allow you to browse for a file and open it. Its structure and
operation owe more to wxWigets than LUA or Mach4....

3
Hi Steve,
I was trying to refresh the toolpath window from lua code also.

Look up mcToolPathGenerate in the Mach4 Core API docs.
rc = mc.mcToolPathGenerate(number mInst)

While the function seems to do what is advertised, I don't understand the following code's behavior 100%:

   mc.mcCntlSetLastError(inst, "Hello")
   local rc = mc.mcToolPathGenerate(inst)
   mc.mcCntlSetLastError(inst, "World")

The "Hello" is printed in the History/Debug window, but the "World" is never printed.
I'm guessing the GUI state is reset in addition to the toolpath being generated or something. The API doc's don't really help.

Subsequent GUI actions that cause History output write output as expected.

Anyone know why this is so?

Cheers,
Michael.


4
Mach4 General Discussion / Re: Jog problem, stuck key symptom
« on: March 27, 2022, 07:48:50 AM »
Has anyone else seen this happen, or know of a solution that does not involve restarting Mach4 (which is not always convenient in the middle of a multi-program setup).

I see 2 or more keys 'stuck low' as shown in the keyboard diagnostics, and no other keys work.
When I press the 'stuck' keys, they seem to get unstuck (as per the diagnostics), but until I restart Mach4, no keypresses are processed even though they show in the diagnostics window.

5
Mach4 General Discussion / Re: Elgato Stream Deck as controller for mach4
« on: January 17, 2022, 05:30:25 AM »
Quick follow up, tried the elgato stream deck driver with their mobile app version of the device (free for a month), and it worked fine with mach4. So it's looking like a viable option for a controller for mach4.
Basically what I'm trying to do is control mach4 for my most common use cases without having to use a mouse, hence the usb num pad (existing solution).

6
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.

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

8
Yes, thanks for that. That works fine.

I guess it makes sense that messing with strictly screen aspects of the code will not require calls to the mc. functions (core API).

This begs the question, where are the src. functions, and the Properties etc documented? I can't find the GetProperties method (if that's the right lingo for lua) documented or implemented anywhere in the installed files.

9
I can get the limits to show in the tool path windows by editing the screen set as you way,  can't get the limits to toggle on/off with the button in the tool path ops tab, or with the API and some lua code.

10
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.

Pages: 1 2 »