Hello Guest it is April 23, 2024, 11:28:12 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 - simpson36

171
Mach4 General Discussion / Re: Needing help with Wizards
« on: March 05, 2015, 03:24:23 PM »

I also decided to side-step it.  It's another can of worms and if I need it, I'll open it.  ;)  

As you may have already found out, you can pre-populate your wx.wxTextCtrl fields by setting something in the "value" box in wxFormBuilder.  I found this to be an acceptable compromise.


I have this figured out and working. It's not that bad of a process. You can pre-populate with the stored values (or strings) which is what I wanted to do. Sounds like you didn't want to fool with it, so I won't bother to post it.  If you decide otherwise, just give me a holler.  

Thanks for the wxfunction listing!

172
Mach4 General Discussion / Re: Needing help with Wizards
« on: March 04, 2015, 03:48:45 AM »
Thanks Brett   8)


Bodini,

Before I was informed (no pun intended) about wxFormbuilder, I started with the BoltCircle sample wizard. I was pretty far along unraveling that beast when I got wxFormbuilder to play with. It is apparent that it was used to create some of the wizards and indeed the BoltCircle has a function in it to write data to the .ini  file. For the time being, I sidestepped that whole operation, but left the function in the code in case I want to go back and tinker with that.

For the wizard I was creating, only a small amount of the code was screen ops (plagiarized from the BoltCircle Wizard, so I pushed on and finished the thing 'manually'. Wx *seems* to have its own library as the commands and syntax are different from straight Lua. It is a challenge to start with an existing wizard and reverse engineer the structure.

However, I did complete my little utility. Screen attached.


173
Mach4 General Discussion / Re: MACH4 - Modbus
« on: March 04, 2015, 03:23:54 AM »
The screen can be changed to anything you like.  It is a bit spartan.  Believe it or not, that screen design is over 15 years old!  It came from my milling machine GUI front end for Galil controllers way back in the 90's (before I stumbled upon Mach3).  When we were developing the Mach 4 core, and hadn't really done a GUI or any sort at that time, we needed something quick and dirty to test with.  So that old code/screen design is what I had from way way back and it became wxMach.  Then when we did the user configurable GUI, the test was to see if we could duplicate wxMach with Mach4GUI.  And we did, as unfortunate as it may seem.  :)

I'll be the first to admit that I have no "flare" for GUI interfaces.  Not my cup of tea, so to speak.  In fact, I can't do anything artistic as it pertains to drawing or anything visual.  I have to leave that up to people that have the talent for it.  I like DOS screens.  And I think the Fanuc screens are "works of art".   :)

Steve

I see that image T-buttons has been added!  That was fast!  I tend to think of 'MACH Time' as 'Bullet Time' in the movie; Matrix. I may have to revise that thinking  ;)

So that we may compare Cinderella before and after I am attaching the first round Mach4 InTurn™ screen in all its ugly dress. Then I will post again when it's ready for the ball.

174
Mach4 General Discussion / Re: MACH4 - Modbus
« on: March 04, 2015, 03:17:12 AM »

Right now I don't have time to really dig into the wx tools. My first impression is that the tools *seem* use an extension or library that has different commands and different syntax than Lua, so at this point I am not convinced it will be the nirvana that is has been described as. I have only a tiny bit of experience with it at this point, but in general, I find it can be frustrating to bounce back and forth between languages and wxFormBuilder sort of forces that on you even though everything is in 'Lua'  . . . . supposedly.

If you need to make a lot of forms and you bounce back and forth between the several languages that are supported, then undoubtedly having a single tool to kick out code in each language would definitely be a significant time saver. For example if I needed a 'form' in C++ that is identical or very similar to one that I already did in Lua, and if that can be loaded into wxFormBuilder and simply regenerated in another language . . badda bing!

Terry, speaking of forms, what is the status of your wizard. You were going to attack treading next and you were going to give me a sample to play with.
 

175
Mach4 General Discussion / Re: MACH4 - Modbus
« on: March 02, 2015, 07:11:16 PM »


All done! Probably a lot easier and faster to start from scratch with a tool like the Formbuilder that to reverse engineer an existing example.

Formbuilder apparently generates 'project files' which one might assume have all of the resources used in the form making it very easy to go back and edit the screens that you have made. You miss out on this if you start outside with an existing screen program.

This little configurator finishes my project, so far as it relates to Mach4, so I'm off to other tasks, but I'll stay subscribed to this thread and answer questions if I am able to.

176
Mach4 General Discussion / Re: MACH4 - Modbus
« on: March 02, 2015, 09:27:53 AM »
As soon as I downloaded and started to play with the FormBuilder it became apparent that it was used to create the sample MACH4 Wizards.

Since I am already pretty far along with modifying the supplied sample BoltCircle wizard (the screen ops are relatively minor compared to the 'guts' of the program), I'll finish on that base and do the next project from scratch using the FornBuilder Tool.


 

177
Mach4 General Discussion / Re: MACH4 - Modbus
« on: March 02, 2015, 05:35:09 AM »
HIYA Steve, Just a suggestion but doing the BoltCirlce Wizard example is the HARD way. I have worked with it and it is a beast.  Do try the WxFormBuilder I think you will like it over the LUA way.

Just a thought, (;-) TP

Hey Terry,

Thanks, I'll give that a try. The BoltCircle wizard is difficult to comprehend with no documentation and it seems like the syntax is not standard Lua, so I'm sort of scratching my head wondering where some of the stuff came from . 'math.sin' and stuff like that.

The code that I added is just the normal Lua syntax and calls from the MACH4 'LuaCALLS.txt' file, so I should be able to just drop them into another program and not loose all of that time.

Did you use WxFormBuilder to create your wizard?

 

178
Mach4 General Discussion / Needing help with Wizards
« on: March 01, 2015, 06:12:32 PM »
Hi simpson36,

I would use wxFormBuilder to create the dialog, . . . . .

Andrew with MachMotion

I have the Lua distributions up to the newest 5.3 and whatever comes with MACH4. wxFormBuilder is not present. Where would I acquire this tool?

179
Mach4 General Discussion / Needing help with Wizards
« on: March 01, 2015, 06:07:02 PM »
Hi simpson36,
I don't know what your going to do with this project,


This is the 4th axis motor controller. Note the date of the video upload. The device is much more powerful and capable in it's current version. The project is porting it over to MACH4 interfaced with TCP Modbus

https://www.youtube.com/watch?v=vBLuF_F2_qs


but if you need mach to write these settings to modbus every time mach starts up you should make a 2 functions, one that reads the settings from the dialog and saves them to the ini, and a second function to read from the ini and write them to the modbus registers.

Good Luck,
Andrew with MachMotion

The parameters are stored in the controller. They are used to calculate the correct frequency for the step signal to produce the correct Spindle RPM. The only reason to keep them in MACH4 is to show the user what the current settings are without needing to read them out of the controller.


i.e. the user prompt reads: "Encoder Resolution is currently 266144, enter new value or Zero to keep"


Still a good tip though, thanks. Can you be more specific about storing data in the .ini? It would need to be registers that MACH4 already stores, yes? You can't just arbitrarily write data into the .ini, I would assume.

180
Mach4 General Discussion / Re: MACH4 - Modbus
« on: March 01, 2015, 05:38:11 PM »

Incidentally, I started on a 'configurator' program by plagiarizing the BoltCircle Wizard. Slow going and I suspect down the wrong road.