Difference between revisions of "Robotino myRIO Toolkit"

From RobotinoWiki
Line 8: Line 8:
  
 
*StartOmniDrive.vi:
 
*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.
+
Initializes and starts the Velocity [[#Other VI|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.
 
[[File:omnistart_vi.png|none|thumb|StartOmniDrive.vi]]
 
[[File:omnistart_vi.png|none|thumb|StartOmniDrive.vi]]
  
Line 19: Line 19:
 
[[File:OmniStop_vi.png|none|thumb|StopOmniDrive.vi]]
 
[[File:OmniStop_vi.png|none|thumb|StopOmniDrive.vi]]
 
*DistanceIR.vi:
 
*DistanceIR.vi:
This VI initializes and configures the SPI-Connection with the [http://www.analog.com/media/en/technical-documentation/data-sheets/AD7490.pdf 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.
+
This VI initializes and configures the SPI-Connection with the [http://www.analog.com/media/en/technical-documentation/data-sheets/AD7490.pdf 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.
 
[[File:IrDistance_vi.png|none|thumb|DistanceIR.vi]]
 
[[File:IrDistance_vi.png|none|thumb|DistanceIR.vi]]
  
  
 
+
== Front Panel Controls ==
 
 
 
 
 
 
 
 
 
 
== Front Panel VI ==
 
 
== Other VI==
 
== 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.
 +
[[File:Motor_vi.png|none|thumb|Motor_PI.vi]]
 
== Creating your own VI with the Toolkit ==
 
== Creating your own VI with the Toolkit ==

Revision as of 18:03, 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.

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

Creating your own VI with the Toolkit