|
- <?xml version="1.0" encoding="UTF-8"?>
- <svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1000" viewBox="0 0 1600 1000" role="img" aria-labelledby="title desc">
- <title id="title">PLSR系统结构图</title>
- <desc id="desc">展示PLSR调用访问、参数提交、四轴运动控制、OS控制面、硬实时中断面、数据服务以及STM32F407板级输出之间的关系。</desc>
-
- <defs>
- <linearGradient id="background" x1="0" y1="0" x2="0" y2="1">
- <stop offset="0" stop-color="#F7FAFF"/>
- <stop offset="1" stop-color="#EEF3FA"/>
- </linearGradient>
- <linearGradient id="coreGradient" x1="0" y1="0" x2="1" y2="1">
- <stop offset="0" stop-color="#E8F2FF"/>
- <stop offset="1" stop-color="#DCEBFF"/>
- </linearGradient>
- <filter id="shadow" x="-10%" y="-10%" width="120%" height="130%">
- <feDropShadow dx="0" dy="5" stdDeviation="7" flood-color="#19385F" flood-opacity="0.14"/>
- </filter>
- <marker id="arrowBlue" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto" markerUnits="strokeWidth">
- <path d="M0,0 L12,6 L0,12 z" fill="#2F6FB2"/>
- </marker>
- <marker id="arrowOrange" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto" markerUnits="strokeWidth">
- <path d="M0,0 L12,6 L0,12 z" fill="#D46B20"/>
- </marker>
- <marker id="arrowGreen" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto" markerUnits="strokeWidth">
- <path d="M0,0 L12,6 L0,12 z" fill="#34815C"/>
- </marker>
- <style>
- .title { font: 700 34px "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; fill: #17375E; }
- .subtitle { font: 400 16px "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; fill: #5B6F86; }
- .layer-title { font: 700 22px "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; fill: #17375E; }
- .box-title { font: 700 18px "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; fill: #17375E; }
- .box-text { font: 400 14px "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; fill: #435971; }
- .small { font: 400 13px "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; fill: #546A80; }
- .chip { font: 600 15px "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; fill: #285E98; }
- .white-title { font: 700 19px "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; fill: white; }
- .white-text { font: 400 14px "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; fill: #F7FBFF; }
- .line-blue { fill: none; stroke: #2F6FB2; stroke-width: 3; marker-end: url(#arrowBlue); }
- .line-orange { fill: none; stroke: #D46B20; stroke-width: 3; marker-end: url(#arrowOrange); }
- .line-green { fill: none; stroke: #34815C; stroke-width: 2.5; marker-end: url(#arrowGreen); }
- .dash { stroke-dasharray: 8 7; }
- </style>
- </defs>
-
- <rect width="1600" height="1000" fill="url(#background)"/>
-
- <text x="800" y="52" text-anchor="middle" class="title">PLSR 系统结构图</text>
- <text x="800" y="79" text-anchor="middle" class="subtitle">XDM-60T4-E · STM32F407IG · uC/OS-II · 四轴独立运动控制</text>
-
- <!-- 调用与访问层 -->
- <g filter="url(#shadow)">
- <rect x="120" y="105" width="1360" height="100" rx="16" fill="#FFFFFF" stroke="#AFC7E3" stroke-width="2"/>
- </g>
- <text x="155" y="139" class="layer-title">调用与访问层</text>
- <rect x="460" y="126" width="280" height="53" rx="26" fill="#EAF3FD" stroke="#9CBFE4"/>
- <text x="600" y="159" text-anchor="middle" class="chip">PLSR S0 S1 S2 D</text>
- <rect x="770" y="126" width="250" height="53" rx="26" fill="#EAF3FD" stroke="#9CBFE4"/>
- <text x="895" y="159" text-anchor="middle" class="chip">Modbus RTU</text>
- <rect x="1050" y="126" width="270" height="53" rx="26" fill="#EAF3FD" stroke="#9CBFE4"/>
- <text x="1185" y="159" text-anchor="middle" class="chip">内部测试接口</text>
-
- <!-- 命令适配层 -->
- <path d="M800 205 L800 230" class="line-blue"/>
- <g filter="url(#shadow)">
- <rect x="250" y="235" width="1100" height="92" rx="16" fill="#FFFFFF" stroke="#78A9D8" stroke-width="2"/>
- </g>
- <text x="800" y="270" text-anchor="middle" class="layer-title">命令与软元件适配层</text>
- <text x="800" y="299" text-anchor="middle" class="box-text">启动上升沿 · 命令序号防重 · 影子参数提交 · 一致状态快照 · 固定软元件访问</text>
-
- <!-- PLSR核心层 -->
- <path d="M800 327 L800 352" class="line-blue"/>
- <g filter="url(#shadow)">
- <rect x="80" y="357" width="1440" height="300" rx="20" fill="url(#coreGradient)" stroke="#5F97CE" stroke-width="2.5"/>
- </g>
- <text x="120" y="393" class="layer-title">PLSR 运动控制层</text>
- <text x="1480" y="393" text-anchor="end" class="small">四个独立 PlsrAxis 对象 · 无插补</text>
-
- <g>
- <rect x="120" y="420" width="245" height="108" rx="13" fill="#FFFFFF" stroke="#8DB5DD" stroke-width="1.5"/>
- <text x="242" y="453" text-anchor="middle" class="box-title">参数提交与快照</text>
- <text x="242" y="480" text-anchor="middle" class="box-text">S0 / S1 / S2 / D 校验</text>
- <text x="242" y="503" text-anchor="middle" class="box-text">资源申请 · 不可变快照</text>
-
- <rect x="398" y="420" width="245" height="108" rx="13" fill="#FFFFFF" stroke="#8DB5DD" stroke-width="1.5"/>
- <text x="520" y="453" text-anchor="middle" class="box-title">轴状态机与命令</text>
- <text x="520" y="480" text-anchor="middle" class="box-text">START / STOP / PAUSE</text>
- <text x="520" y="503" text-anchor="middle" class="box-text">BUSY · DONE · ERROR</text>
-
- <rect x="676" y="420" width="245" height="108" rx="13" fill="#FFFFFF" stroke="#8DB5DD" stroke-width="1.5"/>
- <text x="798" y="453" text-anchor="middle" class="box-title">路径解释与段调度</text>
- <text x="798" y="480" text-anchor="middle" class="box-text">1~100段 · Wait · ACT</text>
- <text x="798" y="503" text-anchor="middle" class="box-text">EXT · 动态跳转 · 段事件</text>
-
- <rect x="954" y="420" width="245" height="108" rx="13" fill="#FFFFFF" stroke="#8DB5DD" stroke-width="1.5"/>
- <text x="1076" y="453" text-anchor="middle" class="box-title">速度规划</text>
- <text x="1076" y="480" text-anchor="middle" class="box-text">直线 · S形 · 正弦</text>
- <text x="1076" y="503" text-anchor="middle" class="box-text">短距离 · 动态调频</text>
-
- <rect x="1232" y="420" width="245" height="108" rx="13" fill="#FFFFFF" stroke="#8DB5DD" stroke-width="1.5"/>
- <text x="1354" y="453" text-anchor="middle" class="box-title">位置与累计</text>
- <text x="1354" y="480" text-anchor="middle" class="box-text">64位位置 · 当量 · 限位</text>
- <text x="1354" y="503" text-anchor="middle" class="box-text">齿隙补偿 · 检查点</text>
- </g>
-
- <path d="M365 474 L390 474" class="line-blue"/>
- <path d="M643 474 L668 474" class="line-blue"/>
- <path d="M921 474 L946 474" class="line-blue"/>
- <path d="M1199 474 L1224 474" class="line-blue"/>
-
- <!-- 执行域 -->
- <rect x="205" y="561" width="510" height="70" rx="13" fill="#2F6FB2"/>
- <text x="460" y="590" text-anchor="middle" class="white-title">OS 控制面 · PlsrTask</text>
- <text x="460" y="615" text-anchor="middle" class="white-text">命令、段切换、等待、状态发布、保存请求</text>
-
- <rect x="885" y="561" width="510" height="70" rx="13" fill="#D46B20"/>
- <text x="1140" y="590" text-anchor="middle" class="white-title">硬实时面 · TIM / EXTI ISR</text>
- <text x="1140" y="615" text-anchor="middle" class="white-text">0.1/1 ms刷新、硬件/软件计数、尾脉冲、限位与EXT</text>
-
- <path d="M798 528 L798 545 L460 545 L460 557" class="line-blue"/>
- <path d="M798 528 L798 545 L1140 545 L1140 557" class="line-orange"/>
-
- <!-- 数据与服务 -->
- <g filter="url(#shadow)">
- <rect x="80" y="700" width="1440" height="112" rx="18" fill="#F0FAF4" stroke="#79B696" stroke-width="2"/>
- </g>
- <text x="115" y="735" class="layer-title">数据与服务层</text>
-
- <rect x="345" y="721" width="330" height="67" rx="12" fill="#FFFFFF" stroke="#8BC3A5"/>
- <text x="510" y="748" text-anchor="middle" class="box-title">固定软元件与动态数据</text>
- <text x="510" y="773" text-anchor="middle" class="box-text">HSD / SFD / SM / SD / I · S0 / S1</text>
-
- <rect x="704" y="721" width="310" height="67" rx="12" fill="#FFFFFF" stroke="#8BC3A5"/>
- <text x="859" y="748" text-anchor="middle" class="box-title">持久化</text>
- <text x="859" y="773" text-anchor="middle" class="box-text">Flash A/B槽 · Backup SRAM</text>
-
- <rect x="1043" y="721" width="330" height="67" rx="12" fill="#FFFFFF" stroke="#8BC3A5"/>
- <text x="1208" y="748" text-anchor="middle" class="box-title">诊断与自测</text>
- <text x="1208" y="773" text-anchor="middle" class="box-text">错误映射 · 分频记录 · ISR性能</text>
-
- <path d="M460 631 L460 690" class="line-green dash"/>
- <path d="M1140 631 L1140 690" class="line-green dash"/>
-
- <!-- 板级与输出 -->
- <path d="M1140 631 L1140 674 L1450 674 L1450 826 L1040 826 L1040 837" class="line-orange"/>
- <g filter="url(#shadow)">
- <rect x="100" y="842" width="1000" height="105" rx="17" fill="#273B52"/>
- </g>
- <text x="135" y="876" class="white-title">STM32F407 板级输出层</text>
- <text x="135" y="906" class="white-text">TIM6控制 · TIM9/TIM12计数 · TIM10/13/11/14 PWM · GPIO · EXTI</text>
- <text x="135" y="930" class="white-text">硬件PWM维持边沿,ISR只计数、提交周期参数和完成安全尾停</text>
-
- <path d="M1100 894 L1160 894" class="line-orange"/>
- <rect x="1170" y="842" width="250" height="105" rx="17" fill="#FFFFFF" stroke="#D69A6E" stroke-width="2"/>
- <text x="1295" y="877" text-anchor="middle" class="box-title">物理输出</text>
- <text x="1295" y="905" text-anchor="middle" class="box-text">Q0~Q3 / DIR</text>
- <text x="1295" y="930" text-anchor="middle" class="box-text">PULSE/DIR · AB · CW/CCW</text>
-
- <path d="M1420 894 L1475 894" class="line-orange"/>
- <rect x="1485" y="852" width="95" height="85" rx="14" fill="#FFF7F0" stroke="#D69A6E" stroke-width="2"/>
- <text x="1532" y="886" text-anchor="middle" class="box-title">伺服</text>
- <text x="1532" y="912" text-anchor="middle" class="box-text">驱动器</text>
-
- <!-- 图例 -->
- <circle cx="110" cy="976" r="6" fill="#2F6FB2"/>
- <text x="125" y="981" class="small">控制与数据流</text>
- <circle cx="270" cy="976" r="6" fill="#D46B20"/>
- <text x="285" y="981" class="small">硬实时与物理输出</text>
- <circle cx="480" cy="976" r="6" fill="#34815C"/>
- <text x="495" y="981" class="small">数据服务访问</text>
- </svg>
|