# Telemetry Tab

{% hint style="danger" %}
Those using REV ION products on REVLib 2026 or newer must use [REV Hardware Client 2](https://docs.revrobotics.com/rev-hardware-client-2).
{% endhint %}

### Connected Devices

Devices available in the REV Hardware Client are shown on the left side of the window. The device that the USB C Cable is connected to will be listed first, followed by any devices connected over CAN.

<div><figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2F1rZ5w7A1G9zOs7tSM7Hk%2Fimage.png?alt=media&#x26;token=8e9fca36-640a-4ed2-b3d9-ada480522e60" alt="" width="375"><figcaption></figcaption></figure> <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2FMoQU8SXJpCn5dhb7MM5G%2Ftelemetry2.png?alt=media&#x26;token=162b1fc0-3d71-41a9-bed7-514dccda1888" alt="" width="375"><figcaption></figcaption></figure></div>

### Available Devices

The below devices are able to provide telemetry and allow the Telemetry Tab to be used.&#x20;

* SPARK MAX
* SPARK Flex
* Power Distribution Hub&#x20;
* Pneumatic Hub
* Devices Connected to the SPARK MAX or SPARK Flex Motor Controllers:
  * NEO Vortex
  * NEO Brushless Motor V1.1
  * NEO 550
  * Brushed DC Motor
  * Through Bore Encoder&#x20;
  * Other inputs connected to the Data Port

## Telemetry Settings

### Signals and Graph

<figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2FSJPfE59qigsowxji8a5g%2Fimage.png?alt=media&#x26;token=6e502bdb-a573-469f-8faa-73c5edc42781" alt=""><figcaption></figcaption></figure>

1. **Run Motor:** Choose setpoints to run a motor connected to a SPARK MAX using various modes, including position, velocity, and duty cycle.
2. **Signals:** Select the different signals from the SPARK MAX you want to monitor here
3. **Start & Restart Graph:** Start initiates recording of telemetry. Restart will erase the data and start again
4. **Time Span:** Change the time span shown on the x-axis of the graph
5. **Scales:** Different Signals will have different scales for the y-axis. You can change which are shown by clicking the arrows here
6. **Signal Key and Scale Adjustment:** Signals you choose to monitor will be shown here. Click **X** to delete a signal from the graph and **>** to adjust the scale of the signal's graph y-axis
7. **Save Data:** Save your data as a .CSV or image using this menu

### Tuning

<figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2Fala6TUGG2uXzLjnbHXkS%2Fimage.png?alt=media&#x26;token=bcc97f8d-09e8-4706-9891-42e3088fdf5c" alt=""><figcaption></figcaption></figure>

Update PIDF parameters on the fly to tune control loops on the SPARK MAX.

### Parameters

<figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2F3Gb2bfQ5X3vk0plHkxOv%2Fimage.png?alt=media&#x26;token=2937993e-110d-40a7-9fe7-ecc8c9bd4eba" alt=""><figcaption></figcaption></figure>

Select the arrow to show all configurable parameters within a specific group. For more information on each parameter type see [Configuration Parameters](https://docs.revrobotics.com/brushless/spark-max/parameters).

## Editing the Y-Axis Scale

<figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2FGUFJJLH9wQG10Bn1itRI%2Fimage.png?alt=media&#x26;token=8c4ccfc5-8fbe-4434-a95b-19a0d1e9cd39" alt=""><figcaption></figcaption></figure>

1. **Y-Axis Labels:** Select the label you want to view by clicking the arrow at the bottom of the label. In this image the Power Distribution Hub Channel Currents are selected.
2. **Y-Axis Scale:** Use the drop down arrow next to the parameter you would like to change the scale for. Be sure to un-check the "use defaults" box to apply your changes.&#x20;

## Example

<figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2F1CLVcCEVMbqE9I91IVub%2Fimage.png?alt=media&#x26;token=91f47ff9-3d8d-483d-b49e-b15b856267f6" alt=""><figcaption></figcaption></figure>

In this example the SPARK MAX and NEO Motor were run at 30% power, switching between forwards and backwards several times. The first switch in direction occurs near t=5s where you can see the Applied Output, Position, and Velocity change.&#x20;

## Exporting Data

### Exporting as a Image

This will export a .png image of the of the graph. The whole Time Span x-axis will be exported regardless of the time information was collected. The image below exported a 30 second graph while only 8 seconds of data was recorded.&#x20;

<figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2F0TyGnF1VuJG8HaqShJ2d%2FTelemetry%20ImageImage.png?alt=media&#x26;token=d96ed4b5-43be-41af-a1a5-39efb3ff9e11" alt=""><figcaption></figcaption></figure>

### Exporting as a .CSV

This will export a .csv file of the of the values and timestamps.

<figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2FJrEgRP3hJq1JqFvtKwmR%2FTest%20Telemetry%20CSV.PNG?alt=media&#x26;token=9af7259e-e605-4f52-aa4f-80a4bf16b256" alt=""><figcaption></figcaption></figure>

1. **Timestamp:** This is the timestamp that the data was record for each signal in Unix time. Note that different signals may have their data recorded at different times than other signals.&#x20;
2. **Signal Name:** The Label of signal selected when creating your Telemetry graph.
3. **Device Name:** The name of the device and the randomly generated ID assigned to each device when connected to the REV Hardware Client. This is randomly generated each time the device is connected to the REV Hardware Client.
4. **Signal Value:** The value recorded for each Signal Name.

### Record to .CSV

This allows you to select an existing .csv file prior to starting your graph and record the data straight to the .csv file. This allows you export additional data to a previously exported telemetry file without headers to seamlessly add to your existing columns.&#x20;

## Troubleshooting

### roboRio Lockout

**Please be aware of the CAN lockout feature of the ION Control System.** If it has been connected to the roboRIO's CAN bus, a safety feature within all ION Control System Devices and will lock out USB communication. You may be able to change some parameters on select devices but in order to run motors through the telemetry tab disconnecting from the CAN bus and power-cycling the device will release the lock.

## PID Set Up Guide

{% hint style="warning" %}
As of REV Hardware Client version 1.7.0, "Burn Flash" has been renamed to "Persist Perimeters"!
{% endhint %}

1. Under the device list, select your SPARK motor controller.<br>

   <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2FDCns33hRS22GbjFqFvHu%2Fimage.png?alt=media&#x26;token=737f6d8d-7816-41c7-b917-4f18e775dd65" alt=""><figcaption></figcaption></figure>
2. Click the "Advanced" tab.<br>

   <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2FYxr1C81HjdtAQit3HRHm%2Fimage.png?alt=media&#x26;token=7fee13ba-62f3-4d0f-a7f6-9731bf48fb84" alt=""><figcaption></figcaption></figure>
3. For a SPARK MAX, under the "Alternate Encoder" section, make sure "kDataPortConfig" is set to "Default".<br>

   <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2F2DHcFQ0pMlCtOVYNWDZy%2Fimage.png?alt=media&#x26;token=80b61586-50c2-4c86-8634-de0de4c3f163" alt=""><figcaption></figcaption></figure>
4. Under the "Closed Loop" section, set "kCtrlType" to "Position".<br>

   <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2FeKFRo5Kd0Cek1XG0A74y%2Fimage.png?alt=media&#x26;token=80f21918-c455-42e6-b761-986f6274ed1d" alt=""><figcaption></figcaption></figure>
5. Under the same section, set "kFeedbackSensorPID0" to "Duty Cycle".<br>

   <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2F0cNAlLWhOJMP7ob9c1p8%2Fimage.png?alt=media&#x26;token=7995deb2-f587-45a0-a3db-ab092d7f5c3e" alt=""><figcaption></figcaption></figure>
6. Click "Burn Flash" at the bottom of the page. (Burn Flash has been renamed to Persist Perimeters in v 1.7.0) <br>

   <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2Fs2VeYqISq5ye1mZ4LX1g%2Fimage.png?alt=media&#x26;token=a6f7f297-e76f-4207-bdc0-764555f829d1" alt=""><figcaption></figcaption></figure>
7. To tune your PID gains, click the "Telemetry" tab.<br>

   <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2F8XIkIEm9lyCZl7u2EPLR%2Fimage.png?alt=media&#x26;token=03288dc7-f65a-4e29-85a3-401a6544be75" alt=""><figcaption></figcaption></figure>
8. Set the "Mode" to "Position".<br>

   <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2FTxXdreTYhkxSe9R4KRyB%2Fimage.png?alt=media&#x26;token=fef3a933-1349-40cb-8884-138f8b4e71a8" alt=""><figcaption></figcaption></figure>
9. Under the "Signals" tab, select "Run Setpoint" and "Duty Cycle Position".<br>

   <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2FDYT694Szdeyl22k7SPXy%2Fimage.png?alt=media&#x26;token=2b9b8e64-cdd7-4c8e-be21-a9f4b39dc516" alt=""><figcaption></figcaption></figure>
10. Click the "Tuning" tab.<br>

    <figure><img src="https://3899616195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGEfA6CxjaSQiH5kHxn%2Fuploads%2FyUITywVlOjsKyE6iWkOF%2Fimage.png?alt=media&#x26;token=1a5c6aaf-f172-404d-b50a-018379171ee7" alt=""><figcaption></figcaption></figure>
11. Begin tuning your PID gains! Note that the setpoint in Hardware Client only allows whole numbers, so it would be helpful to set the Duty Cycle Position Factor parameter to something like 360 for degrees.

## Frequently Asked Questions

<details>

<summary>Do I need to use a special type of USB cable?</summary>

You need to use a USB-A to USB-C cable data capable cable. The orange USB cable that comes with most ION devices fits this description.&#x20;

</details>

<details>

<summary>Does the SPARK Flex offer more options than the SPARK MAX?</summary>

As of the 2024 FRC season the SPARK Flex and SPARK MAX offer the same options. New features will become available with future updates to the SPARK Flex that will be free to SPARK Flex owners forever.

</details>

<details>

<summary>Can the units of the telemetry channels be changed?</summary>

No, not at this time. We recommend exporting the data as a .csv file and converting to fit your specific needs.

</details>
