Machsupport Forum
Mach Discussion => Mach Screens => Works in progress => Topic started by: elpablito on April 25, 2010, 11:14:34 PM
-
This is my first release of the screenset I have been working on (download at the bottom).
Still many features are missing but I will be adding them in the future.
Im almost new to CNC, almost new to Mach, new to flash, new to actionscript and new to VBScript. so this has been a challenging job.
Im sure you will find many bugs and issues, I will try to fix them.
Please read the README.txt I have included before installing.
When you install it, please post so I know youre trying it.
Thanks
Pablo
(http://www.gausstek.com/toolchange3.jpg)
DOWNLOAD:
www.gausstek.com/Ru Screen.rar (http://www.gausstek.com/Ru Screen.rar)
-
Looks great, will test things out and report back.
I am not sure if you are already doing this but I found it helps create screens faster and even more reduces resources.
You can get the current objects on the stage with typeof
and Object_Name in _root
So you could grab all of the objects and there names and automaticaly create functions for them. You can also store up what was there before they moved to another frame and remove the "watch" function. This is important because since we are watching from the root they are always there and active even when you may not need them. This can cause a LED to fire off a function even if the code isnt on that frame.
This is what I do, and if you have a special function just put an indicator in the objects name.
///Create buttons and LED's Function
LED_Watch_function = function () {;
//remove any watch functions;
for (var w:Number = 0; w<_root.Stored_watch.length; w++) {;
_root.unwatch(_root.Stored_watch[w]);
};
///declare;
_root.Stored_watch = Array();
i = 0;
///Loop and find all objects named LED*********X EX:(LED_800);
for (var Object_Name in _root) {;
///Is it a movie object to nerrow it down;
if (typeof (this[Object_Name]) == "movieclip") {;
//-------------------------------------------------------------------------;
///does it have LED in the name;
if (Object_Name.indexOf("LED") == 0) {;
//What is the LED number;
LED_OEM_num = Object_Name.substr(3, Number(Object_Name.length-7));
//check current state of the LED;
if (_root["LED"+LED_OEM_num] == 1) {;
_root[Object_Name].gotoAndStop("on");
} else {;
_root[Object_Name].gotoAndStop("off");
};
///This function is create for each object with LED for its name<<<<<<<<<<<<<<<;
_root["LED"+LED_OEM_num+"_function"] = function (varName, oldVal, newVal) {;
//Call function (optinal);
_root[varName+"sub"](newVal);
//check cuurent state of the LED;
if (newVal == 1) {;
_root[varName+"_mov"].gotoAndStop("on");
} else {;
_root[varName+"_mov"].gotoAndStop("off");
};
return newVal;
};
//Watch the LED;
_root.watch("LED"+LED_OEM_num,_root["LED"+LED_OEM_num+"_function"]);
//Store it to remove later<<<<<<<<<<<<<<<<<<<<<<<<<;
_root.Stored_watch[i] = "LED"+LED_OEM_num;
i++;
};
};
};
};
//end function;
-
Hi zealous, thanks for your post.
Im a flash newbie and im not quite sure of the benefits of the code youre sharing.
My led movieclip code is quite simple
this.LedFunction = function(varName, ov, nv) {
if (nv == 0) {
gotoAndStop("off");
} else {
gotoAndStop("green");
}
newVal (nv);
return nv;
};
_root.watch(this._name,this.LedFunction);
if (_root[this._name] == 0) {
gotoAndStop("off");
} else {
gotoAndStop("green");
}
I declare the newVal function on the onClipEvent(load) of the led in case I need a special behavior.
Can you explain to me in more detail what would be the benefit of doing it the way you suggest?
Thanks
-
yeah that will work fine.
I had just come up with a way to just name your object and it would create the watch function dynamically depending on the name of the object by using that function.
What you have works well.
If you want to gather anything that Flash is using you can do a debugger check with this.
for (var Object_Name in _root) {
trace(Object_Name)
}
thanks,
Jason
-
I was about to write a rant in your other thread and then I saw the last post linking to this download page. Why would you flaunt this thing in front of everybody and not let them try it? Just for show-off? :)
Anyway... per your instructions, I'm trying it and will report back.
-
Hi FXG,
I was changing the code to allow for external macros. It took me some time cause im very new to flash and each thing I want to achieve I first have to learn how.
Its better a rant for not sharing than a rant for damaging your cnc...
Thanks for trying it
-
this is a great way to dynamically import stuff, for example Macros:
vbdata = new LoadVars();
vbdata.onData = function(vbsrc) {
var myvb = vbsrc;
vbformated = myvb;//.split("\n");
sendvbcode.text = vbformated.split("\r").join("");
};
vbdata.load("C:\\Mach3\\Flash\\UserMacros\\usercode1.txt");
-
Right zealous, thats what I do.
Except that I read all the macros that are listed in the RUCONFIG.INI file and store them. Then I can call them by their name when i need them.
var inifile:LoadVars = new LoadVars();
var macrofile:LoadVars = new LoadVars();
var varname:String = "";
var gcodelines:Array;
var mindex:Number;
var timreadmacro:Number;
inifile.load("RUCONFIG.INI");
macrofile.onData = function(macrotext:String) {
_root[varname] = macrotext;
ReadNextIniLine();
};
function ReadNextIniLine() {
var readstarted:Boolean;
do {
readstarted = false;
if (mindex<gcodelines.length) {
var linea:String = gcodelines[mindex++].toUpperCase();
if (linea.substr(0, 2) != "//") {
var igualpos:Number = linea.indexOf("=");
if (igualpos>0) {
var thisvar = linea.substr(0, igualpos);
var vcontent:String = linea.substr(igualpos+1);
if (linea.substr(0, 5) == "MACRO") {
readstarted = true;
varname = thisvar;
macrofile.load(_root["PATHMACROS"]+vcontent);
}
else {
_root[thisvar] = vcontent;
}
}
}
} else {
readstarted = true;
}
} while (readstarted == false);
}
inifile.onData = function(gcodetext:String) {
gcodelines = gcodetext.split("\r\n");
mindex = 0;
ReadNextIniLine();
};
function CallMacro(macro:String) {
var mt:String = _root[macro.toUpperCase()];
macrocode.text = mt;
fscommand("VBMacro", mt);
}
-
Nice!
Things seem to be working well, will run it on my machine and report back.
-
Hello,
i try also to test and run your new screen. Realy good, but i have some problems to run it.
- i use Mach3 last lockdown version licensed but in simulation mode on a laptop.
- i have installed Mach3 on d:\mach3.
- i also adapt the path in ruconfig.ini and copy the macros to the right path.
but i have when i load a gcode file no path to d:\, only to c:\ selection is possible,
double click on the change path icon (for drive) doesn't work.
Also when i load a gcode file thru the menu, i see the generation of the file in toolpath,
but not the gcode program list. Running is also impossible.
I attach a screenshot.
Thank's for sharing all this work.
Fabrice
-
Hi Fabrice, thanks for testing.
Youre right I have that C:\ setting hard coded. I will correct that and repost in this forum
Regards
-
V1.31
This version corrects the problem of the C: being hardcoded.
I added drive selection capability. When you close mach, the last path used is remembered so you dont have to browse for your code folder everytime.
Also added the version textbox at the bottom right corner of the load screen.
Please report any bug you may found and I will correct them asap.
Thanks
-
This is V1.31
-
Good evening,
i downloaded the last version. The selection of file thru more drives run well, thanks.
Now i can load a file but the screen are not generated, and can also not running the simulation.
The gcode listing is display ! Button MDI doesn't work too !
I place here a new screenshot.
Fabrice
-
Hi Fabrice,
I have intentionally disabled the MDI button because that screen is not yet finished.
I will look into your problem to see if I can reproduce it here. I think it may be related to mach configuration.
Thanks
-
Fabrice,
For some reason mach is not loading your gcode file. If you check at your screen captures where the file name should be it reads "No File Loaded"
The code is loaded by flash independant of mach, thats why you can see it, but you cant run it because mach did not load anything.
Check if the same happens with the sample code files that come with mach like Scorpion or roadrunner.
When in the load screen, when you press on a file you should see the toolpath preview.
Also please send me the gcode file you are trying to load so i can use it to correct the bug
Regards
Pablo
-
In order to view the screen properly, please download and install this fonts into your system.
Thanks
-
Hello,
so i test a little, with the right font, it is better.
But i still have problems with run.
Run doesnt start immediatly. I think i have errors but
i no see that displayed. I need to push many time the run button
for a correct start of the sequenz.
best regards,
-
Hi Fabrice,
Some buttons, as the Start button, that when unintentionally pressed may lead to a crash or accident, are protected by a safety timer.
You have to keep the button pressed for the specified time. If you release it before, the event will not trigger.
The default time value for the Start button is 500ms , and when in step mode 200ms.
You can change that to the value you preffer in the RUCONFIG.INI file.
regards
PD: The screen aspect is designed for 1280x1024 screen resolution
-
Hi Fabrice,
Some buttons, as the Start button, that when unintentionally pressed may lead to a crash or accident, are protected by a safety timer.
You have to keep the button pressed for the specified time. If you release it before, the event will not trigger.
The default time value for the Start button is 500ms , and when in step mode 200ms.
You can change that to the value you preffer in the RUCONFIG.INI file.
regards
PD: The screen aspect is designed for 1280x1024 resolution
-
ok, nice to know. ;)
in this case, i have less problems !
tests continues.
-
New update:
1.33 New and modified Macros: RefX,RefY,RefZ, M6Start, M1001
Some corrections to the toolchange slider
Correction to the bottom bar
Added Estimate time in the load screen
Added diagnostics screen.
Some leds can be changed by clicling on them or their label
Added optional stop feature.
To make an optional stop code must have 2 consucutive lines:
M1001
M01
Could not do it through M01 alone because theres no optional stop led for it.
Added rapids override button on feed override slider.
I may change its location in the future because it does not work while part is running
There may be new bugs. Please report them
thanks
-
Hello,
i test, i test...
When you hit the first time a button zoom or pan or tilt,
sometimes it doesnt activate. I need to click first on the activ
view button, and after on the required view button.
I have also trouble with the wizard.
The system say that a script is slowdown the running of adobe flash player.
I need to stop the script and exit mach3 to can restart again.
This 2 problems was already in the first version.
i no found the gcode that doesnt open the last days, i will search it...
Next this evening or tomorow
Fabrice
-
Hello again;
it seems that the file in error was the example gcode roadrunner from Mach3.
Fabrice
-
Hi Fabrice
The readrunner runs fine here. I use it all the time to test.
Can you please be more specific about the wizard problem so I can reproduce it?
Like what values you are entering, in wich wizard.
Also if possible opst your xml config file.
thanks
-
Hello
for the wizard take Surface wizard for example.
For end X and Y value 10, step 1.
I can use any of the 5 wizards, i still have the same problem.
It is the same with entering value or without entering value
I send you a screenshot and the xml config file.
i have problem actually to attach a file to the board,
message error that this file already exist !
The roadrunner file open yet in version 1.31 and 1.33
1.31 with font loaded the roadrunner file.
Fabrice
-
me again,
so i test the screen now on the cnc pc.
It run under xp 32 bits , and i have not the problems
with the wizard. The wizard generate correctly the gcode.
I need now to unterstand the macros to adapt your screen
to my machine.
Loading of gcode file are also correct, running also.
Next here some news,
Can you open the MDI command field so i can test it to ?
Fabrice
-
Hi Fabrice,
I havent made the mdi screen yet. As soon as I have it i will share it
Regards
-
New Version V1.34
1.34 Corrected a bug found by Fabrice Engel.
when a wizard was posted, the values where taken from dros without being validated.
This caused the screen to crash when the values had never been edited.
I have added validation, but still some combination of values may lead to crash,
specially when generating too many lines of code.
Corrected graphic problem with depth in straight cut wizard and list of holes in holes wizard
-
Morning Pablo,
thanks for correcting. So i test the wizard on the laptop.
Now it run :)
But the wizard Rect Pocket doen't open. All other 4 are ok.
I cannot add hole coordinate with the + button, but i suppose
that is the normal way to do ! ok, not so quick, i need to learn
how is the concept.
Best regards,
Fabrice
-
Hello,
so i am trying to replace some macros (yes trying because i am not able to understand each macro).
I was able to adapt the RefAll macros (because i copied the original orders), but it is an other
way for Probe macro. I use the screen Aqua, that is provided with a macro for the Probe Z high.
Can you explain how the part Probe run. (Initial offset and Z-Touch).
That can be helpfull for me to adapt the macro from Aqua.
A suggestion, if the probe screen is open, you hide a part of the status line.
Can you please dock higher the flash screen ?
Thanks,
Fabrice
-
Hi fabrice,
the auto zero bueeon and probe slider are actually for zeroing the part (maybe I used the wrong name)
I have a fixed zero touch plate installed in my machine, and I do manual tool change.
So when I put the first tool, I use the probe slider to zero it. When it is ready where i want it to be, I press the "initial tool offset" button and the tool travels to the fixed plate and measures.
Then each time I change a tool, I dont have to worry for the z zero. I just put it and press the auto zero button. The tool travels to the fixed plate and measures, and addapts the z zero according to the first tool.
1) Put first tool.
2) Set X,Y,Z manually or with the probe slider
3) Press the "initial tool measure" button to measure the tool against fixed plate
4) Run program
5) When toolchange is requested, change tool manually and press auto zero.
Hope that clarifies. I will correct the slider problem you reported
regards
-
Hello Pablo,
i have some days off so i will print the macro on paper and learn a bit (little :)
I hope i reach the goal, because i want to use your screen for my
hobby, and it is important for a good running of the cnc.
What is the fonction of the Lamp ?
best regards,
Fabrice
-
Hi fabrice,
I installed led bars in my router gantry. The lamp button is for turning them on and off.
i will try to make that button customizable in the future. Right now it toggles output 6
Regarsd
-
Morning from France,
i reach to implement the macro of Ernis (i suppose) for the Zeroing of the axe Z.
I use a mobile gauge, so x and y are never the same.
Is the field where you put the initial value offset Z the userDRO(2055) ?
Because i like to use this field as manual input of the high of the gauge
(actually it is hardcoded in the macro with a value 20mm)
So i can adapt the macro so that anyone can use it with different gauge.
I miss also the fonction key F5 to start/stop the spindle.
With no flash screen it was possible to modify the screen set, but
i have no idea how to change it in your flashscreen.
Thank's
Fabrice
-
Hi Fabrice,
Sorry for the delay.
I store in DRO 2055 the offset of the first tool. The oneobtained when you measure using the "measure initial offset" button.
Here you have a list of the leds and dros I have defined so far.
I will see if I can implement the F5 funstion in the future.
Regards
-
Thanks for the documentation.
I will look at.
Fabrice
-
1.35 Changed the "Go Zero" button for "Go Pos".
The new button opens a slider that allows going to zero or any other position.
Added macro: GoCoord
RUCONFIG: New GoZeroTimeout and GoCoordTimeout parameters
Some work on optional stop slider
Im working on a new wizard to cut trajectories and shapes
Regards
-
Good Morning Pablo,
i test again you new version. Nice thing with the Go option.
A question, do you manage the limit display in the Load screen ?
because the information of the size limit of a gcode file are not displayed.
I wish you a nice week-end,
Fabrice
-
ohh i was looking at wrong place for this screen.
Thanks for sharing pablo.
i will try this on my 17'' touch screen.i already have ultimate screen,its quite good build.
Yours also seems good.can you update the final locked down version of the screen.
Regards
-
Hi fever,
Unfortunatedly I did not continue developement lately because theres no more than a couple users testing it, and for my oersonal use the screen is ok, it has what I need.
I may resume developement when I have more free time.
thanks
-
Hi Pablo
Very nice screen you made. Really like the look of it, and the "pop-up" keys....
nice!
Looks just like the touchscreen that i have always wanted for my machine :o)
I'll test it as soon as I get my touchscreen hooked up to my router
I think if you continue the development, there will be a lot of new testers!
Keep up the good work!
Best regards
Borge
Denmark
-
yes borge is right.
this one is really good.
pls continue the work (of course when your free)
and as i asked can u attach the final working version of the screen.(least bug version)
-
Last version at this time is`1.35.
I upload them here when I make some significant changes.
The bugs fixes and changes are doccumented in the VersionInfo.txt file.
I would like to know what bugs you are referring to so I can try to fix them
Regards
-
Hello all,
ok ok i know, it is Worldcup in South Africa,, but as somebody the opportunity
to test more the screen ?
I apologise, i have no lot of time actually to continu, but il like this screen, found good ideas
inside, and i think that Pablo need more feedback from our community
to help him in the improvement.
What is your status ?
Fabrice
-
New version v1.37
1.37 GCode now loads asynchronous to allow for long programs without crashing mach
Up and down code arrows now have a different behavior to traverse long programs more easily
Regards
Pablo
-
1.38 Added the Walk macro in the load screen to preview the work limits (It previews at the current z level, so take care with clamps)
-
1.38 Added the Walk macro in the load screen to preview the work limits (It previews at the current z level, so take care with clamps)
1.39 Added Stop button to interrupt walk. Added about window (the screen version is now shown there)
-
V1.40
1.40 Optional stop led was reversed. Corrected.
Wizards now inform in the status line Current Pass and Previous pass time. For this M1002 and M1003 are implemented
Corrected a new bug that prevented from scrolling the code window in wizards
Added a button to turn on/off cross hair. Jog mode is removed and the mode now is changed by touching its led
Added the rpm/feed calculator informing sfm and chipload. the calculator is opened by pushing the F button.
A new wizard button "probing" is still not functional. Im working on that.
-
I will have time to test, one thing I would like to mention is you must be running Flash 9 or later, we have not updated the plugin for Flash 10 yet.
Please run the following if you have Flash 10 or greater, also you must Publish for Flash 8 in Flash Pro:
First run: FlashUtil10h_ActiveX.exe
Then run: flashplayer9r277_winax.exe
-
Hi zealous,
I dont understand what you mean, can you please explain further?
Im making the screen with flash Cs4 pro, and im publishing for Flash 8.
At the time I started making the screen, that was the newest version supported by the flash plugin.
Also I had to write only AS2.0 code since AS3.0 starts at flash V9.
Has anything changed since that moment? What are the files you attached for?
Thanks
Pablo
-
Mach currently supports Flash 9 or later exported from any compiler as Flash 8.
The files inluded are to uninstall Flash 10 or newer and install the latest supported Flash player 9.
I am hoping soon to updated the plugin in mach to support AS3 and Flash player 10.
-
Hi zealous,
I have flash player 10, and plugin 2.00.46 instaled and when I publish for Flash 8 everything works fine.
If I try publishing for Flash 9, some things dont work, such as fscommand for DROFormat
I tried removing flash 10 and installing 9 with the files you provided, and the same happens, everything works fine only when I publish for 8
So what am I missing here?
Got confused about what versions I should use
Thanks
-
Sorry I didnt mean to hijack this post, I was just making sure people didn't report back issue that had to do with the Flash player.
You have to export (compile) to flash 8 but you can use up to Flash player 9.
-
Never mind, you are always of much help.
I just wanted to make sure I was not missing some key info in your post.
Please tell me if you find any interesting ideas in my design
Regards
Pablo
-
Can you publish the source fla? I use to program flash many years ago and would be interested in seeing how you created this screen.
Thanks!
-
Hi dotScott,
At this time Im not going to share the .fla because I want to be able to complete the debugging and developement.
I can however share with you the code I used to do any of the features you are interested in.
If you want some ideas to get started, the Mach Nation screen in a good base. I started from there.
Also I am willing to make some small modifications and share them because I know the screen in configured for my particular machine and others may need different buttons and features.
Pleae let me know if you can help testing the screen
Regards
Pablol
-
1.41 Stop button is now hardcoded, and it does not longer call the macro specified in ruconfig.ini
I changed this behavior because I found that stopping a macro from within another macro
causes a mach exeption and did not work fine.
First 2.5D probing wizard is now available. I still did not debug it and it surely has errors.
Test it at your own risk and with a probe that wont brake if it hits the part.
NEW MACRO: ProbeTest.m1s
-
I can't use MDI function.... I face some error for insert number in your DRO...
-
Hi,
The MDI function i did not make it yet.
he other problem can you please explain in more detail?
Thanks for testing
-
Hello! Pablo was kind enough to make a special dual screen version of the screenset. Here's a picture of it up and running, by request
-
That is the best screen set I have seen yet! Is the dual screen set available for download?
John
-
Hi,
Sorry for the long delay.
I havent used my router for a long time. Im now in the metrology business.
Here you have the dual screen configuration.
Regards
Pablo
-
Anyone interested in the FLA source code can mail me and Ill send it
-
PM was sent. Never head back. I would like the FLA, thank you!
-
I sent a message as well and didn't hear back either.
-
Hi guys,
Sorry for the delay, Ive been very busy and did not have enough time to put all together.
Please allow a few more days and I will post the source code here. It will be a big file since Im going to include the Xara 3d art files and also the icon pack I have used for the buttons.
Regards
Pablo
-
Here is the source code for those who asked... tell me if theres something missing from the rar file
1) If you make any improvements or modifications, please share in this post
2) Please dont remove the about button and credit
3) If you use it, it would be nice if you post a picture of your machine running it
Hope you enjoy it
Pablo
-
Part 2
-
Part 3
-
Part 4