Files
ElecScalesMeasur/README.md

32 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 密胺计量
[TOC]
![img.png](rk3506扩展IO引脚图.png)
一、接线
1、在图rk3506扩展IO引脚图.png
驱动器rk引脚9接脉冲+rk引脚19接脉冲-引脚9对应代码pin8
振动平台rk引脚7接振动平台12rk引脚11接振动平台10rk引脚11对应代码pin9
步进电机方向控制rk引脚17接驱动器方向+rk引脚17对应代码pin12驱动器方向-接rk引脚19。
二、使用方法:
1、开启服务python main.py
2、发送称量重量、获取重量、置零 python send_target.py
三、发送端配置 send_target.py
cmd_set_target = {
# 称量
"command": "set_target",
"payload": {
"target_weight": 200, # 称量的目标重量
"algorithm": "pid",
"direction_control": False # 控制步进电机的方向 True:给驱动器方向+ 输入高电平
}
}
数据返回:
{"measuring": false, "error": null, "current_weight": 239, "target_weight": 0, "": "pid", "set_tare": false,
"set_tare_num_time": 0, "get_weight": false, "set_vibrate":true, "set_vibrate_time": 30}