From f54457f5619d7989cccb34063f9c9c8bfafeaa8d Mon Sep 17 00:00:00 2001 From: "Chris K.Y. FUNG" Date: Mon, 5 Jun 2017 13:11:44 -0700 Subject: [PATCH] Update to v0.4.1 - Changed to execute the main programe from __main__.sce - Fixed the spindle on value on startup --- ControlPanel.sce | 6 ++---- README.md | 3 ++- __main__.sce | 4 ++++ commands.sce | 10 +++++----- 4 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 __main__.sce diff --git a/ControlPanel.sce b/ControlPanel.sce index 15c043d..0242269 100644 --- a/ControlPanel.sce +++ b/ControlPanel.sce @@ -4,13 +4,11 @@ //mode(0); //lines(0); -pathname = get_absolute_file_path('ControlPanel.sce'); -chdir(pathname); -exec ("commands.sce", -1); + function form = new_form() form = figure( "visible", "off", "menubar_visible", "off", "toolbar_visible", "off", "infobar_visible", "off"); - form.figure_position = [ 805 , 222]; + form.figure_position = [ 100 , 222]; form.axes_size = [ 684 , 438]; form.figure_name = "MDX-15/20 Control Panel - Craftweeks"; form.tag = "form"; diff --git a/README.md b/README.md index d049f6a..9e5cdc8 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ A custom control panel developed for Roland MODELA MDX-15/20 desktop CNC milling ## How To Use 1. Launch Scilab -2. Choose **File** > **Execute**, and then select **ControlPanel.sce** in the file selection dialog +2. Choose **File** > **Execute**, and then select **__main__.sce** (v0.4 or later) in the file selection dialog + - Execute **ControlPanel.sce** for v0.3 3. Press **Reset** to zero out z-axis 4. Press **Home** to zero out x- and y-axes diff --git a/__main__.sce b/__main__.sce new file mode 100644 index 0000000..411b96b --- /dev/null +++ b/__main__.sce @@ -0,0 +1,4 @@ +pathname = get_absolute_file_path('__main__.sce'); +chdir(pathname); +exec ("commands.sce", -1); +exec ('ControlPanel.sce', -1); diff --git a/commands.sce b/commands.sce index a4d4992..a4288db 100644 --- a/commands.sce +++ b/commands.sce @@ -4,9 +4,9 @@ Y = %nan; Z = %nan; z0 = %nan; V = 15; -SON = 0; -XMAX = 233.2; -YMAX = 156.4; +SON = 1; +XMAX = 203.2; +YMAX = 152.4; ZMAX = 60.5; isReset = 0; isDirectGo = 0; // get(handles.checkbox1, 'value'); @@ -368,8 +368,8 @@ endfunction function setAsMDX20_callback() global XMAX YMAX - XMAX = 232.2; - YMAX = 156.6; + XMAX = 203.2; + YMAX = 152.4; updateAxisXY(0,0) set(handles.radiobuttonMDX15, 'Enable','off') endfunction