Hello Guest it is March 29, 2024, 07:57:27 AM

Author Topic: MACH4 - Modbus  (Read 80297 times)

0 Members and 1 Guest are viewing this topic.

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: MACH4 - Modbus
« Reply #90 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.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: MACH4 - Modbus
« Reply #91 on: March 01, 2015, 08:52:42 PM »
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

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: MACH4 - Modbus
« Reply #92 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?

 

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: MACH4 - Modbus
« Reply #93 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.


 

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: MACH4 - Modbus
« Reply #94 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.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: MACH4 - Modbus
« Reply #95 on: March 02, 2015, 07:19:44 PM »
It wold be NICE if there was a Wizard Builder similar to the screen builder. The Wxformbuilder is NIVCE to look at but NOT very intuitive. I cannot find a proper manual and the Youtube vids are not very helpful. Out of focus ,no audio and they try to go at the speed of light with no explannations. Typical of LUA stuff very little docs .

BUT ONCE you spend 4-5 days figuring out the very basics  it is still a lot easy than doing it in Lua from scratch.

Maybe someone here could do a Youtuber and take their time in explaining the basics to create a simple Wizard with bells and whistles.

That would be a big help to all.

Just a thought, (;-) TP

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: MACH4 - Modbus
« Reply #96 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.
 

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: MACH4 - Modbus
« Reply #97 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.

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: MACH4 - Modbus
« Reply #98 on: March 10, 2015, 05:46:43 AM »
Since pretty MACH3 screens are not really related to Modbus, I started a new thread for Mach4 screen GRAPHICS specifically and posted my first experiments in 'Purdy Screen' there. There is a tiny video of a first try at a lighted rocker switch . .  8)

http://www.machsupport.com/forum/index.php/topic,29442.0.html

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: MACH4 - Modbus
« Reply #99 on: March 22, 2015, 03:59:22 AM »

I am doing some poking around to see what is available in the way of analog input to MACH4. I have seen some references to the 'analog register' in Modbus, but now I cannot seem to find it again. I also recall seeing something about getting the MgHz from a VFD or something like that. Again, can't seem to find it now.

So the question is;

Is there and facilities in the MACH4 Modbus implementation specifically for analog input.

Since Modbus, but spec can only xfer 16 bit numbers, it would seem that any analog (or PWM) would need to be converted on one side and interpreted on the other. But is seems like its worth asking the question, jus in case.