Hello Guest it is April 21, 2019, 02:50:58 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 - smurph

681
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 28, 2014, 09:09:18 PM »
Now to the constructive stuff...

I think you will be fine with what you have below.  I run it on an atom D2700 board with a Galil 4080.  If you have problems, you can turn the refresh rates down a bit.  We have them pretty stoked as compared to Mach3.  You should be able to run @ 25ms refresh rate though. 

Are there systems requirements? I'm looking at using an Asus Vivo PC VM40B computer to Mach 4 on my Bridgeport.
Specs:
Processor: 1.5GHz Intel Celeron 1007U
Cache:    L3: 2MB
Memory: 4GB    Type: DDR3 SDRAM
Graphics Card    Type: Integrated
Installed: Intel HD Graphics
Hard Drive: 500GB 7200rpm
Operating System: Windows 8 (64-bit)
Want to use Galil DMC 4080 motion control.
and PoKeys 57E connected to PoNET kbd48CNC
Still using AMC drives to Baldor servo motors.
Hoping Galil plugin for Mach4 will not take too long.

682
Mach4 General Discussion / Re: DRO Code differences
« on: April 28, 2014, 08:51:51 PM »
Thanks!  I'll try it out.

It may be that the jog planners are not picking it up.  Seems to work fine in files.

Steve

683
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 28, 2014, 08:48:55 PM »
Where do you get your stats from? 

684
Mach4 General Discussion / Re: DRO Code differences
« on: April 28, 2014, 08:13:22 PM »
Is G68 not working?  Can you give an example?

Steve

685
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 28, 2014, 04:35:14 PM »
If writing a plugin or a third party app, yes.  Contact Todd Monto.  You might want to get things rolling.  However, we won't release the API until all of the documentation is done.

Steve

686
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 28, 2014, 12:44:47 PM »
Is it going to be possible to remotely access and control Mach4 as I could with Mach3 using third party software such as:
Mach = (Mach4.IMach4)Marshal.GetActiveObject("Mach4.Document");
Script = (Mach4.IMyScriptObject)Mach.GetScriptDispatch();

Then using script.Code(Gcode);  to send the command to Mach4 to move the steppers etc.
I have tried this with the Mach4 demo but it wont connect or respond.

There is no DCOM interface.  Mach4 is cross platform and we had to choose a way of doing the remote stuff that is also cross platform.  There is a library that you will link to in order to accomplish this.  The full API is exposed.  Running scripts, etc...

Steve

687
Mach4 General Discussion / Re: DRO Code differences
« on: April 27, 2014, 10:36:27 PM »
A function is not a loop.  And not all loops are bad.  You just have to make sure that the loop will not loop for a long time (or forever).  But functions are a great idea.  Take a look at the Screen Load script.  That is where I put functions that are used by the PLC script.  So put your getAngle() function there and call it from the PLC script.

Steve

688
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 27, 2014, 09:03:40 PM »
I forgot to mention that the DROs highlight with a double click. 

Steve

689
Mach4 General Discussion / Re: DRO Code differences
« on: April 27, 2014, 08:19:13 PM »
The net does not have our API calls.  The documentation is in progress but it is a LOT of slow tedious work.

Here is a quick look at the screen API call available to LUA inside the Mach4GUI:

(All functions return a result code as their first return value.  0 == success)

number scr.ShowPage(string pageName); -- Show a screen page by name.
number, string scr.GetProperty(string ctrlName, string propName); -- Get a control's property value.
number scr.SetProperty(string NctrlName, string propame, string value); -- Set a control's property value.
number scr.ExecMdi(string ctrlName); -- Execute the contents of a named MDI control.
number, number scr.GetCurrentPage(); -- Get the current page.
number, number scr.IsControl(string ctrlName); -- Is this a valid control?
number, number scr.IsProperty(string ctrlName, string propName); -- Is this a valid control and property combination?
number scr.ButtonClick(string ctrlName); -- Simulate a button click event.
number scr.ButtonUp(string ctrlName); -- Simulate a button up event.
number scr.ButtonDown(string ctrlName); -- Simulate a button down event.

A word of warning...  DO NOT use loops in the PLC script.  It is a script that is designed to be executed like a PLC; top down.  The frequency of the script can be set in the screen set properties.  There is a lot of power here.  But with power comes great responsibility because it has the ability to completely ruin your day if you are careless!  There is nothing preventing you from adding loops or setting the PLC script to run every 1 millisecond.  It will happily let you do these things with a smile.  So be careful!

Steve

690
Mach4 General Discussion / Re: DRO Code differences
« on: April 27, 2014, 03:35:40 PM »
number SetProperty(string ctrlName, string propName, string newValue)

The function is int the "scr" table.

scr.SetProperty('droXy', 'Value', tostring(XYval));

All parameters are strings.  So you have to convert the XYVal into a string with tostring().  Now, this does not control the format of the DRO.  That is done with the Format property that should already be set.

Any property of any control can be set this way.  The property names for the controls are what are used in the properties grid in the editor.  There is no documentation that lists the properties of each control yet.  Just look at them in the properties grid and use what you want.

As I said, look to the PLC script as an example of this function where we make the Enable button blink.

Hint:  Where there is SetProperty(), there is also a GetProperty() making it possible to read the properties of any control.

Steve