Skip to content

Commit 1faf319

Browse files
committed
Merge branch 'release/v1.6.6'
2 parents 0c9cf70 + 893d195 commit 1faf319

27 files changed

+61
-35
lines changed

README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,21 @@
88

99
This guide will cover the setup and use of Vention’s MachineMotion™ Python Software Development Kit (SDK). After reading this guide, you will be ready to deploy custom motion and control applications using Vention’s MachineMotion controller. Before you begin, we recommended reading the <a href="https://www.vention.io/technical_documents/machine_motion_docs/vention_machine_motion_user_guide" target="_blank">MachineMotion Quick Start Guide</a> to get familiar with the technology.
1010

11-
## Typical System Overview
11+
## Overview
12+
13+
The MachineMotion python SDK has been designed to allow user applications to execute:
14+
15+
>- internally to MachineMotion; or
16+
>- on an external computer connected to MachineMotion via the USB or Ethernet port.
17+
18+
The Python SDK includes the following core features:
19+
20+
>- Simplied interface to all MachineMotion functionality
21+
>- Control of one or multiple MachineMotion from a single program
22+
>- Direct access to the internal motion controller via gCode
23+
24+
25+
---
1226

1327
Many systems are built by centralizing application-level software on a host computer. The software interacts with various devices (such as robotic devices, sensors, proprietary products, and data acquisition equipment) and delivers the required application behavior (see Figure 1).
1428

_MachineMotion.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,13 @@ def configMachineMotionIp(self, mode, machineIp, machineNetmask, machineGateway)
570570
#
571571
# Function to configure the axis motion.
572572
# @param axis --- Description: The axis number. --- Type: number [1, 2, 3]
573-
# @param u_step --- Description: uStep setting. --- Type: number either [1, 2, 4, 8, 16]
574-
# @param mech_gain --- Description: Mechanical gain of the axis in mm / turn. --- Type: number
573+
# @param _u_step --- Description: uStep setting. --- Type: number either [1, 2, 4, 8, 16]
574+
# @param _mech_gain --- Description: Mechanical gain of the axis in mm / turn. --- Type: number
575575
# @status
576576
#
577-
def configAxis(self, axis, u_step, mech_gain):
578-
577+
def configAxis(self, axis, _u_step, _mech_gain):
578+
u_step = float(_u_step)
579+
mech_gain = float(_mech_gain)
579580

580581
# validate that the uStep setting is valid
581582
if (self.valid_u_step.index(u_step) != -1):
@@ -681,7 +682,7 @@ def writeControlDevice(self, port, signal, value, callback):
681682
if port not in self.attachedDevices.keys() or self.attachedDevices[port] == "IO_EXPANDER_GENERIC":
682683
portNumber = self.validPorts.index(port) + 1
683684
signalNumber = self.validSignals.index(signal) - 4
684-
self.myMqttClient.publish('digitalOutput/' + str(portNumber) + '/' + str(signalNumber), '1' if value else '0')
685+
self.myMqttClient.publish('devices/io-expander/' + str(portNumber) + '/digitalOutput/' + str(signalNumber), '1' if value else '0')
685686
callback("true" if value else "false")
686687
# Legacy devices
687688
else :
@@ -699,13 +700,13 @@ def writeControlDevice(self, port, signal, value, callback):
699700

700701
def __onConnect(self, client, userData, flags, rc):
701702
if rc == 0:
702-
self.myMqttClient.subscribe('digitalInput/#')
703+
self.myMqttClient.subscribe('devices/io-expander/+/digitalInput')
703704

704705
def __onMessage(self, client, userData, msg):
705-
port = int(msg.topic.replace('digitalInput/', '')) - 1
706+
device = int(msg.topic.replace('devices/io-expander/', '').replace('/digitalInput', '')) - 1
706707
values = int(msg.payload, 16)
707-
if(port >= 0 and port < len(self.validPorts)) :
708-
self.portInputs[self.validPorts[port]] = values
708+
if(device >= 0 and device < len(self.validPorts)) :
709+
self.portInputs[self.validPorts[device]] = values
709710

710711
def __onDisconnect(self, client, userData, rc):
711712
print("Disconnected with rtn code [%d]"% (rc) )

examples/example--MachineMotion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--configAxis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--configMachineMotionIp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--configMachineMotionIp_2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--emitAbsoluteMove.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--emitAcceleration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--emitHome.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--emitHomeAll.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--emitRelativeMove.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--emitSpeed.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--emitStop.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--emitgCode.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--getData.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--readControlDevice--sensor4.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--readControlDevice--sensor5.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--readControlDevice--sensor6.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--readEncoder--sensor4.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--readEncoder--sensor5.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--readEncoder--sensor6.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--saveData.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--waitForMotionCompletion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def templateCallback(data):

examples/example--writeControlDevice--sensor4.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def motionControllerMessagesCallback(data):

examples/example--writeControlDevice--sensor5.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def motionControllerMessagesCallback(data):

examples/example--writeControlDevice--sensor6.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _MachineMotion_v1_6_5 import *
1+
from _MachineMotion import *
22

33
# Define a callback to process controller gCode responses (if desired)
44
def motionControllerMessagesCallback(data):

release-notes.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1+
# Version: 1.6.6
2+
3+
Date: July 4<sup>th</sup> 2019
4+
5+
## Bug Fixes:
6+
- Fix distance of movement smaller then requested on linear axis.
7+
8+
## Improvements:
9+
- All examples import statement are now version independant.
10+
11+
<br><br>
112
# Version: 1.6.5
213

3-
Date: June 4 2019
14+
Date: June 4<sup>th</sup> 2019
415

516
## Bug Fixes:
617
- Fix Line Number mismatch with the help of the 'resend' message

0 commit comments

Comments
 (0)