Arena: program FRC robots in FORGE
Scan Cycle Arena brings PLC programming to FIRST Robotics Competition (FRC) teams. Write the robot's logic in ladder, function block diagram or SFC in FORGE, map each tag to a motor, sensor or controller button, and run it on the robot.
Who it is for
Arena is for high school organizations only. It starts with FRC teams.
Beta The teacher who runs a high school organization finds Arena in the dashboard.
How it works
Robot Mapping, Export and Live from robot are in beta in the Labs workspace.
- Write. Write the robot logic in FORGE with the same editor and tags you use in Labs. Test it in FORGE first, one scan at a time.
- Map. Open Robot Mapping and map each tag to a piece of robot hardware.
- Export. Choose Export. FORGE writes a WPILib Java project. Build and deploy it with the standard FRC tools, or test it first in the WPILib simulator if you have no robot.
- Watch. See the robot's live tag values and rung states in FORGE while it runs.
Robot Mapping
In Robot Mapping, click + Device, pick the device, then its port, then a name. Arena makes a Global tag with that name and the type the device needs.
| Group | Device | Tag | Port |
|---|---|---|---|
| Driver Station | Joystick button | BOOL | Controller 0 to 5, button 1 to 32 |
| Driver Station | Joystick axis | REAL | Controller 0 to 5, axis 0 to 15 |
| Driver Station | Joystick POV | Whole number | Controller 0 to 5, POV 0 to 7 |
| Driver Station | Robot state | BOOL | Enabled, Autonomous, Teleop, Test, E-stopped or FMS attached |
| Smart I/O | Digital input | BOOL | Port 0 to 5 |
| Smart I/O | Analog input | REAL in volts, or DINT raw | Port 0 to 5 |
| Smart I/O | PWM motor controller | REAL from -1.0 to 1.0 | Port 0 to 5, and the motor controller model |
| CAN | CAN motor controller | REAL from -1.0 to 1.0 | CAN ID 0 to 62, and the motor controller model |
| Pneumatics | Solenoid | BOOL | The pneumatics module, its CAN ID and a channel |
| Pneumatics | Double solenoid | Two BOOLs, Fwd and Rev | A forward and a reverse channel |
A port or channel can be mapped once. A device on a port that is already used is refused before it is added.
Example: run the intake while a button is held
IntakeButton is mapped to a joystick button and IntakeMotor to a motor controller. The motor runs at 80 % while the button is held.
1. Hold the button. The first rung moves 0.8 into IntakeMotor. The second rung is false.
2. Release the button. The second rung moves 0.0 into IntakeMotor, so the motor stops.
| Step | IntakeButton | IntakeMotor |
|---|---|---|
| 1. Hold the button | 1 | 0.8 |
| 2. Release the button | 0 | 0 |
On the robot, motor values are kept between -1.0 and 1.0. Outputs are written only while the robot is enabled and not e-stopped; otherwise each output is held at its safe state.
Time on the robot
In Labs each scan moves the clock by the project's scan time. On the robot one scan runs in each WPILib loop and uses the time measured since the last one, kept between 0 and 100 ms. A timer can therefore finish one scan earlier or later on the robot than in Labs.
What is built today
- Export to a WPILib Java project. It has been checked in the WPILib simulator.
Beta
- Robot Mapping and Export controls in Labs.
- Live view from the robot, showing which rungs are on and the tag values.
Work in progress
- Deploy from FORGE. A teacher sets a password in the dashboard, and students and teachers who know it can deploy only while the robot is disabled and not connected to the field management system (FMS).
FIRST® and FIRST® Robotics Competition are registered trademarks of FIRST. Scan Cycle Arena is not affiliated with or endorsed by FIRST.