- Do horizontal strokes from the bottom limit switch to the top limit switch or from the currently touched vertical limit switch to the opposite limit switch.
- Do vertical strokes from the left limit switch to the right limit switch or from the currently touched horizontal limit switch to the opposite limit switch.
For the horizontal strokes a stepper motor has been used. Whereas for the vertical strokes an induction motor driven with a VFD has been used.
- Go to the left limit switch
- Count steps until the right limit switch is pressed
- Initialize speed profile for the stepper motor TODO explain more here
- Go to the bottom limit switch.
- Zero out the counter for the vertical encoder.
- Go until the stroke gap limit switch has been pressed.
- Read the count as this will be the vertical stroke gap used in transitioning.
- Turn off the solenoid that controls which angle the guns are positioned at
- Go to the vertical start location of horizontal strokes if not at a vertical extreme of the machine.
- Go to the horizontal start location of horizontal strokes if not at a horizontal extreme of the machine.
- Turn on the solenoids that control the paint guns
- Go to the opposite horizontal end point.
- Transition vertically
- If a vertical limit switch has been pressed during the transition, we're done
- Repeat
- Turn on the solenoid that controls which angle the guns are positioned at. This rotates the gun holder by 90 degrees.
- Go to the vertical start location of vertical strokes if not at a vertical extreme of the machine
- Go to the horizontal start location of horizontal strokes if not at a horizontal extreme of the machine
- Turn on the solenoids that control the paint guns
- Go to the opposite vertical end point.
- Transition horizontally.
- If a horizontal limit switch has been pressed during the transition, we're done
- Repeat
To transition horizontally simply move towards the target of ending the vertical strokes by the vertical stroke gap.
To transition vertically move towards the target of ending the horizontal strokes by the horizontal stroke gap.
Install ino and run
ino build
To upload:
ino upload
To check out debugging output:
ino serial