Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dmc-60c:getting-started [2018/06/27 20:24] – Thomas Kappenmandmc-60c:getting-started [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Setting up FRC Driver Station ======+====== Getting Started with the DMC60C ======
  
-This guide will provide a step by step guide of setting up the FRC Driver Station environment for use in FRC Competitions.+This guide will provide a step by step guide of setting up the DMC60C API and configuration utility, as well as the FRC Driver Station environment.
  
 ----- -----
Line 11: Line 11:
     * USB Cable or Ethernet cable to plug it in.     * USB Cable or Ethernet cable to plug it in.
   * **DMC60C**   * **DMC60C**
-  * **USB Gamepad** (Optional)+  * **USB Gamepad** (For example projects)
  
 ===Software=== ===Software===
-  * **Labview FRC 2017**  +  * **Labview 2019 FRC Edition** (if using Labview) 
-    * [[http://www.ni.com/download/labview-for-frc-17.0/7185/en/]] +    * [[https://wpilib.screenstepslive.com/s/currentCS/m/labview/l/1027501-installing-labview-for-frc-2019-labview-only|Follow Tutorial Here]] 
-  * **Labview FRC Update Suite** +  * **FRC Update Suite** 
-    * [[http://www.ni.com/download/first-robotics-software-2017/7183/en/]] +    * [[https://wpilib.screenstepslive.com/s/currentCS/m/cpp/l/1027499-installing-the-frc-update-suite-all-languages|Follow Tutorial Here]] 
-  * **Eclipse** for C++ and Java development +  * **WPILIB Suite with VS Code installed** 
-    * [[https://wpilib.screenstepslive.com/s/currentCS/m/cpp/l/145002-installing-eclipse-c-java|Follow this tutorial]]+    * [[https://github.com/wpilibsuite/allwpilib/releases]]
   * **DMC60C API**   * **DMC60C API**
-    * Github link goes here. +    * [[https://github.com/Digilent/dmc60c-frc-api]]
-  * **WinSCP** to transfer files to the roboRIO. +
-    * [[https://winscp.net/eng/index.php]]+
  
 ----- -----
Line 34: Line 32:
  
 >1.1) Power up the roboRIO and plug it into your network via ethernet cable, or into the computer via USB. >1.1) Power up the roboRIO and plug it into your network via ethernet cable, or into the computer via USB.
-> 
->Pic 
  
->1.2) **Open** Labview 2017 and click **Utilities>roboRIO Imaging Tool 2018**. **Find** the roboRIO in the roboRIO Targets box. **Take note of the IP address**.+>1.2) Open **roboRIO Imaging Tool**. **Find** the roboRIO in the roboRIO Targets box.
 > >
 +>{{:dmc-60c:roborioimage2019.jpg?direct&600|}}
 >NOTE: If the roboRIO does not appear on the list, make sure that it is connected to the same network as the computer running the Imaging tool. >NOTE: If the roboRIO does not appear on the list, make sure that it is connected to the same network as the computer running the Imaging tool.
 > >
->Enter your **Team Number** in the appropriate box.+>1.3) Enter your **Team Number** in the appropriate box.
 > >
->Check the box next to **Format Target**, and select FRC_roboRIO_2018_v*.zip then click **Reformat**.+>1.4) Check the box next to **Format Target**, and select FRC_roboRIO_2018_v*.zip then click **Reformat**.
 > >
 >Once the roboRIO has been successfully reformatted and updated, you may close the Imaging tool. >Once the roboRIO has been successfully reformatted and updated, you may close the Imaging tool.
  
->1.3) Open WinSCP and login to your roboRIO with the following settings:+====2. Installing DMC60C Library files ==== 
 +>2.1) Run **Install DMC60C libraries and config utility.bat**. This is the install script for the DMC60C API. It will also install the DMC60C Config Utility server onto the roboRIO. 
 +> 
 +>{{:dmc-60c:installer.jpg?direct&800|}} 
 +> 
 +>2.2) Selecting 1 or 2 will copy the DMC60C config server to the roboRIO. The username and password can be left blank unless it was changed on the roboRIO. It will also install the DMC60C Library files to the WPILib directory. Selecting 3 will only copy the API files to the WPILIB directory. 
 +> 
 +>2.3)The DMC60C config server is hosted at "**roboRIO-[team number]-FRC.local:8000**". The roboRIO IP address can also be used "**[roboRIO IP address]:8000**" to reach the server. This server is automatically started after installation.
  
-| File Protocol  | SFTP                           | +====3. Configuring your DMC60C ==== 
-| Host Name      | The IP address of the roboRIO  | +>3.1) Open an internet browser and type "roborio-[teamnumber]-frc.local:8000", replacing [teamnumber] with your team number. The roboRIO's IP address will also work and may respond faster. For example: 192.168.1.104:8000 
-| Port           | 22                             | +> 
-| User name      | admin                          | +>3.2) If the DMC60C configuration utility was successfully set up, it will show up in the browser. Make sure to change the device ID from 0 to any number between 1 and 65 before continuing. You may also configure any other options here as well. 
-| Password       | *leave this blank*             |+> 
 +>{{:dmc-60c:97239993.png?direct&800|}}
  
->1.4) Copy **libDMC60c.so** to **/usr/local/frc/lib/** on the roboRIO.+====4. Opening an example project (C++/Java) ==== 
 +>4.1) Open FRC VS Code 2019. 
 +> 
 +>4.2) Click **File>Open Folder**. 
 +> 
 +>4.3) Navigate to the DMC60C API git examples (**dmc60c-frc-api\Examples**) folder. Select the folder containing the example project and click **Select folder**. 
 +> 
 +>{{:dmc-60c:examplesvscode.jpg?direct&600|}} 
 +> 
 +>The project folder will be added to the VS Code workspace. This project already has the DMC60C vendor dependencies installed. **Note**: To install vendor dependencies, click the W in the top right corner and click **Manage Vendor Libraries>Install New Libraries (Offline)>Digilent-DMC60C** and click OK. 
 +> 
 +>4.4) In the explorer tab, open **.wpilib/wpilib_preferences.json**. Change the team number to your team number and save the file. 
 +> 
 +>{{:dmc-60c:teamnumber.jpg?direct&600|}}
  
-====2. Setting up the environment ====+====4. Opening an example project (Labview) ==== 
 +>4.1) Open LabVIEW FRC 2019. 
 +> 
 +>4.2) Click **File>Open Project...**. 
 +> 
 +>4.3) Navigate to the **dmc60c-frc-api\Examples\Labview** folder. Open the example project folder, select the .lvproj, and click OK to open the project. 
 +> 
 +>{{:dmc-60c:labviewexample.jpg?direct&600|}} 
 +> 
 +>4.4) Right click the RoboRIO Target and open the Properties. 
 +> 
 +>{{:dmc-60c:lvproperties.jpg?direct&600|}} 
 +> 
 +>4.5) Under IP Address / DNS Name, change the team number 42 to your team number. Click OK. 
 +> 
 +>{{:dmc-60c:lvproperties2.jpg?direct&600|}} 
 +====5. Running the example project (C++/Java) ==== 
 +>5.1) Run **FRC Driver Station** to open the FRC Driver Station. 
 +> 
 +>5.2) Click the gear on the left side of the driver station. Change the **Team Number** to the roboRIO's team number and press enter. This should find the team's roboRIO. The roboRIO's IP address can also be entered here. 
 +> 
 +>5.3) Plug in the controller and wait for the joysticks light to turn green. 
 +> 
 +>{{:dmc-60c:driverstation.jpg?direct&600|}} 
 +> 
 +>5.4) Open src/main/cpp/Robot.cpp or src/main/java/frc/robot/Robot.java to open the top level robot implementation. Change the device number to the device number of your DMC60C and save the file. 
 +> 
 +>{{:dmc-60c:devicenumber.jpg?direct&600|}} 
 +> 
 +>5.5) When ready, click the WPI Logo on the top right. Click **WPILib C++ Deploy** and click **Ok** to deploy the code to the roboRIO. 
 +> 
 +>{{:dmc-60c:deploy.jpg?direct&600|}} 
 +> 
 +>5.6) Click the steering wheel on the left side of the driver station. Select **Teleoperated** and click **Enable**. This will start the teleoperated loop in the deployed example code on the roboRIO. You should now be able to drive the DMC60C with the connected joystick.
  
->2.1) After installing the WPILib plugins as described [[https://wpilib.screenstepslive.com/s/currentCS/m/cpp/l/145002-installing-eclipse-c-java|at the end of this tutorial]], copy the contents of the Github repo into C:\Users\[username]\wpilib\user\cpp\.+====5. Running the example project (LabVIEW) ==== 
 +>5.1) Run **FRC Driver Station** to open the FRC Driver Station. 
 +> 
 +>5.2) Click the gear on the left side of the driver station. Change the **Team Number** to the roboRIO's team number and press enter. This should find the team's roboRIO. The roboRIO's IP address can also be entered here. 
 +> 
 +>5.3) Plug in the controller and wait for the joysticks light to turn green. 
 +> 
 +>{{:dmc-60c:driverstation.jpg?direct&600|}} 
 +> 
 +>5.4) Open **Target/Team Code/Begin.vi**. Press **CTRL+E** to open the block diagram for Begin.vi. 
 +> 
 +>{{:dmc-60c:lvbegin.jpg?direct&600|}} 
 +> 
 +>5.5) Change the device number feeding into the DMC60C Open VI to your DMC60C's device number. If applicable, change the wheel parameters based on your hardware configuration. 
 +> 
 +>5.5) When ready, open **Target/Robot Main.vi** and run it. This will deploy the LabVIEW program to the roboRIO. 
 +> 
 +>5.6) Click the steering wheel on the left side of the driver station. Select **Teleoperated** and click **Enable**. This will start the teleoperated loop in the deployed example code on the roboRIO. You should now be able to drive the DMC60C with the connected joystick.
  
-{{tag>dmc60c tutorial frc }}+{{tag>dmc60c gsg frc }}