Hello Guest it is May 23, 2024, 11:19:20 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 - Analias

Pages: « 1 2 3 4 5 6 7 8 9 10 11 »
21
Mach4 General Discussion / Re: Debugging Lua code...
« on: March 13, 2018, 01:18:43 PM »
from modules directory mcErrorCheck.lua

[ 0] = 'MERROR_NOERROR',

According to the API docs mc.mcGetInstance() does not return an error value, only a handle value. In this case it being zero is a problem and really does suggest that something was done out of order or not at all with how the code was run.

22
Mach4 General Discussion / Re: Debugging Lua code...
« on: March 13, 2018, 12:36:58 PM »
If I'm reading this correctly, error -17 is assigned to mc.MERROR_API_INIT. This would suggest something was done out of order and the API hasn't been initialized yet. The first print statement shows that 'inst' is set to '0'. I have never seen an instance value of zero. Zero or negative numbers usually suggests a problem.

-Captain Obvious

23
Mach4 General Discussion / Re: Debugging Lua code...
« on: March 12, 2018, 06:36:27 PM »
Thanks Steve;

Excellent coverage on the issues. I'll have to read the document and reread what you posted bring it together in the way I'm doing work.

The last part about the ScreenScript.lua may explain why the exception messages in the log output are sometimes way off from the line numbers I'm expecting in the file as I edit it. I wonder if Lua has the ability to do something like C/C++ with #line preprocessor command. It would be nice to have accurate line numbers in the exception messages. Then again, I could just go look at the line in the ScreenScript.lua and match it up with the code I'm editing.


24
Mach4 General Discussion / Re: Debugging Lua code...
« on: March 12, 2018, 05:35:01 PM »
Thanks Steve,

I am also writing modules that are outside of my screen set for a different approach to probing/offsets using a master tool or touch plate. I also need to implement tool measurement with a laser. Is it safe to assume that I can set break points within these modules and debug them the same way as described in the document?

I noticed that when I run ZeroBrane from within the screen editor, that I have to close and restart it each time I edit a UI event script. This can be a bit annoying if you are in the middle of a piece of code and you need to touch event handlers. Is it possible to keep the ZeroBrane running and have tabs added and removed as needed? Having ZeroBrane open shouldn't keep you from interacting with the screen editor. At the moment it does. I realize this would require some form of IPC between Mach4GUI and ZeroBrane. ZeroBrane may not even support it.


-Freeman

25
Mach4 General Discussion / Debugging Lua code...
« on: March 12, 2018, 02:53:43 PM »
The Mach4 alpha came out I seem to remember a debugger that allowed you to set break points in code and then while Mach4 was running normally, you could examine the state of your code at the break point.

Is that still available with build 3713 (the latest Dev build) with the new ZeroBrane support?

Are there any best practices for debugging modules while Mach4 is running?


-Freeman

26
I often find myself, when working on a Mach4 screen set, wanting to refer back to the unmodified or previous version. Usually just to verify UI layout or behavior. With a single Mach4 instance you have to exit the screen editor, view the other screen set, look at what you loaded the screen for, and then revert back to the screen set you were editing.

Is it possible to run two instances of Mach4GUI on the same machine if they use the simulated motion engine?


-Freeman

27
Mach4 General Discussion / Bug reporting?
« on: March 03, 2018, 12:54:25 PM »
Is there a blessed way to report bugs?  I don't see a forum category or a bug report page on the web site. It would be nice if there was a bug reporting mechanism in the app at the time it crashes so it can phone home and allow user to say what they were doing.

I just ran into a problem where Mach4GUI crashed when I tried cut and paste a handful of UI elements from the wx4 screen set into my own. I was trying to cut and paste them since it appears that I cannot export individual UI elements like the history or mode line.


-Freeman

28
Brains Development / Re: User LED values not tracking correctly
« on: March 01, 2018, 12:32:07 PM »
When I say the user LED (1898 or 1987) tracks opposite, I mean the second line of the brain attempts to set the user LED correctly (I can see that when watching the brain), but the user LED in the next line actually shows the inverse of the value.

-Freeman

29
Brains Development / Re: User LED values not tracking correctly
« on: March 01, 2018, 12:30:12 PM »
I posted my reply early by mistake - I have edited it. Please re-read the current edit.

30
Brains Development / Re: User LED values not tracking correctly
« on: March 01, 2018, 12:22:46 PM »
Oops, the brain I included I tried changing the user LED number to check if I might have used a previously used one. In the end it should be the same difference. Both user LED 1898 and 1897 are used for the same purpose in this brain.

As for the AND and user LED 1897 - you would think that is true, but remember I said the user LED is tracking opposite to the value. The intent here is if the user LED is already set, it doesn't try to set it again. Perhaps over kill, but removing it doesn't change the over all behavior of the brain file.

Let me ask you this question. I maybe trying to implement the behavior all wrong. How would you meet the two goals I listed?


-Freeman

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