Compare commits
22 Commits
b01-d0.2-h
...
b04-pcotto
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9259c29db3 | ||
|
|
ea2c9cb132 | ||
|
|
67a546ba86 | ||
|
|
fcd008df34 | ||
| f70f5eb503 | |||
|
|
7f7afb93b7 | ||
| 4f6a3953c8 | |||
|
|
6449ebeeac | ||
|
|
fe7b3308bc | ||
|
|
faae382955 | ||
|
|
5a5c613097 | ||
|
|
4ecbc6a0ba | ||
| c21a5d8371 | |||
|
|
845af905f9 | ||
|
|
71f8e672d5 | ||
|
|
1dd8210404 | ||
|
|
74e31ef86a | ||
|
|
d2c44d04f2 | ||
|
|
617ed894f7 | ||
|
|
c98584d029 | ||
|
|
ea0bb89a2d | ||
|
|
71e69c0dac |
11
.gitignore
vendored
11
.gitignore
vendored
@ -64,4 +64,13 @@
|
|||||||
.AppleDesktop
|
.AppleDesktop
|
||||||
Network Trash Folder
|
Network Trash Folder
|
||||||
Temporary Items
|
Temporary Items
|
||||||
.apdisk
|
.apdisk
|
||||||
|
|
||||||
|
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
venv/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
old/
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 86 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 MiB |
59
README.md
59
README.md
@ -1,43 +1,48 @@
|
|||||||
# 下位机
|
# 下位机
|
||||||
|
|
||||||
糖果分选机的下位机根据传送带脉冲等触发相机,接收上位机给的数据,按其要求控制阀板,用在各种分选机上。本次下位机采用的硬件是[广州致远电子股份有限公司 ](https://www.zlg.cn/)(周立功)的[EPC-9600I-L工控主板](https://www.zlg.cn/ipc/ipc/product/id/77.html)(简称EPC9600),自带各种接口,但是除了网口和DI/DO接口,其他接口统统用不到。阀板接口、触发相机的接口、编码器接口,都是连接自己做的IO扩展板,将IO扩展板插在底板DI/DO接口上,叠起来,因此称为叠板。
|
下位机按上位机指令根据传送带脉冲等触发相机,完成棉花异性纤维的分选任务。采用的硬件是[Alinx](https://www.alinx.com/)的AC7Z100C ZYNQ开发板。
|
||||||
|
|
||||||

|
本IO扩展版提供了
|
||||||
|
|
||||||
图中左到右分别为EPC9600,IO扩展板,糖果分选机整机,相机,上位机,编码器。其中,相机的触发线、编码器连接到IO扩展板,相机、上位机、EPC9600连接到以太网交换机。
|
- xxxxxx
|
||||||
|
|
||||||
IO扩展板提供了
|
接线时,12V电源连接到IO扩展板的电源接口,相机线应连接相机触发接口`TRIG1`、`TRIG2`和对应的`GND`接口,编码器线应连接在编码器输入接口`E1`和对应的`GND`接口,物体传感器应连接输入接口`E3`和对应的`GND`接口。注意底板不连接任何外部电源。
|
||||||
|
|
||||||
- 1个12V电源输入
|
开发和部署说明见[doc/develop_and_deploy.md](doc/develop_and_deploy.md)
|
||||||
- 2个相机触发,1个为冗余
|
|
||||||
- 2个编码器输入,1个为冗余
|
|
||||||
- 4个阀板接口,3个为冗余
|
|
||||||
|
|
||||||
要注意,IO扩展板上的供电接口仅仅用于IO扩展板自身的供电,EPC9600的供电需要另外提供。<br>下面是接线图:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 目录结构
|
## 目录结构
|
||||||
|
|
||||||
- doc为说明文档,包括开发和部署细节、硬件设计的描述等
|
- doc为说明文档,包括开发和部署细节、硬件设计的描述等
|
||||||
- [deploy.md](./doc/deploy.md)为开发和部署说明,首先看这个文档
|
|
||||||
- [hardware_description.md](./doc/hardware_description.md)为PCB设计说明
|
- [develop_and_deploy.md](doc/develop_and_deploy.md)为开发和部署说明,首先看这个文档
|
||||||
|
- [hardware_description.md](doc/hardware_description.md)为PL端逻辑设计说明,阐述了硬件工作的整体流程
|
||||||
|
- [pl_reference_mannual.md](doc/pl_reference_mannual.md)为PL端逻辑在AXI总线上映射的寄存器参考手册
|
||||||
|
- [sim_uppermachine_manual.md](doc/sim_uppermachine_manual.md)为模拟上位机运行的参考手册
|
||||||
|
|
||||||
- script为配置系统、安装环境、安装可执行文件、卸载可执行文件等的脚本
|
- script为配置系统、安装环境、安装可执行文件、卸载可执行文件等的脚本
|
||||||
|
|
||||||
|
关于脚本的使用,见[doc/develop_and_deploy.md](doc/develop_and_deploy.md)
|
||||||
|
|
||||||
|
- target.sh为嵌入式linux中自动启动应用程序脚本
|
||||||
|
|
||||||
|
- load\*.sh为嵌入式linux中加载驱动的脚本
|
||||||
|
- .bashrc为嵌入式linux中配置环境变量的脚本
|
||||||
|
|
||||||
- protocol为上位机和下位机通信的协议
|
- protocol为上位机和下位机通信的协议
|
||||||
|
|
||||||
- hardware下位机主板、接口板、底板等的硬件设计
|
- hardware下位机主板、接口板、底板等的硬件设计
|
||||||
- source为可执行文件的源程序
|
|
||||||
|
|
||||||
## 喷阀原理
|
- pl_platform为PL端硬件设计
|
||||||
|
- xme0724ioextend为IO叠板的原理图和PCB
|
||||||
喷嘴由两片CNC加工的金属工件拼合而成,每一片工件上有48个深度为喷嘴宽度的一半的沟槽,两片拼合形成截面为矩形的48个喷嘴,通过软管连接到喷阀的气流出口。打开相应喷阀就会在喷嘴处射出气流。喷嘴以喷出气流向下的方向安装,整体平行于传送带滚筒,在传送带末端上方。如图:
|
|
||||||
|
|
||||||
<img src="README.assets/20230208200017.jpg" alt="20230208200017" style="zoom: 50%;" />
|
|
||||||
|
|
||||||
工作时射出的气流将瑕疵糖果向下吹走,正常糖果被传送带喷出,如下视频
|
|
||||||
|
|
||||||
<video src="README.assets/144262e7fd3707720962e083d5304a7e.mp4"></video>
|
|
||||||
|
|
||||||
|
- source为AC7Z100C板子上运行的源程序和模拟上位机程序
|
||||||
|
|
||||||
|
- liunx_app为Linux上运行的应用程序,即业务逻辑
|
||||||
|
- linux_driver为Linux上的驱动,用于控制自定义的PL端硬件,其中drv_test结尾的目录为相应驱动模块的测试应用程序
|
||||||
|
- petalinux_config为petalinux工具在编译u-boot、kernel、rootfs前进行的配置
|
||||||
|
- petalinux_devicetree为本次自定义的Linux设备树文件部分,其余设备树为自动生成的
|
||||||
|
- petalinux_hwdescription为petalinux所使用的硬件描述文件,包含了vivado工程中的比特流等信息
|
||||||
|
- sim_uppermachine_manul为基于pyside6所编写的软件,用于模拟上位机发送指令,方便调试
|
||||||
|
|
||||||
## 版本
|
## 版本
|
||||||
|
|
||||||
@ -56,11 +61,11 @@ b分支编号-p生产环境项目名-t分选对象[-其他特点1[-其他特点2
|
|||||||
版本号遵循定义如下(不使用中文,小写无空格)
|
版本号遵循定义如下(不使用中文,小写无空格)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
b分支编号[-d文档版本]-hPCB设计版本[-lFPGA设计版本]-p协议版本[-s脚本版本]-aAPP代码版本[-i驱动版本][-c系统编译配置版本][-e设备树版本]
|
b分支编号-d文档版本-hPCB设计版本-lFPGA设计版本-p协议版本-s脚本版本-aAPP代码版本-i驱动版本-c系统编译配置版本-e设备树版本
|
||||||
```
|
```
|
||||||
|
|
||||||
中括号在这里表示可省略的项,中括号本身不应出现在实际命名中。分支编号和分支命名中编号一致。各部分版本应在相应目录下创建文件注明,比如`2.1`版本的PCB设计:PCB工程目录中建立`version`文本文件,内容为文本`2.1`。对于涉及整体设计的大改动版本号加`1`,其余改动版本号加`0.1`。每个分支的版本各自独立,新分支的版本从`1.0`起计算
|
分支编号和分支命名中编号一致。各部分版本应在相应目录下创建文件注明,比如`2.1`版本的PCB设计:PCB工程目录中建立`version`文本文件,内容为文本`2.1`。对于涉及整体设计的大改动版本号加`1`,其余改动版本号加`0.1`。每个分支的版本各自独立,新分支的版本从`1.0`起计算,也可从建立分支处原有版本起计算
|
||||||
|
|
||||||
## 作者
|
## 作者
|
||||||
|
|
||||||
作者觉得还是不说明作者是谁比较好,免得毕业后有提着示波器的师弟师妹来问问题
|
作者徐耀,随时欢迎师弟师妹7x24提着示波器的来问问题,联系方式:QQ:1170701029;微信:CeRnYool。
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 442 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 419 KiB |
@ -1,67 +0,0 @@
|
|||||||
# 下位机的部署步骤
|
|
||||||
|
|
||||||
按下面标题的顺序进行,不要轻易跳过步骤,除非你知道你在做什么
|
|
||||||
|
|
||||||
## 硬件连接
|
|
||||||
|
|
||||||
### 启动方式选择
|
|
||||||
|
|
||||||
EPC-9600I-L支持从NAND或者SD卡启动,通过 S7拨码开关控制,拨码开关如图全部设置为OFF,表示从NAND启动。
|
|
||||||
|
|
||||||
<img src="deploy.assets/5e6af30fa23d9.jpg" alt="5e6af30fa23d9" style="zoom:33%;" />
|
|
||||||
|
|
||||||
### IO和供电连接
|
|
||||||
|
|
||||||
完成以下步骤后,应如下图所示
|
|
||||||
|
|
||||||
1. 将IO扩展板插入J1牛角座
|
|
||||||
2. 按接线图连接相机触发线、编码器的任一相、阀板
|
|
||||||
3. 按接线图连接IO扩展板的电源
|
|
||||||
4. 按接线图连接EPC9600的电源
|
|
||||||
5. 按接线图连接网线到交换机
|
|
||||||
6. 连接调试用电脑到交换机
|
|
||||||
|
|
||||||
<img src="deploy.assets/20230208183606.jpg" alt="20230208183606" style="zoom: 33%;" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
启动交换机、EPC9600、IO扩展板的电源
|
|
||||||
|
|
||||||
## 软件配置
|
|
||||||
|
|
||||||
### 登录和配置
|
|
||||||
|
|
||||||
断开并禁用电脑连接的其他网络和网络适配器(包括无线网),将电脑连接EPC9600的网口设置到192.168.1.0/24网络中
|
|
||||||
|
|
||||||
SSH登录账号`root`,密码`root`<br>出厂默认IP为`192.168.1.136`
|
|
||||||
|
|
||||||
可以使用任何SSH软件进行登录,推荐`Xshell`,连接后执行下面的命令设置新的时间和IP:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
[root@epc-9600 ~]# date 2023.02.08-15:34:00
|
|
||||||
[root@epc-9600 ~]# hwclock -w
|
|
||||||
[root@epc-9600 ~]# eeprom net set ip 192.168.2.9
|
|
||||||
```
|
|
||||||
|
|
||||||
时间不要照抄上面的命令,设置为当前时间即可,IP必须为`192.168.2.9`,执行下面命令重启
|
|
||||||
|
|
||||||
```shell
|
|
||||||
[root@epc-9600 ~]# reboot
|
|
||||||
```
|
|
||||||
|
|
||||||
### 安装下位机软件
|
|
||||||
|
|
||||||
因为设置了新的IP,所以将电脑连接EPC9600的网口设置为`192.168.2.11/24`,重新SSH连接IP为`192.168.2.9`的EPC9600。同时启动SFTP软件,推荐`Xftp`,将[script/S90target](../script/S90target)传输到EPC9600的`/tmp`中,运行下面命令配置下位机软件自启动:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
[root@epc-9600 ~]# wr mv /tmp/S90target /etc/init.d/
|
|
||||||
[root@epc-9600 ~]# wr chmod 755 /etc/init.d/S90target
|
|
||||||
```
|
|
||||||
|
|
||||||
用相同的放将本仓库release中`app.zip`解压出的下位机软件`target`传输到EPC9600的`/tmp`中,运行下面命令安装下位机软件:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
[root@epc-9600 ~]# wr mv /tmp/target /root
|
|
||||||
[root@epc-9600 ~]# wr chmod 755 /root/target
|
|
||||||
[root@epc-9600 ~]# sync
|
|
||||||
```
|
|
||||||
@ -1 +0,0 @@
|
|||||||
0.2
|
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/PCB1111.~(1).PcbDoc.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/PCB1111.~(1).PcbDoc.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/PCB1111.~(2).PcbDoc.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/PCB1111.~(2).PcbDoc.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/PCBtest.~(1).PcbDoc.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/PCBtest.~(1).PcbDoc.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/PCBtest.~(2).PcbDoc.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/PCBtest.~(2).PcbDoc.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/PCBtest.~(3).PcbDoc.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/PCBtest.~(3).PcbDoc.Zip
Normal file
Binary file not shown.
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/dingkun.~(1).PcbDoc.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/dingkun.~(1).PcbDoc.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(1).PcbLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(1).PcbLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(1).SchLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(1).SchLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(10).SchLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(10).SchLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(11).SchLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(11).SchLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(12).SchLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(12).SchLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(13).SchLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(13).SchLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(14).SchLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(14).SchLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(15).SchLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(15).SchLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(16).SchLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(16).SchLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(3).PcbLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(3).PcbLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(4).PcbLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(4).PcbLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(5).PcbLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(5).PcbLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(6).PcbLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(6).PcbLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(8).SchLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(8).SchLib.Zip
Normal file
Binary file not shown.
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(9).SchLib.Zip
Normal file
BIN
hardware/ac7z100cioextend/History/lib/zynq.~(9).SchLib.Zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user