Difference between revisions of "Robotino myRIO Toolkit"

From RobotinoWiki
Line 5: Line 5:
  
 
== Example Project & Demos ==
 
== Example Project & Demos ==
The Example Project is automatically opened after the installation of the VI package.(It is installed at ..\National Instruments\LabVIEW 2013\examples\Robotics Equipment Corporation GmbH\Robotino MyRIO Toolkit\examples\example project.lvproj) It contains four Demo VI to test the different functionalities of the Robotino & MyRIO Hardware.
+
The Example Project is automatically opened after the installation of the VI package. (You can find it at ..\National Instruments\LabVIEW 2013\examples\Robotics Equipment Corporation GmbH\Robotino MyRIO Toolkit\examples\example project.lvproj) It contains four Demo VI to test the different functionalities of the Robotino & MyRIO Hardware.
 
#ManualMotorControlDemo.vi: This demo shows you how you can change the global variables which are the set points for the PI-Controls.
 
#ManualMotorControlDemo.vi: This demo shows you how you can change the global variables which are the set points for the PI-Controls.
 
#OmniDriveDemo.vi: This Demo shows the functionality of the SetOmniDrive.vi
 
#OmniDriveDemo.vi: This Demo shows the functionality of the SetOmniDrive.vi

Revision as of 20:33, 19 January 2016

Introduction

This Page deals with the different VI of the Block Diagram Palette, Front Panel Palette and some other important VI like the PI-Control of the Omnidrive. The last section is about getting you started with your own Project with the Toolkit.

Example Project & Demos

The Example Project is automatically opened after the installation of the VI package. (You can find it at ..\National Instruments\LabVIEW 2013\examples\Robotics Equipment Corporation GmbH\Robotino MyRIO Toolkit\examples\example project.lvproj) It contains four Demo VI to test the different functionalities of the Robotino & MyRIO Hardware.

  1. ManualMotorControlDemo.vi: This demo shows you how you can change the global variables which are the set points for the PI-Controls.
  2. OmniDriveDemo.vi: This Demo shows the functionality of the SetOmniDrive.vi
  3. SquareDemo.vi: The Robotino follows the shape of a 1m x 1m square.
  4. AutonomousDriveDemo.vi: In this Demo the Robotino is capable of autonomous navigation along a wall and is able to detect and move around corners. Two IR-Sensors are used to keep the distance to the wall as to detect the star and end of a corner. This Youtube video shows the demonstration.

Block Diagram VI

The Block Diagram Palette

The Block Diagram consist of four of VI. Three for the OmniDrive control and one for the Distance IR-Sensor.

StartOmniDrive.vi:

Initializes and starts the Velocity PI-Control of the 3 DC-Motors of the Robotino with an asynchronous call. Additionally if the “Bumper on” input is “TRUE” the BumperCollisonDetection.vi is started which stops all 3 motor-controls upon a collision and thus any further movement. The VI has the references to the asynchronous called VI as output.

StartOmniDrive.vi

SetOmniDrive.vi:

Set the current translational and rotational velocities of the Robotino in meter per second and revolutions per second. This VI transforms those inputs into specific rotational speeds for the three Omnidrive wheels. Those calculated values are written into the three global variables “n (M1)”,”n (M2)” and “n (M3)” which are the input values for the different Motor_PI.vi respectively.

SetOmniDrive.vi

StopOmniDrive.vi:

This VI stops the Motor_PI.vi then closes the references to them. This VI has the Cluster of references from the StartOmniDrive.vi as input.

StopOmniDrive.vi

DistanceIR.vi:

This VI initializes and configures the SPI-Connection with the ADC (AD7490) and then transforms the transmitted voltage values of the 9 IR-Sensors into distances in meter. Per run of this VI only one new analog input value is transmitted so that it needs 16 calls of this function for all analog inputs to be updated.

DistanceIR.vi


Front Panel Controls

Other VI

Motor_PI.vi:

This VI is run for each DC-Motor in preallocated clone reentrant execution. The VI is timed on a 1 kHz frequency in a Real-Time loop. First it calculates the difference in encoder counts from the last cycle to the current circle and then it calculates the next duty-circle length of the PWM-Signal with the PI-Control. The amount of values considered for the Integral Control is limited to the last 100 values. Further this VI opens and closes all three I/O references it uses, the encoder counts, PWM-Signal and direction switch of the H-Bridge. The Motor_PI.vi can be shut down through the Motor_Stop.vi global variable.

Motor_PI.vi

SPI_Voltage2Distance2.vi:

Transforms the IR-Sensor voltage as input into a distance in meters with approximated values from a table of measurements as output.

SPI_Voltage2Distance2.vi

Creating your own VI with the Toolkit