Hello Guest it is May 05, 2024, 01:08:13 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 - native34

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 »
11
Mach4 General Discussion / Re: Mach 4 Exit button for touchscreen
« on: December 19, 2019, 12:34:43 PM »
Ok so i'm trying to get mach to recognize an Enter keypress. Here is the code i found pertaining to keypress in LUA. I have a textbox that i want to enter code and when i press the enter key i want the code to run as an MDI command. The code below is supposed to recognize when an enter key is pressed, I have all this in the On Modify Script of the textbox. When i write something in the textbox and press enter nothing happens. What is the purpose of the On Modify Script, and the On Update Script?

while true do
    if keyPress(13)==true then
        wx.wxMessageBox("You Just Pressed Enter")
    end
end

12
Mach4 General Discussion / Re: Mach 4 Exit button for touchscreen
« on: December 18, 2019, 09:57:56 AM »
Is there a list of all the API commands available in Mach

13
Mach4 General Discussion / Re: Mach 4 Exit button for touchscreen
« on: December 18, 2019, 09:40:33 AM »
Thank you for the information. That gives me a good place to start. How does one know which API's are usable inside this programming for Mach, or is it open to any API?

14
Mach4 General Discussion / Re: Mach 4 Exit button for touchscreen
« on: December 17, 2019, 01:30:58 PM »
Is it possible to get a tool table embedded into the screen of Mach 4 instead of the popup window, without having to go the route of Mach 4 Industrial

15
Mach4 General Discussion / Re: Mach 4 Exit button for touchscreen
« on: December 17, 2019, 10:48:47 AM »
One of the things i would like to have happen is implement a textbox for single MDI commands. I would like to be able to enter the Gcode into the textbox and hit enter and have the code run on enter, and not have an additional button for enter.

16
Mach4 General Discussion / Re: Mach 4 Exit button for touchscreen
« on: December 17, 2019, 10:45:02 AM »
How does one go about accessing form elements in LUA? For instance I have a form with a button and i want to change its text label using code instead of the properties table, or other properties. I used to be able to do things like this in Visual Basic and .NET, when i dabbled in this suff. I'm just trying to get my Mach 4 screen to look and feel a certain way, I'm not trying to become a Mach programmer, so im not into knowing the complete ins and outs of Lua and mach programming.

17
Mach4 General Discussion / Re: Mach 4 Exit button for touchscreen
« on: December 17, 2019, 10:15:04 AM »
Thank you for the help got it working. The following code is what works in case someone else is having the same issue

local hReg = mc.mcSignalGetHandle(inst, mc.OSIG_MACHINE_ENABLED)
local machEnabled = mc.mcSignalGetState(hReg)

if (machEnabled == 0) then

   scr.Exit(true)   
   
else
   
   wx.wxMessageBox("Machine Must Be Disabled Before Exitting!")   
   
end

18
Mach4 General Discussion / Re: Mach 4 Exit button for touchscreen
« on: December 17, 2019, 09:46:12 AM »
Thank you, not sure how that is different from os.exit(). It seems to do the same thing. The part i'm having issue with is getting the code to determine the enabled/disabled state. Is there any documentation on how to work with the form elements in Mach 4?

19
Mach4 General Discussion / Mach 4 Exit button for touchscreen
« on: December 17, 2019, 08:07:26 AM »
I am trying to create a button that i can use to close out Mach 4 when done using it. Im using a touchscreen and hitting the red x is not an option as it is to small in the corner of the screen to get my fingers in there. So i am trying to create a button to perform this task, what i have is the code listed below, but it doesn't seem to work. When the button is clicked I would like it to check to see if the system is enabled or disabled. If it is disabled it can procede to shutting down Mach 4, If the system is Enabled it will display a message telling you to disable the machine before shutting down. I can't seem to find The system variables that will produce the desired results. I'm also not a great programmer either.

if (mc.OSIG_MACHINE_ENABLED == nil) then
   os.exit()   
else
   wx.wxMessageBox("Machine Must Be Disabled Before Exitting!")      
end

20
Could someone please explain to me what the purpose of the following items are and what their purpose is. The Trace tab, The Touch button and how is it different from the Probing Tab

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