04-23-2013 03:45 AM - edited 04-23-2013 04:11 AM
Hi!
I want my bipolar stepper motors (2x) to follow a set of coordinates, so I hope someone could help me get started.
The stepper motor control vi receives an amount of steps, negative amount for stepping backwards.
Thus; to calculate amount of steps needed to get to the next coordinate: No. of steps = Active Coordinate - Previous coordinate
In the set/list/array I want to specify if it's for motor 1 or 2 and whether a specific, additional signal is on or not.
Example
10231 - motor 1 without additional signal on, moves to coordinate 231
11300 - motor 1 with additional signal on, moves to coordinates 300
00231 - motor 2 without additional signal on, moves to coordinate 231
01300 - motor 2 with additional signal on, moves to coordinate 300
Where the first number indicates motor 1 or 2, the second number if the additional signal is on or off and the 3 last is the desired coordinate.
The first 2 numbers should be split individual signals.
The amount of coordinates will vary.
Regrads,
Thorstif
Solved! Go to Solution.
04-23-2013 04:33 AM - edited 04-23-2013 04:34 AM
It should operate similar to this:
Read from list/array,
Use coordinate number 1 from list,
Split into 3 parts; motor 1 or 2, laser on or off, coordinate (list says 11111: 1(motor 1 or 2)1(laser on or off)111(coordinate))
Calculate number of steps: No. of steps = Active Coordinate - Previous coordinate,
Send No. of steps to N_Step_test-(1 or 2),
Start N_Step_test-(1 or 2), with laser on or off,
Wait till N_Step_test-(1 or 2) finishes (perhaps by seeing N reach 0 (or = No. of steps, I don't know if it counts up or down),
Use next coordinate from list,
Repeat until no more coordinates,
04-24-2013 08:26 AM
Put a cluster in an array, unbundled it by name.