Example Code

Robotic Arm Simulation with LabVIEW Robotics and Control Design and Simulation

Code and Documents

Attachment

This example demonstrates how to use the LabVIEW Robotics Module and Control Design and Simulation Module 2011 to simulate the dynamics of a PUMA 560 Robot collapsing under gravity.

The code is broken up into two main sections:

1) Initialize the simulated Puma 560 robot arm

a) The "Create Puma 560" SubVI in the Robotics Module loads the DH Parameters of the Puma 560 as well as the dynamic paramaters such as joint mass, centre of gravity, friction parameters, etc.

b) Set the initial position of the robot arm joints to zero

c) Initialize the graphcs and draw the initial position of the arm

2) Simulate the motion of the arm using the Control and Simulation loop

a) Call the "Calculate Joint Acceleration" VI to determine the acceleration of each of the joints based on the current joint position and velocity vectors, as well as the input torque at each joint (which is zero for this example)

b) Integrate the joint acceleration to obtain joint velocity, assuming that the initial joint velocity (at time zero) is zero

c) Integrate the newly obtained joint velocity to obtain joint positions, taking into account the initial position of the arm (at time zero) as the initial condition for integration

          Puma_Gravity.png

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
ose88
NI Employee (retired)
on

Hi,

For open the file puma_gravity_cd&sim.vi, I need some extra files:

*update plot.vi

*calculate joint accelerations.vi

*initialize plot.vi

*zero out friction.vi

*create puma560.vi

This files are in the library robotics/kinematics

Thanks for all.

______________________________
Certified LabVIEW Developer (CLD)
Contributors