Example Program Drafts

Showing results for 
Search instead for 
Did you mean: 

Tetrix Prime Balancing Beam Code


I have improved the code from the VIPM to use for the Tetrix Prime Balancing Beam MyRio demo.


It is an balancing beam with a ball on it and you can set the position of where you want the ball.

Steps to Implement or Execute Code

  1. Download the code
  2. Download the code from VIPM (http://ni.com/tetrix-prime)
  3. Open the LVProject
  4. Open the main code(Balance Arm Main.vi)
  5. Change the variables(arm range and center point offset, see below)
  6. Run it
  7. Get your Ipad/Android tablet and create a Data Dashboard or download mine(import the lvdd to Itunes)

Arm Range and Center Point Offset

To change the variables, you have to get the minimum and maximum PWM values.

To get them, run the Control Arm directly.vi and set it to a value that is the maximum on your installation,

then also get the minimum and the center(the main beam is horizontal). You can enter the center value directly into center point offset control(main),

but the other control is a bit harder:

  1. Calculate the difference between the center and the min/max, they should be almost the same
  2. divide the value by 100, because the maximum PID outcome is 100 and -100
  3. enter it into the control
  4. if it goes to the wrong end, add/remove a negative sign

Then it should work, if it oscillates for too long or something, change the PID values see http://digital.ni.com/public.nsf/allkb/806F6F0B775FAF32862572FA0052F2AB




MyRio software


Tetrix Prime for MyRio




Additional Images or Video