Hello Guest it is April 25, 2024, 03:03:40 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 - SwiftyJ

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 »
181
Mach4 General Discussion / Re: how set the button state
« on: February 04, 2020, 04:12:11 PM »
Instead of “Down” use “0” (up) or “1” (down)

182
Mach4GUIR.exe should already be in your Mach4 installation folder. If not, you will need to update to a more recent version

183
Mach4 General Discussion / Re: Create elements in Mach 4
« on: January 28, 2020, 08:07:02 AM »
You could probably achieve it using wxWidgets.

Take a look at https://docs.wxwidgets.org/3.1/annotated.html (Note: not everything shown here is available in Mach4 as it uses wxLua)

wxFormBuilder will help you create the Lua code which can be used inside a Lua Panel in the Mach4 screen editor

The wxGenericDirCtrl control is a good starting point,  this may do what you want..  https://docs.wxwidgets.org/3.1/classwx_generic_dir_ctrl.html

Thanks

184
Mach4 General Discussion / Re: Safe and reload a Value
« on: January 20, 2020, 04:24:52 AM »
It looks like the settings are saved to the profile when values are entered into the DRO using the 'On Modify' script. The values are then read using Probing.LoadSettings() function found in the mcProbing module. This is called from the PLC script in the 'PLC First Run' section. It is just manually reading the value saved in the profile and setting the DRO to display it.

In order to read the value you save to the profile for your custom DRO, just add the relevant code to the Probing.LoadSettings() function in the mcProbing module.

185
Mach4 General Discussion / Re: Zeroing and extents
« on: January 09, 2020, 03:15:09 AM »
You can turn on/off 'Draw Limits' using the following code. You will need to replace 'toolpath1' with the name of your toolpath if it is different.

To turn off
scr.SetProperty('toolpath1', 'Draw Limits', '0')

To turn on
scr.SetProperty('toolpath1', 'Draw Limits', '1')

186
Mach4 General Discussion / Re: Homing - Reverse Direction?
« on: December 19, 2019, 11:36:40 AM »
From the top menu go to Configure>Control and then select Homing/SoftLimits. The first column is Home Dir where you can select the homing direction for each axis

187
Mach4 General Discussion / Re: Mach 4 Exit button for touchscreen
« on: December 18, 2019, 03:13:04 AM »
To modify GUI items without going into the screen editor you can use the following API commands.
scr.SetProperty('ControlName', 'PropertyName', 'Value')

ControlName is the name of the control as seen in the screen editor tree
PropertyName can be any of the properties you see in the properties table in the screen editor
Value is just the value to change it to.

These 3 things must be entered as strings.

For example, to change the name of a button:
scr.SetProperty('btnZeroX', 'Label', 'ZeroX').

There is also the scr.GetProperty which you can use to retrieve properties from controls e.g. text from labels.

Regarding using 'Enter' to execute the MDI, you could set up a label and use the 'On Modify Script' to read the text entered and then execute it. But the 'On Modify Script' also runs when focus is lost from the label so may not always behave correctly.

Embedding the tool table into Mach4 hobby may be possible using wxwidgets but would be a lot of work unless you're already familiar with it. You can set a screen button to display the tool table rather than going through View>Tool Table if that is any better.

Hope this helps


188
Mach4 General Discussion / Re: Mach 4 Exit button for touchscreen
« on: December 17, 2019, 08:11:19 AM »
Try using scr.Exit(true)

189
Mach4 General Discussion / Re: Switch one output with 2 different signals?
« on: December 04, 2019, 07:07:39 AM »
Assuming you are using a toggle button can you not just assign the 'Spindle On' output to the button at the bottom of the properties window in the screen editor?

190
Mach4 General Discussion / Re: MACH 4 screen contrast
« on: December 03, 2019, 04:48:49 AM »
You may not be increasing the widths by a big enough increment. I usually start at increasing by 50 each time and then fine tune from there

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 »