Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent help needed with a program for a Pick and Place robot project

I am a final Mechanical Engg student doing my final yr project on a Pick and Place robot.
 
Objective of my project is to control a stepper motor driven computer controlled 4-axis pick and place robot. The robot is of polar configuration with 3 rotating axes. 4th axis is dedicated to the gripper. We require it to perform the following functions:

1) "Teach/Play" toggle is used to switch between modes.
2) No of degrees by which the the axis should rotate is given as an input. When the button corresponding to a particular axis is pressed, the program must generate sufficient pulses to ensure the correct amount of rotation.
Note: # It has  been calculated that one degree of rotation requires 16.6667 pulses(avg)
 # Buttons have been set to "Switch Until Realease" so that it is also possible to enter a small value of rotation angle   and hold down the button for an arbitrary length of time.
3) Controller must remember a sequence of positions and replay them when called for.
Note: # 2D array of size 5xn is used to store the positions. 3 columns to record position of x,y,z axes and 2 to denote where gripper is closed and opened.
4) The limit switches must accomodated for in the program. When an axis is rotating in a particular direction it must check only the limit switch corresponding to that direction of motion and not that of the opposite direction of rotation.
5) Gripper closes when button is pressed till the signal from the strain guage exceeds the limit.
6) Gripper opens when button is pressed till limit-switch  is activated.
7) In the play mode, the robot traverses the path of the stored set of points. It must also open and close the gripper at the correct time and position as recorded earlier.
0 Kudos
Message 1 of 2
(3,573 Views)

Hi,

I think the best advise that I can give you is to revise your code according to the suggestions in the LabVIEW style guide. I had a quick look at your code and it looks like you should redesign your program, using a state machine architecture. You also should look into an event-driven approach. 

These documents should help you to design LabVIEW applications that are easy to read and maintain.

Best regards,

Jochen Klier
National Instruments Germany

 
0 Kudos
Message 2 of 2
(3,566 Views)