Rev 4311 | Rev 4328 | ||
---|---|---|---|
Line 145... | Line 145... | ||
145 | Z = axis(spi.I2CSPI_SS2, 1, 32256) |
145 | Z = axis(spi.I2CSPI_SS2, 1, 32256) |
146 | |
146 | |
147 | #X.MaxSpeed(50) |
147 | #X.MaxSpeed(50) |
148 | #Y.MaxSpeed(50) |
148 | #Y.MaxSpeed(50) |
149 | #Z.MaxSpeed(30) |
149 | #Z.MaxSpeed(30) |
150 | X.MaxSpeed(40) |
150 | X.MaxSpeed(35) |
151 | Y.MaxSpeed(40) |
151 | Y.MaxSpeed(35) |
152 | Z.MaxSpeed(20) |
152 | Z.MaxSpeed(20) |
153 | |
153 | |
154 | Z.GoZero(100) |
154 | Z.GoZero(100) |
155 | Y.GoZero(20) |
155 | Y.GoZero(20) |
156 | X.GoZero(20) |
156 | X.GoZero(20) |
157 | |
157 | |
158 | time.sleep(1) |
158 | time.sleep(1) |
159 | |
159 | |
160 | X.Move(15) |
160 | X.Move(17) |
161 | Y.Move(150) |
161 | Y.Move(150) |
162 | Z.MoveWait(37) |
162 | Z.MoveWait(39) |
163 | time.sleep(1) |
163 | time.sleep(1) |
164 | Z.MoveWait(-5) |
164 | Z.MoveWait(-5) |
- | 165 | |
|
165 | |
166 | |
166 | print "Robot is running" |
167 | print "Robot is running" |
167 | |
168 | |
168 | corner = 73 |
169 | xcorner = 72 |
169 | xsteps = 9 |
170 | xsteps = 9 |
170 | ysteps = 6 # *2 + 1 line |
171 | ysteps = 6 # *2 + 1 line |
171 | space = 5 |
172 | space = 4 |
172 | grid = 8 |
173 | grid = 8 |
- | 174 | delay = 1 |
|
173 | |
175 | |
174 | #Y.Move(-4) |
176 | #Y.Move(-4) |
175 | X.MoveWait(corner) |
177 | X.MoveWait(xcorner) |
176 | |
178 | |
177 | for y in range(ysteps): |
179 | for y in range(ysteps): |
178 | for x in range(xsteps): |
180 | for x in range(xsteps): |
179 | Z.MoveWait(space) |
181 | Z.MoveWait(space) |
180 | time.sleep(1) |
182 | time.sleep(delay) |
181 | Z.MoveWait(-space) |
183 | Z.MoveWait(-space) |
182 | if x < (xsteps - 1): |
184 | if x < (xsteps - 1): |
183 | X.MoveWait(grid) |
185 | X.MoveWait(grid) |
184 | Y.MoveWait(-grid) |
186 | Y.MoveWait(-grid) |
185 | for x in range(xsteps): |
187 | for x in range(xsteps): |
186 | Z.MoveWait(space) |
188 | Z.MoveWait(space) |
187 | time.sleep(1) |
189 | time.sleep(delay) |
188 | Z.MoveWait(-space) |
190 | Z.MoveWait(-space) |
189 | if x < (xsteps - 1): |
191 | if x < (xsteps - 1): |
190 | X.MoveWait(-grid) |
192 | X.MoveWait(-grid) |
191 | Y.MoveWait(-grid) |
193 | Y.MoveWait(-grid) |
192 | |
194 | |
193 | for x in range(xsteps): |
195 | for x in range(xsteps): |
194 | Z.MoveWait(space) |
196 | Z.MoveWait(space) |
195 | time.sleep(1) |
197 | time.sleep(delay) |
196 | Z.MoveWait(-space) |
198 | Z.MoveWait(-space) |
197 | if x < (xsteps - 1): |
199 | if x < (xsteps - 1): |
198 | X.MoveWait(grid) |
200 | X.MoveWait(grid) |
199 | Y.MoveWait(-20) |
201 | Y.MoveWait(-20) |
200 | |
202 | |
201 | X.MoveWait(-(corner+(xsteps-1)*grid)) |
203 | X.MoveWait(-(xcorner+(xsteps-1)*grid)) |
202 | #Z.MoveWait(-10) |
204 | #Z.MoveWait(-10) |
203 | Y.MoveWait(ysteps*grid*2+20) |
205 | Y.MoveWait(ysteps*grid*2+20) |
204 | X.Float() |
206 | X.Float() |
205 | Y.Float() |
207 | Y.Float() |
206 | Z.Float() |
208 | Z.Float() |