Team Sub-Groups‎ > ‎Programming‎ > ‎

28 Jan 2015 Labview Simulator

posted Jan 29, 2015, 7:24 PM by Rob Owings   [ updated Oct 4, 2015, 12:05 AM by Jeffrey Kangas ]
The LabVIEW simulator information was different than last year.  They change from analog module to controller (detailed here and here) made things a bit different from last year.  I got a custom dashboard to take gyro readings from the simulator, so using the communication table links you should be able to make a custom dashboard AND use the simulator to try new code.

Similar to the last post, here are instructions on setting up the radio.

Here is a copy of the simulator robot setup (gyro went from channel 0 to channel 1):

Actuators on this simulated robot

  1. Left Motor
    • PWM Channel = PWM 0
  2. Right Motor
    • PWM Channel = PWM 1
  3. Camera Servo
    • PWM Channel = PWM 5
    • Angular Range = 170
  4. Arm Servo
    • PWM Channel = PWM 6
    • Angular Range = 170
  5. Gripper Servo
    • PWM Channel = PWM 7
    • Angular Range = 170

Sensors on this simulated robot

  1. Encoder on Right Motor
    • A Channel = DIO 3
    • B Channel = DIO 4
  2. Encoder on Left Motor
    • A Channel = DIO 5
    • B Channel = DIO 6
  3. Gyro
    • Analog Channel = AI 1 (DIFFERENT)
  4. Ultrasonic
    • Ping DIO Channel = DIO 1
    • Echo DIO Channel = DIO 2
  5. AXIS M1011 Camera
 An example dashboard and the begin, teleop, and finish vi files from a roborio 2015 project are attached that will illustrate this when run together in the simulation environment.

Oh and one more thing.  The dashboard worked after I put the same control in teleop and gave it data and sent the data to the SD component
(image from dash.  gyro is dial on right.  simulator Gyro gives -180 to +180 data)

(the code added to the dashboard for the gyro to work - Name must match teleop, SD-Dbl is the smart dashboard numeric communication link with output to wire to the control)

(Teleop control copied from dashboard)
(teleop code with angle wired into the pasted gyro control - note the SD/Dbl VI with the input.  This is the smart dashboard communication link)

Jeffrey Kangas,
Jan 29, 2015, 7:24 PM
Jeffrey Kangas,
Jan 29, 2015, 7:24 PM