From 2ac644afc1107be0c5072b59b92a91dd588fb223 Mon Sep 17 00:00:00 2001 From: francois-giguere Date: Fri, 27 Sep 2019 17:08:19 -0400 Subject: [PATCH] Final changes before releasing v1.6.8 --- README.md | 4 ++ .../api/machine_motion_python_api--v1.6.8.md | 24 +++---- examples/_MachineMotion_1_6_8.py | 38 ++++++++++- examples/_MachineMotion_1_6_8.pyc | Bin 0 -> 27985 bytes examples/example--emitAbsoluteMove.py | 12 ++++ ... example--emitCombinedAxesAbsoluteMove.py} | 8 +-- ... example--emitCombinedAxesRelativeMove.py} | 10 +-- examples/example--emitSetAxisDirection.py | 63 ++++++++++++++++++ examples/example--saveData_getData.py | 2 +- examples/example--setPosition.py | 4 +- release-notes.md | 5 +- 11 files changed, 141 insertions(+), 29 deletions(-) create mode 100644 examples/_MachineMotion_1_6_8.pyc rename examples/{example--emitCombinedAbsoluteMove.py => example--emitCombinedAxesAbsoluteMove.py} (90%) rename examples/{example--emitCombinedRelativeMove.py => example--emitCombinedAxesRelativeMove.py} (86%) create mode 100644 examples/example--emitSetAxisDirection.py diff --git a/README.md b/README.md index 6ff4697..f76642f 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ To set up the MachineMotion Python Library on your computer, follow the steps be - Download the version of the library that you require on [GitHub](https://github.com/VentionCo/mm-python-api/releases) + + - Controllers with software v1.2.11 and earlier are compatible with the Python API v1.6.8 and earlier + - Controllers with software v1.12.0+ are compatible with the Python API v2.0+ + - Install Python on your computer. The MachineMotion library supports both Python 2.7 and Python 3.6. - If installing on Windows, make sure to add Python.exe to the PATH environment variable as shown in *Figure 2* and *Figure 3*. diff --git a/__documentation/api/machine_motion_python_api--v1.6.8.md b/__documentation/api/machine_motion_python_api--v1.6.8.md index 8ee9b2e..c9f721a 100644 --- a/__documentation/api/machine_motion_python_api--v1.6.8.md +++ b/__documentation/api/machine_motion_python_api--v1.6.8.md @@ -600,7 +600,7 @@ sys.exit(0) ``` --- -### emitCombinedAbsoluteMove(axes, positions) +### emitCombinedAxesAbsoluteMove(axes, positions) > Send an absolute move command to the MachineMotion controller. Moves multiple axis simultaneously. @@ -614,7 +614,7 @@ sys.exit(0) > none #### Reference Example -> example--emitCombinedAbsoluteMove.py +> example--emitCombinedAxesAbsoluteMove.py ```python from _MachineMotion_1_6_8 import * @@ -641,11 +641,11 @@ mm.emitAcceleration(1000) print ("Application Message: Acceleration configured \n") # Homing axis 1 -mm.emitHome(1) -print ("Application Message: Axis 1 is at home \n") +mm.emitHomeAll() +print ("Application Message: Axes at home \n") # Move the axis 1 to position 100 mm -mm.emitCombinedAbsoluteMove([1, 2, 3], [100, 200, 100]) +mm.emitCombinedAxesAbsoluteMove([1, 2, 3], [50, 100, 50]) print ("Application Message: Motion on-going ... \n") mm.waitForMotionCompletion() @@ -699,13 +699,13 @@ print ("Application Message: Speed configured \n") mm.emitAcceleration(1000) print ("Application Message: Acceleration configured \n") -# Homing axis 1 -mm.emitHome(1) -print ("Application Message: Axis 1 at home \n") +# Homing all axes +mm.emitHomeAll() +print ("Application Message: Axes at home \n") # Move the axis one to position 100 mm -mm.emitRelativeMove(1, "positive", 100) -print ("Application Message: Move on-going ... \n") +mm.emitCombinedAxisRelativeMove([1, 2, 3], ["positive", "positive", "positive"], [100, 200, 300]) +print ("Application Message: Multi-axis move on-going ... \n") mm.waitForMotionCompletion() print ("Application Message: Motion completed \n") @@ -716,7 +716,7 @@ sys.exit(0) ``` --- -### emitCombinedAxisRelativeMove(axes, directions, distances) +### emitCombinedAxesRelativeMove(axes, directions, distances) > Send a relative move command to the MachineMotion controller. Moves multiple axis simultaneously. @@ -733,7 +733,7 @@ sys.exit(0) > none #### Reference Example -> example--emitCombinedRelativeMove.py +> example--emitCombinedAxesRelativeMove.py ```python from _MachineMotion_1_6_8 import * diff --git a/examples/_MachineMotion_1_6_8.py b/examples/_MachineMotion_1_6_8.py index 5dce4fd..874517a 100644 --- a/examples/_MachineMotion_1_6_8.py +++ b/examples/_MachineMotion_1_6_8.py @@ -532,7 +532,7 @@ def emitAbsoluteMove(self, axis, position): # def emitCombinedAxesAbsoluteMove(self, axes, positions): if (not isinstance(axes, list) or not isinstance(positions, list)): - raise TypeError("Axes and Postions must be lists") + raise TypeError("All parameters must be lists") global motion_completed @@ -580,8 +580,8 @@ def emitRelativeMove(self, axis, direction, distance): # @status # def emitCombinedAxisRelativeMove(self, axes, directions, distances): - if (not isinstance(axes, list) or not isinstance(directions, list) or isinstance(distances, list)): - raise TypeError("Axes and Postions must be lists") + if (not isinstance(axes, list) or not isinstance(directions, list) or not isinstance(distances, list)): + raise TypeError("All parameters must be lists") global motion_completed @@ -691,6 +691,38 @@ def configAxis(self, axis, _u_step, _mech_gain): else: pass # print "Argument error, {configAxis(self, axis, u_step, mech_gain)}, {u_step} argument is invalid" + + # + # Function to reverse the positive direction of an axis, also reverse the home and end-of-travel sensor port + # @param axis --- Description: Axis on which the setting applies --- Type: string or number. + # @param data --- Description: normal or reverse axis direction --- Type: dictionary. + # @status + # + def emitSetAxisDirection(self, axis, direction): + + # Checking input parameters + if (direction != "normal" and direction != "reverse"): + raise ValueError('direction parameter must be either "normal" or "reversed"') + + if (axis != 1 and axis != 2 and axis !=3): + raise ValueError('axis must either be 1, 2 or 3') + + if(axis == 1): + if(direction == "normal"): + self.myGCode.__emit__("M92 " + self.myGCode.__getTrueAxis__(axis) + str(self.myAxis1_steps_mm)) + elif (direction == "reverse"): + self.myGCode.__emit__("M92 " + self.myGCode.__getTrueAxis__(axis) + "-" + str(self.myAxis1_steps_mm)) + elif(axis == 2): + if(direction == "normal"): + self.myGCode.__emit__("M92 " + self.myGCode.__getTrueAxis__(axis) + str(self.myAxis2_steps_mm)) + elif (direction == "reverse"): + self.myGCode.__emit__("M92 " + self.myGCode.__getTrueAxis__(axis) + "-" + str(self.myAxis2_steps_mm)) + elif(axis == 3): + if(direction == "normal"): + self.myGCode.__emit__("M92 " + self.myGCode.__getTrueAxis__(axis) + str(self.myAxis3_steps_mm)) + elif (direction == "reverse"): + self.myGCode.__emit__("M92 " + self.myGCode.__getTrueAxis__(axis) + "-" + str(self.myAxis3_steps_mm)) + # # Function to save/persist data in the MachineMotion Controller (key - data pair) # @param key --- Description: key is a string that identifies the data to save for future retrieval. --- Type: string or number. diff --git a/examples/_MachineMotion_1_6_8.pyc b/examples/_MachineMotion_1_6_8.pyc new file mode 100644 index 0000000000000000000000000000000000000000..466d8fd6d7914d0423fdd60529c57e23b0b978f5 GIT binary patch literal 27985 zcmc(IdvF}dd0)@&62y`q0TLv^*B$pr9*N`K@c@v-J$%+32!K39-}mURzaHlQXvelsFZ{JPswVo$uMRRMLxwYLaZ8KiMR0bs7Vf>wDX;9K3eAJ1RxTlA`0rJ8t}ba{~kQcvAW}hjL-`1je@ZE&P;6F~BA)Ah}WrZ;s}8 z){kVNRlV(pbMxU2oSd%&e!0@{gOy6v54WJ?Mx`G3VF|hE`SPNjzvRx$zB)HO>n_Y) zEKglpa9;O$b4RBN-PyiXPV3ztg%76<-8F0by zE)|Vk7-ieStw{7mW10MTCO?tMpULFUX7cAU`N>TF+0ku$3E$+pO?2CJLzcL1qvfsE zdCCUNUtPR%bx~icd3~wo^`)9W8}_08Tv@6o*@?9DOqxAAimE0}f<>H8zi{np;CF&+ z%eCbjooh3#>T1JphQYOtztRe7VXIT~gKLe((<^J?%~td2%1Z5;f3MP5siWAvT&doy zHT}!2u-0n2&*}aR_wlux4(-MPoj~31bU-nbB%&plENNop zlti~hCZxFCj$~9$2}8S+$$Pj1)p|n05xnOlj(`nYN5Ekets~&#hpx+(qqd=!~=y}vSV7vEJbu*n+

hG_$m6nd>1=sn-bS1(`G}JxKRGG@Nys6xZR+al z<8fvp&YbBPeGZ}N=WqlBy5c0{uy018jR1KMbg_r=G)r!_r2IM(tiOsH8EiZ}SRBQB zz6VFP+XUy#+{L-YsY@ZMtCYG%gHE-XBRzKa--9zUKvnaG~>4hqN6|CiU% zgaU46&dyFR&drxM(%{_%1SO^@f!ZBky43WSDo2dvj%&btt875P~VHBKp0X z)s^+k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?aBLYaMCsPyVsY>A*M}b){+9W} F{|~S9`KJH? literal 0 HcmV?d00001 diff --git a/examples/example--emitAbsoluteMove.py b/examples/example--emitAbsoluteMove.py index 2483993..0d6c5e0 100644 --- a/examples/example--emitAbsoluteMove.py +++ b/examples/example--emitAbsoluteMove.py @@ -41,6 +41,18 @@ def debug(data): mm.waitForMotionCompletion() print ("Application Message: Motion completed \n") +mm.setAxisDirection(1, "reverse") +print ("Application Message: Axis 1 direction reverse \n") + +# Homing axis 1 +mm.emitHome(1) +print ("Application Message: Axis 1 is at home \n") + +# Move the axis 1 to position 100 mm +mm.emitAbsoluteMove(1, 100) +print ("Application Message: Motion on-going ... \n") + + print ("Application Message: Program terminating ... \n") time.sleep(1) sys.exit(0) diff --git a/examples/example--emitCombinedAbsoluteMove.py b/examples/example--emitCombinedAxesAbsoluteMove.py similarity index 90% rename from examples/example--emitCombinedAbsoluteMove.py rename to examples/example--emitCombinedAxesAbsoluteMove.py index e9cc740..15aa72f 100644 --- a/examples/example--emitCombinedAbsoluteMove.py +++ b/examples/example--emitCombinedAxesAbsoluteMove.py @@ -4,7 +4,7 @@ ## Author: Francois Giguere ## Version: 1.6.8 ## Email: info@vention.cc -## Status: ready to test +## Status: tested ################################################## from _MachineMotion_1_6_8 import * @@ -31,11 +31,11 @@ def debug(data): print ("Application Message: Acceleration configured \n") # Homing axis 1 -mm.emitHome(1) -print ("Application Message: Axis 1 is at home \n") +mm.emitHomeAll() +print ("Application Message: Axes at home \n") # Move the axis 1 to position 100 mm -mm.emitCombinedAbsoluteMove([1, 2, 3], [100, 200, 100]) +mm.emitCombinedAxesAbsoluteMove([1, 2, 3], [50, 100, 50]) print ("Application Message: Motion on-going ... \n") mm.waitForMotionCompletion() diff --git a/examples/example--emitCombinedRelativeMove.py b/examples/example--emitCombinedAxesRelativeMove.py similarity index 86% rename from examples/example--emitCombinedRelativeMove.py rename to examples/example--emitCombinedAxesRelativeMove.py index 5613c4e..e0afa8e 100644 --- a/examples/example--emitCombinedRelativeMove.py +++ b/examples/example--emitCombinedAxesRelativeMove.py @@ -4,7 +4,7 @@ ## Author: Francois Giguere ## Version: 1.6.8 ## Email: info@vention.cc -## Status: ready to test +## Status: tested ################################################## from _MachineMotion_1_6_8 import * @@ -30,12 +30,12 @@ def debug(data): mm.emitAcceleration(1000) print ("Application Message: Acceleration configured \n") -# Homing axis 1 -mm.emitHome(1) -print ("Application Message: Axis 1 at home \n") +# Homing all axes +mm.emitHomeAll() +print ("Application Message: Axes at home \n") # Move the axis one to position 100 mm -mm.emitCombinedRelativeMove([1,2,3], ["positive","positive","positive"], [100, 200, 300]) +mm.emitCombinedAxisRelativeMove([1, 2, 3], ["positive", "positive", "positive"], [100, 200, 300]) print ("Application Message: Multi-axis move on-going ... \n") mm.waitForMotionCompletion() diff --git a/examples/example--emitSetAxisDirection.py b/examples/example--emitSetAxisDirection.py new file mode 100644 index 0000000..246bed7 --- /dev/null +++ b/examples/example--emitSetAxisDirection.py @@ -0,0 +1,63 @@ +################################################## +## Axis Direction +################################################## +## Author: Francois Giguere +## Version: 1.6.8 +## Email: info@vention.cc +## Status: tested +################################################## + +from _MachineMotion_1_6_8 import * + +# Define a callback to process controller gCode responses if desired. This is mostly used for debugging purposes. +def debug(data): + pass + +print ("Application Message: MachineMotion Program Starting \n") + +mm = MachineMotion(debug, DEFAULT_IP_ADDRESS.usb_windows) +print ("Application Message: MachineMotion Controller Connected \n") + +# Configure the axis number 1, 8 uSteps and 150 mm / turn for a timing belt +mm.configAxis(1, MICRO_STEPS.ustep_8, MECH_GAIN.timing_belt_150mm_turn) +print ("Application Message: MachineMotion Axis 1 Configured \n") + +# Configuring the travel speed to 10000 mm / min +mm.emitSpeed(10000) +print ("Application Message: Speed configured \n") + +# Configuring the travel speed to 1000 mm / second^2 +mm.emitAcceleration(1000) +print ("Application Message: Acceleration configured \n") + +# Homing axis 1 +mm.emitHome(1) +print ("Application Message: Axis 1 is at home \n") + +# Move the axis 1 to position 100 mm +mm.emitAbsoluteMove(1, 100) +print ("Application Message: Motion on-going ... \n") + +mm.waitForMotionCompletion() +print ("Application Message: Motion completed \n") + + +mm.emitSetAxisDirection(1, "reverse") +print ("Application Message: Axis direction set for axis 1 \n") + +# Homing axis 1 +mm.emitHome(1) +print ("Application Message: Axis 1 is at home \n") + +# Move the axis 1 to position 100 mm +mm.emitAbsoluteMove(1, 100) +print ("Application Message: Motion on-going ... \n") + +mm.waitForMotionCompletion() +print ("Application Message: Motion completed \n") + +print ("Application Message: Program terminating ... \n") +time.sleep(1) +sys.exit(0) + + diff --git a/examples/example--saveData_getData.py b/examples/example--saveData_getData.py index 3bb404d..bc02c3b 100644 --- a/examples/example--saveData_getData.py +++ b/examples/example--saveData_getData.py @@ -4,7 +4,7 @@ ## Author: Francois Giguere ## Version: 1.6.8 ## Email: info@vention.cc -## Status: released +## Status: tested ################################################## from _MachineMotion_1_6_8 import * diff --git a/examples/example--setPosition.py b/examples/example--setPosition.py index af52175..68ff2b7 100644 --- a/examples/example--setPosition.py +++ b/examples/example--setPosition.py @@ -4,7 +4,7 @@ ## Author: Francois Giguere ## Version: 1.6.8 ## Email: info@vention.cc -## Status: rdy for test +## Status: tested ################################################## from _MachineMotion_1_6_8 import * @@ -26,7 +26,7 @@ def debug(data): mm.setPosition(1, 100) print ("Application Message: Position set to 100 mm on axis 1\n") -mm.moveRelative(1, "negative", 50) +mm.emitRelativeMove(1, "negative", 50) print ("Application Message: Moving in the negative direction ... \n") mm.waitForMotionCompletion() diff --git a/release-notes.md b/release-notes.md index 144ee83..38b48fb 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,17 +1,18 @@ # Version 1.6.8 -Date: September 24th, 2019 +- Date: September 27th, 2019 +- Released by: Francois Giguere ## Compatibility ### Interface Changes -- No Interface changes in this release #### Obsoleted Interfaces - none #### New Interfaces - setPosition +- setAxisDirection - emitCombinedAxisRelativeMove - emitCombinedAxesAbsoluteMove