# Sliding Rail Kit

{% hint style="success" %}
**📅Update: 2021/06/05**
{% endhint %}

## Table of Contents

[1) Set up for first use](#1-set-up-for-first-use)

[2) Start using](#2-start-using)

[3) Integrate Sliding Rail Kit into your project.](#integrate-sliding-rail-kit-into-your-project)

## 1. Set up for first use

Read the [**Installation Guide**](https://manual.rotrics.com/get-start/sliding-rail-kit/sliding-rail-kit-installation-guide) to check the items, assemble the sliding rail and set up for the first use.&#x20;

{% content-ref url="sliding-rail-kit/sliding-rail-kit-installation-guide" %}
[sliding-rail-kit-installation-guide](https://manual.rotrics.com/get-start/sliding-rail-kit/sliding-rail-kit-installation-guide)
{% endcontent-ref %}

## 2. Start using

{% hint style="success" %}
:man\_mage:**Tips:** Make sure you've updated Rotrics Studio to V1.0.1 and above. You can download it on our Download Center - <https://www.rotrics.com/pages/downloads>
{% endhint %}

{% hint style="success" %}
:man\_mage: **Tips:** Make sure you've updated DexArm's firmware to V2.2.2 and above. You can update it by clicking **Setting -> General -> check update** on Rotrics Studio.&#x20;
{% endhint %}

### 2.1 Control Sliding Rail with Rotrics Studio.

#### 2.1.1 Initialize the Sliding Rail

{% hint style="warning" %}
:brain:**Note:** The sliding rail uses a different step motor as DexArm. We need to finish the initialization to change the step-per-unit value before using it.&#x20;
{% endhint %}

Move DexArm to the **middle** of the sliding rail and then power on. Open Rotrics Studio and click **Basic -> Accessories -> Sliding Rail ->** <img src="https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo02iQgvDmeN8Y1tIE%2FInitialization.png?alt=media&#x26;token=5370be8c-7b71-495f-9736-12221b8be140" alt="" data-size="original"> to initialize your sliding rail.

![](https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo0H3x3RFXt3zNCjdY%2Fimage.png?alt=media\&token=215a568f-5caa-4d5d-8c07-4e59a2a52092)

DexArm will automatically update the "axis\_steps\_per\_unit" of the E axis, meanwhile, the sliding rail will move to its home point through stallguard and sensorless\_homing of TMC2209.&#x20;

Now, we can start controlling it with Rotrics Studio. We can use the **Left / Right** arrow button to control the sliding rail since it's been connected to the 12-pin motor port.&#x20;

{% hint style="success" %}
:man\_mage: **The recommended speed range is 2000 - 5000 mm/min**
{% endhint %}

### 2.2 Drawing with Sliding Rail

We provided a sample svg file for you to experience drawing with the sliding rail. Click the link below to download it.

{% file src="<https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MITEdRwHx18HNjp0kcq%2F-MITEgi49vJPa-xkcTUe%2FLandscape%20of%20Beijing.svg?alt=media&token=89dbde04-fb06-49fa-8933-62ffe000f251>" %}
Landscape of Beijing - for drawing test
{% endfile %}

#### How to use it?

**Step 1:** Set up drawing board and sliding rail.&#x20;

Put a 1 meter long board below DexArm and stick a paper on it.&#x20;

Power on DexArm and move it to the center of the drawing board.&#x20;

![](https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MITIqE-RXXxUEqRVhLy%2F-MITMLLbBxqgCGFsU0Ve%2FDSC03857.png?alt=media\&token=6f802d68-5d57-4ecf-86f0-599524017d79)

{% hint style="success" %}
**Tips:** it's recommended to stack the board up to the Z0 height of DexArm so that we can get the biggest working area.&#x20;
{% endhint %}

**Step 2:** Enter Advance mode

{% hint style="success" %}
:man\_mage:**Tips:** The Advance mode is designed for drawing and laser engraving with sliding rail. It will cancel the workspace limitation of Drawing and Laser. It will also change X-axis movements to E-axis movements.&#x20;
{% endhint %}

Go to **Setting -> Config -> Advance** and toggle the switch.&#x20;

![](https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo2AG1BWe8-p9PpCXp%2Fimage.png?alt=media\&token=8398734d-491e-44c0-9c11-f114cd8dd995)

**Step 3:** Set Work Origin.

Click **Z-** to move DexArm until the nip touches the paper.&#x20;

<div align="left"><img src="https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo1qyS126TtooTlzUC%2Fimage.png?alt=media&#x26;token=cd7ee188-6c7a-4260-8999-11ca4fbc9a7c" alt=""></div>

Open Termianl and send **G92 X0 Y0 Z0 E0** to set work origin.

![](https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo1NoOLiIBox5onbfe%2Fimage.png?alt=media\&token=b4581574-d121-4bdf-83c3-e03ae8bcc278)

{% hint style="success" %}
:man\_mage: **Tips:** You can add a custom button to set the Sliding Drawing origin if you drawing with the sliding rail often.
{% endhint %}

<div align="left"><img src="https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MboY9j0HRBbrMIiwd_4%2F-MboZRARb-0WhXQbXskC%2Fimage.png?alt=media&#x26;token=d8ff60ac-4a44-462c-9c49-79ad3c4254fe" alt=""></div>

<div align="left"><img src="https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo3Ntuc-uS01U8YcQP%2Fimage.png?alt=media&#x26;token=46f84e0b-3975-4052-902d-3267cfa31176" alt=""></div>

**Step 4:** Import it to Rotrics Studio's drawing panel.&#x20;

![](https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo45Wmah_ToUWqUFy3%2Fimage.png?alt=media\&token=aa5fa667-4e12-494b-a0d7-a9b968886e2b)

**Step 5:** Change the working parameters👇

{% hint style="warning" %}
:brain:**Note:** Do NOT set the SVG width over the Sliding Rail's 1000mm working rage.&#x20;

Make sure the origin of the picture is in X0 Y0.
{% endhint %}

* Width: 800mm
* Move Y: 0
* Move X: 0
* Work Speed: 4000
* Work Acceleration: 200  (Set it in Terminal by sending **M204 S200**)

**Step 6:** Click Generate G-code and Start Drawing.&#x20;

<div align="left"><img src="https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo4OakwWTwVB4mCK2f%2Fimage.png?alt=media&#x26;token=e26f11ef-bcd4-4876-ba90-4796138acdac" alt=""></div>

### 2.3 Laser Engraving with Sliding Rail.

{% hint style="danger" %}
❗ **Warning:** This is an experimental feature! Make sure you are waring Safety Goggles thorough the whole process.&#x20;
{% endhint %}

**Step 1**: Set up laser material and sliding rail.&#x20;

Place a long material below DexArm and focus the laser module.  Move DeArm to the center of the material.

![](https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MITMcjg2DknGXVPel_-%2F-MITPOpFqc_hrkgBbQ9p%2FDSC03858.png?alt=media\&token=8bcb661b-086b-43a6-82da-79d8ec0ef00a)

**Step 2:** Enter Advance mode

{% hint style="success" %}
:man\_mage:**Tips:** The Advance mode is designed for drawing and laser engraving with sliding rail. It will cancel the workspace limitation of Drawing and Laser. It will also change X-axis movements to E-axis movements.&#x20;
{% endhint %}

Go to **Setting -> Config -> Advance** and toggle the switch.&#x20;

![](https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo2AG1BWe8-p9PpCXp%2Fimage.png?alt=media\&token=8398734d-491e-44c0-9c11-f114cd8dd995)

**Step 3:** Set Work Origin.

Click **Z-** to move DexArm until the nip touches the paper.&#x20;

<div align="left"><img src="https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo1qyS126TtooTlzUC%2Fimage.png?alt=media&#x26;token=cd7ee188-6c7a-4260-8999-11ca4fbc9a7c" alt=""></div>

Open Termianl and send **G92 X0 Y0 Z0 E0** to set work origin.

![](https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo1NoOLiIBox5onbfe%2Fimage.png?alt=media\&token=b4581574-d121-4bdf-83c3-e03ae8bcc278)

{% hint style="success" %}
:man\_mage: **Tips:** You can add a custom button to set the Sliding Drawing origin if you drawing with the sliding rail often.
{% endhint %}

<div align="left"><img src="https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MboY9j0HRBbrMIiwd_4%2F-MboZRARb-0WhXQbXskC%2Fimage.png?alt=media&#x26;token=d8ff60ac-4a44-462c-9c49-79ad3c4254fe" alt=""></div>

<div align="left"><img src="https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo3Ntuc-uS01U8YcQP%2Fimage.png?alt=media&#x26;token=46f84e0b-3975-4052-902d-3267cfa31176" alt=""></div>

**Step 4:** Import the SVG file above into Rotrics Studio's laser panel.&#x20;

![](https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MboY9j0HRBbrMIiwd_4%2F-Mbo_ELd2HIRxwtATlJx%2Fimage.png?alt=media\&token=9c01e601-0598-402a-bf37-f47ba3c211b2)

**Step 5:** Set the Transformation parameters as illustrate below and set your common working parameter.&#x20;

* Width: 800mm
* Move X: 0
* Move Y: 0

<div align="left"><img src="https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MboY9j0HRBbrMIiwd_4%2F-Mbo_ZKvQsPofS1Rx3Da%2Fimage.png?alt=media&#x26;token=cb50dbd9-e15b-493f-8956-6dafac5831ec" alt=""></div>

**Step 6:** Click Generate G-code and Start Drawing.&#x20;

<div align="left"><img src="https://2132465959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPFIBncU5l4J8tl5Yh%2F-MbnrUAylQ9vs2hB4ddC%2F-Mbo4OakwWTwVB4mCK2f%2Fimage.png?alt=media&#x26;token=e26f11ef-bcd4-4876-ba90-4796138acdac" alt=""></div>

## Integrate Sliding Rail Kit into your project.

Just like controlling DexArm, we use G-code commands to control the sliding rail's movement as well.

After setting up the sliding rail kit,  send the G1 Exx Fxx command via serial and you can control the movements.&#x20;

```
;G1 Exx Fxx - move sliding rail xx mm at speed xx mm/min 
G1 E100 F2000; move sliding rail forward 100mm at speed 2000 mm/min 
```

{% hint style="success" %}
:man\_mage: **The recommended speed range is 2000 - 5000 mm/min**
{% endhint %}

Learn more about DexArm's API here👇

{% content-ref url="../gcode/api-and-sdk" %}
[api-and-sdk](https://manual.rotrics.com/gcode/api-and-sdk)
{% endcontent-ref %}
