ax12.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 
3 # Copyright (c) 2008-2011 Vanadium Labs LLC.
4 # All right reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are met:
8 #
9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # * Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
14 # * Neither the name of Vanadium Labs LLC nor the names of its
15 # contributors may be used to endorse or promote products derived
16 # from this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 # DISCLAIMED. IN NO EVENT SHALL VANADIUM LABS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 
29 # Author: Michael Ferguson
30 
31 
32 
33 # Control Table Symbolic Constants - EEPROM AREA
34 P_MODEL_NUMBER_L = 0
35 P_MODEL_NUMBER_H = 1
36 P_VERSION = 2
37 P_ID = 3
38 P_BAUD_RATE = 4
39 P_RETURN_DELAY_TIME = 5
40 P_CW_ANGLE_LIMIT_L = 6
41 P_CW_ANGLE_LIMIT_H = 7
42 P_CCW_ANGLE_LIMIT_L = 8
43 P_CCW_ANGLE_LIMIT_H = 9
44 P_SYSTEM_DATA2 = 10
45 P_LIMIT_TEMPERATURE = 11
46 P_DOWN_LIMIT_VOLTAGE = 12
47 P_UP_LIMIT_VOLTAGE = 13
48 P_MAX_TORQUE_L = 14
49 P_MAX_TORQUE_H = 15
50 P_RETURN_LEVEL = 16
51 P_ALARM_LED = 17
52 P_ALARM_SHUTDOWN = 18
53 P_OPERATING_MODE = 19
54 P_DOWN_CALIBRATION_L = 20
55 P_DOWN_CALIBRATION_H = 21
56 P_UP_CALIBRATION_L = 22
57 P_UP_CALIBRATION_H = 23
58 # Control Table Symbolic Constants - RAM AREA
59 P_TORQUE_ENABLE = 24
60 P_LED = 25
61 P_CW_COMPLIANCE_MARGIN = 26
62 P_CCW_COMPLIANCE_MARGIN = 27
63 P_CW_COMPLIANCE_SLOPE = 28
64 P_CCW_COMPLIANCE_SLOPE = 29
65 P_GOAL_POSITION_L = 30
66 P_GOAL_POSITION_H = 31
67 P_GOAL_SPEED_L = 32
68 P_GOAL_SPEED_H = 33
69 P_TORQUE_LIMIT_L = 34
70 P_TORQUE_LIMIT_H = 35
71 P_PRESENT_POSITION_L = 36
72 P_PRESENT_POSITION_H = 37
73 P_PRESENT_SPEED_L = 38
74 P_PRESENT_SPEED_H = 39
75 P_PRESENT_LOAD_L = 40
76 P_PRESENT_LOAD_H = 41
77 P_PRESENT_VOLTAGE = 42
78 P_PRESENT_TEMPERATURE = 43
79 P_REGISTERED_INSTRUCTION = 44
80 P_PAUSE_TIME = 45
81 P_MOVING = 46
82 P_LOCK = 47
83 P_PUNCH_L = 48
84 P_PUNCH_H = 49
85 
86 # Status Return Levels
87 AX_RETURN_NONE = 0
88 AX_RETURN_READ = 1
89 AX_RETURN_ALL = 2
90 
91 # Instruction Set
92 AX_PING = 1
93 AX_READ_DATA = 2
94 AX_WRITE_DATA = 3
95 AX_REG_WRITE = 4
96 AX_ACTION = 5
97 AX_RESET = 6
98 AX_SYNC_WRITE = 131
99 AX_SYNC_READ = 132
100 
101 AX_CONTROL_SETUP = 26
102 AX_CONTROL_WRITE = 27
103 AX_CONTROL_STAT = 28
104 


arbotix_python
Author(s): Michael Ferguson
autogenerated on Tue Mar 1 2022 23:48:25