private void CustomizablePanel_Loaded(object sender, RoutedEventArgs e) { GlobalVariables.AddVariable("@GlobalVariables.MyMachine.Control.SendGUICommand"); GlobalVariables.AddVariable("@GlobalVariables.MyMachine.CoordinateSystem.Selected"); GlobalVariables.AddVariable("@GlobalVariables.MyCounter"); GlobalVariables.AddVariable("@GlobalVariables.MyMachine.LocalZeroOffset"); GlobalVariables.AddVariable("@GlobalVariables.MyPath.StreamStatus.G_GroupStatus1"); GlobalVariables.AddVariable("@GlobalVariables.MyPath.Buffer.ExecutedStatement"); GlobalVariables.AddVariable("@GlobalVariables.SwitchTo1a"); GlobalVariables.AddVariable("@GlobalVariables.SwitchTo1b"); GlobalVariables.AddVariable("@GlobalVariables.SwitchTo1a_E1"); GlobalVariables.AddVariable("@GlobalVariables.SwitchTo1b_E1"); GlobalVariables.AddVariable("@GlobalVariables.Feeder1_Active_E0"); GlobalVariables.AddVariable("@GlobalVariables.Feeder2_Active_E0"); GlobalVariables.AddVariable("@GlobalVariables.Feeder1_Active_E1"); GlobalVariables.AddVariable("@GlobalVariables.Feeder2_Active_E1"); //GlobalVariables.AddVariable("@GlobalVariables.Load"); GlobalVariables.ReadVariable("@GlobalVariables.SwitchTo1a"); GlobalVariables.ReadVariable("@GlobalVariables.SwitchTo1b"); GlobalVariables.ReadVariable("@GlobalVariables.SwitchTo1a_E1"); GlobalVariables.ReadVariable("@GlobalVariables.SwitchTo1b_E1"); GlobalVariables.ReadVariable("@GlobalVariables.Feeder1_Active_E0"); GlobalVariables.ReadVariable("@GlobalVariables.Feeder2_Active_E0"); GlobalVariables.ReadVariable("@GlobalVariables.Feeder1_Active_E1"); GlobalVariables.ReadVariable("@GlobalVariables.Feeder2_Active_E1"); SendGUICommand(GUICommand.PostNotification, "Feeder Variables are added!"); //checking to ensure variables are added when panel is loaded }
private void CustomizablePanel_Loaded(object sender, RoutedEventArgs e) { //Initializing global variables in PLC GlobalVariables.AddVariable("@GlobalVariables.MyMachine.Control.SendGUICommand"); GlobalVariables.AddVariable("@GlobalVariables.MyMachine.CoordinateSystem.Selected"); GlobalVariables.AddVariable("@GlobalVariables.MyCounter"); GlobalVariables.AddVariable("@GlobalVariables.MyMachine.LocalZeroOffset"); GlobalVariables.AddVariable("@GlobalVariables.MyPath.StreamStatus.G_GroupStatus1"); }
private void CustomizablePanel_Loaded(object sender, RoutedEventArgs e) { //string DrivePath; //PopulateListBox(fileMenu, @"D:\", "*.GCODE"); //calling the following method to populate listBox with GCODE files from USB drive(D:\) when the panel first loads. // MPiec Global variable declarations for printMenuPanel GlobalVariables.AddVariable("@GlobalVariables.MyMachine.Control.SendGUICommand"); GlobalVariables.AddVariable("@GlobalVariables.MyMachine.CoordinateSystem.Selected"); GlobalVariables.AddVariable("@GlobalVariables.MyCounter"); GlobalVariables.AddVariable("@GlobalVariables.MyMachine.LocalZeroOffset"); GlobalVariables.AddVariable("@GlobalVariables.MyPath.StreamStatus.G_GroupStatus1"); //GlobalVariables.AddVariable("@GlobalVariables.MyMachine.Control.CycleStart"); PopulateListBox(fileMenu, @"E:\", "*.GCODE"); //PopulateListBox(fileMenu, @"D\", "*.GCODE"); //You need to implement the logic for when a different drive path is selected }
public void CustomizablePanel_Loaded(object sender, RoutedEventArgs e) { // MPiec Global variable declarations for printMenuPanel, MaterialStatusPanel, ..., GlobalVariables.AddVariable("@GlobalVariables.MyMachine.Control.SendGUICommand"); GlobalVariables.AddVariable("@GlobalVariables.MyMachine.CoordinateSystem.Selected"); GlobalVariables.AddVariable("@GlobalVariables.MyCounter"); GlobalVariables.AddVariable("@GlobalVariables.MyMachine.LocalZeroOffset"); GlobalVariables.AddVariable("@GlobalVariables.MyPath.StreamStatus.G_GroupStatus1"); GlobalVariables.AddVariable("@GlobalVariables.BEGIN_LEVEL"); // The following commands will execute the common processes that are needed to get the printer in a ready state SendGUICommand(GUICommand.ServoPowerOn, "true"); // enabling the servos SendGUICommand(GUICommand.ModeSelect_Auto, "true"); // switching to auto mode GlobalVariables.WriteVariable("@GlobalVariables.BEGIN_LEVEL", "true"); // starting to execute bed leveling SendGUICommand(GUICommand.PostNotification, "Is bed-leveling complete?"); }
///public static int whichSelected = -1; //public object Counter { get; private set; } private void CustomizablePanel_Loaded(object sender, RoutedEventArgs e) { //Adding MPiec global variables so that they are accessible to plugin for reading/writing //GlobalVariables.AddVariable("@GlobalVariables.MyMachine.Control.SendGUICommand"); //GlobalVariables.AddVariable("@GlobalVariables.MyMachine.CoordinateSystem.Selected"); //GlobalVariables.AddVariable("@GlobalVariables.MyCounter"); //GlobalVariables.AddVariable("@GlobalVariables.MyMachine.LocalZeroOffset"); //GlobalVariables.AddVariable("@GlobalVariables.MyPath.StreamStatus.G_GroupStatus1"); //GlobalVariables.AddVariable("@GlobalVariables.MyPath.Buffer.ExecutedStatement"); GlobalVariables.AddVariable("@GlobalVariables.SwitchTo1a"); GlobalVariables.AddVariable("@GlobalVariables.SwitchTo1b"); GlobalVariables.AddVariable("@GlobalVariables.SwitchTo1a_E1"); GlobalVariables.AddVariable("@GlobalVariables.SwitchTo1b_E1"); //Reading global variables GlobalVariables.ReadVariable("@GlobalVariables.SwitchTo1a"); GlobalVariables.ReadVariable("@GlobalVariables.SwitchTo1b"); GlobalVariables.ReadVariable("@GlobalVariables.SwitchTo1a_E1"); GlobalVariables.ReadVariable("@GlobalVariables.SwitchTo1b_E1"); SendGUICommand(GUICommand.ModeSelect_Auto, "true"); }
private void CustomizablePanel_Loaded(object sender, RoutedEventArgs e) { GlobalVariables.AddVariable("@GlobalVariables.E0_MaterialIndex"); SendGUICommand(GUICommand.ModeSelect_Auto, "true"); }