------------------------------------- SENDING to MACH CODE--------------------------------------------
VB SEND:Will send VB box text
on (release) {
fscommand("VBMacro", “*********X”);
}
BUTTON SEND:Send a button OEM code
on (release) {
fscommand("Button" , "*********" );
}
OPEN FILE: Open any file exstention out side of MACH
on (release) {
fscommand ("exec", "XCONTROL.exe");
}
SEND MDI
on (release) {
fscommand("MDIEntry", _root.box);
}
SEND MCODE
on (release) {
fscommand("Code", "M1");
}
------------------------------------- RECIVING IN Flash CODE--------------------------------------------
DRO: Numiracl updates
DRO1.variable="DRO800";
DRO format: Format DRO readings
fscommand ("DROFmt800" , "format" )
/////////////////////THESE CAN USE as wel for formatting/////////////////////////////////////////////////////
// "%D:%H:%M:%S"/////Days:Hours:Minutes:Seconds/////////
// "+%.4f" ////(f)loating point number, (4) decimal points, (+) or - /////////
// "%i" ///integer, no decimals /////////////
// "%x" ////hex number//////////////
Mode:
Mode.variable=" Mode";
SYSTEM STATUS:
Cosys.variable=" Cosys";
ERROR DISPLAY:
ERROR.variable=" ERROR";
Profile:
Profile.variable=" Profile";
Status Line:
StatusLine.variable=" StatusLine";
FileName:
FileName.variable=" FileName";
LED: Function to watch an OEM LED’s state of “0” or “1”
if (_root.LED1024 == 0) {
My_LED1024.gotoAndStop("green");
} else {
My_LED1024.gotoAndStop("red");
}
this.Function = function(varName, oldVal, newVal) {
if (newVal == 0) {
My_LED1024.gotoAndStop("green");
} else {
My_LED1024.gotoAndStop("red");
}
return newVal;
};
this.watch("LED1024", this. Function);
REMOVE SCREEN: Positioning and scaling
fscommand("ToolWidth", -1);
SCREN SCALING: scaling Screens
on (release) {
ToolXScale._xscale += 10.0;
ToolYScale._yscale += 10.0;
}
////////Send stage size///////
fscommand("StageW", Stage.width);
fscommand("StageH", Stage.height);
//Toolpathscreen/////
//keeping track getting property
// X Y positioning
_root.ToolX = getProperty(machscreen_mov, _x);
_root.ToolY = getProperty(machscreen_mov, _y);
// find height width
_root.ToolWidth = getProperty(machscreen_mov, _width);
_root.ToolHeight = getProperty(machscreen_mov, _height);
//find scale factor
_root.xscale = getProperty(machscreen_mov, _xscale);
_root.yscale = getProperty(machscreen_mov, _yscale);
//Sending Fscommand add what ever we can control here
fscommand("ToolX", _root.ToolX);
fscommand("ToolY", _root.ToolY);
fscommand("ToolWidth", _root.ToolWidth);
fscommand("ToolHeight", _root.ToolHeight);
////End script/////////////
//////GCode watch//////////
//keeping track getting property
//X Y position
_root.GCODEX = getProperty(GCODE_mov, _x);
_root.GCODEY = getProperty(GCODE_mov, _y);
//Movie size
_root.GCODEHeight = getProperty(GCODE_mov, _height);
_root.GCODEWidth = getProperty(GCODE_mov, _width);
//Movi scale factor
_root.GCODExscale = getProperty(GCODE_mov, _xscale);
_root.GCODEyscale = getProperty(GCODE_mov, _yscale);
//Sending Fscommand add what ever we can control here
fscommand("GCODEX", _root.GCODEX);
fscommand("GCODEY", _root.GCODEY);
fscommand("GCODEWidth", _root.GCODEWidth);
fscommand("GCODEHeight", _root.GCODEHeight);
////////end script///////////
//////MDI watch//////////
//keeping track getting property
//X Y position
_root.MDIX = getProperty(MDI_mov, _x);
_root.MDIY = getProperty(MDI_mov, _y);
//Movie size
_root.MDIHeight = getProperty(MDI_mov, _height);
_root.MDIWidth = getProperty(MDI_mov, _width);
//Movi scale factor
_root.MDIxscale = getProperty(MDI_mov, _xscale);
_root.MDIyscale = getProperty(MDI_mov, _yscale);
//Sending Fscommand add what ever we can control here
fscommand("MDIX", _root.MDIX);
fscommand("MDIY", _root.MDIY);
fscommand("MDIWidth", _root.MDIWidth);
fscommand("MDIHeight", _root.MDIHeight);
////////end script///////////