# Step Slide Control **Repository Path**: flei/step-slide-control ## Basic Information - **Project Name**: Step Slide Control - **Description**: 步进滑台控制程序 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-10-06 - **Last Updated**: 2021-10-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 硬件组成 ![原理框图](./Pic/原理框图.png) - 步进滑台 - 步进驱动板 - STM32F103最小系统板 - USB转TTL模块 # 连线 - 控制信号 |驱动板|STM32| |---|---| |P-|A8| |+12V|3.3| |D-|B15| - 限位开关 |滑台|STM32| |---|---| |电机侧限位开关-上|G| |电机侧限位开关-中|B13| |另一侧限位开关-上|G| |另一侧限位开关-中|B14| - 串口通信和供电 |串口线|STM32| |---|---| |红色|5V| |黑色|G| |白色|A9| |绿色|A10| # 串口指令 **串口参数**: - 波特率:115200 - 停止位:1 - 数据位:8 - 奇偶校验:无 **支持指令**: - help - reset - read - sx - dx - px --- ## 1. help - 帮助指令 ### 说明 显示帮助信息 ### 示例 - 输入 ``` help ``` - 输出 ``` Repository: https://gitee.com/soliber/step-slide-control Developer: Soliber E-mail: soliber@aliyun.com Version: V1.0 Date: 2021.04.21 Supported instructions: Input [help]: help information Input [reset]: set current position as origin Input [read]: read speed(um/s) and position(um) information Input [sx]: set expected speed (um/s) and show real speed (um/s) Input [dx]: incremental move (um) and show real position (um) Input [px]: absolute movement (um) and show real position (um) tips: the above 'x' should be any interger or floating point number in a suitable range ``` --- ## 2. reset - 原点复位指令 ### 说明 指定当前位置为坐标原点 ### 示例 - 输入 ``` reset ``` - 输出 ``` Origin set ``` --- ## 3. read - 读取参数指令 ### 说明 读取速度和坐标参数 ### 示例 - 输入 ``` read ``` - 输出 ``` Speed:93750 um/s Position:9.993 mm (1066 steps to origin) ``` --- ## 4. sx - 速度设置指令 ### 说明 设置滑台的移动速度 指令中的 ```x``` 为速度参数,单位为 ```um/s``` 返回实际设置的速度 ### 示例 - 输入 ``` s1000 ``` - 输出 ``` Speed set to 1008 um/s ``` --- ## 5. dx - 增量位移指令 ### 说明 基于当前位置,移动一段距离 指令中的 ```x``` 为位移参数,单位为 ```um``` 返回移动后的实际位置及本次移动距离 ### 示例 - 输入 ``` d3.0 ``` - 输出 ``` Position: 3.000 mm (+3.000 mm) ``` --- ## 6. px - 坐标位移指令 ### 说明 移动到以坐标原点为参考的指定位置 指令中的 ```x``` 为位置参数,单位为 ```um``` 返回移动后的实际位置及本次移动距离 ### 示例 - 输入 ``` p10.0 ``` - 输出 ``` Position: 9.993 mm (+6.993 mm) ``` --- ## 注意 1. 滑台的总行程为```50mm```,分辨率```20 PPR```,螺距 ```3 mm```;驱动器细分参数 ```16```,等效步长 ```9.375 um/pulse``` 2. 默认上电时的位置为坐标原点,靠近电机为**正方向**,远离电机为**负方向** 3. 默认上电后速度为 ```10416 um/s``` ,速度范围 ```3~93750 um/s``` 可调 4. 受分辨率影响,返回的**实际位置**与输入的**预期位置**可能会有细微偏差 5. 若连接了限位开关,则当滑台到达极限位置处会自动停止