⚡ ESim 电工制图 AI 电路生成规范更新版

严谨数据契约 · 布局优先接线 · 优化器接管路由 📐 v1.1

📑 目录

严谨数据契约 · 布局优先接线 · 优化器接管路由 📐 v1.1

📋 总览 · AI 必须遵守的核心契约

本规范是生成标准 .esimdrawing 文件的唯一技术参照。v1.1 版本确立了 "AI 先生成控件布局 + 端子直连导线,ESim电工制图优化器负责正交避障路由" 的协同模式。

✅ 强制性要求

🚫 禁止行为

🧠 AI 生成逻辑路径

  1. 确定图纸规格与标题
  2. 布局元件(电源左/上 → 开关保护中 → 负载右/下),预留端子间距(≥80px)
  3. 从本规范控件清单复制完整 ComponentData 定义,更新 GUID 和坐标
  4. 计算每个端子的绝对位置(考虑旋转因素)
  5. 为每对需连接的端子生成直线导线:Start=端子A绝对位置,End=端子B绝对位置,Points 留空
  6. 为导线建立精确的 StartTerminal / EndTerminal 引用
  7. 校验全局设置,序列化输出 XML

🧠 AI 生成方法论:布局优先,接线从简

核心理念

AI 生成电路应分为两个独立阶段,切勿混为一谈:

阶段 任务 AI 关注点 AI 不关注
第1步:控件布局 在画布上放置元件,确定位置、尺寸、旋转角度 元件选型、行列布局、间距预留 导线走向
第2步:端子接线 建立端子之间的连接关系 哪两个端子相连、导线 NetType 导线拐点、路径轨迹

为什么不需要关心导线轨迹?

导线从端子A到端子B的具体走线路径(拐几个弯、从哪里绕行)由 ESim电工制图的 【导线一键优化】功能 自动完成。该优化器基于通道式正交路由算法(WireRouter),会根据控件的碰撞区域和预留空间自动计算最优正交路径。

AI 只需做到

  1. 正确布局控件,预留足够间距(≥80px 行列间距)
  2. 正确生成直线导线,精确定义起点和终点的端子引用
  3. Points 属性留空——优化器会自动填充正交拐点

⚠️ 端子名称精确匹配的重要性

电路加载时,系统通过 TerminalName 匹配导线引用与控件端子。规则如下:

寻找 t => t.Label == td.Name // td.Name 来自 XML,t.Label 来自控件构造函数

这意味着:导线 XML 中的 L1 必须与控件源码中硬编码的 terminal.Label = "L1" 完全一致(包括大小写)。如果端子名称不匹配,导线将无法找到目标端子,电路加载失败。

因此,本规范中每个控件的端子明细表是最关键的数据。请务必使用本规范列出的端子名称,不得自行编造

📐 坐标系与单位

坐标原点 (0, 0):位于画布左上角。

单位:像素,所有坐标值均为整数。

X 轴:向右递增。

Y 轴:向下递增。

端子 Position:相对于元件左上角(WorldLocation)的偏移量。

端子绝对位置 = WorldLocation + 旋转后Position

💡 AI 建议:所有坐标对齐 5px 网格(即坐标为 5 的倍数),元件间距 ≥ 80px,为优化器留出充足的正交布线通道。

🧱 根数据模型 (CircuitData)

XML 根元素为 ,其内部节点顺序建议如下:

<?xml version="1.0"?> <CircuitData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Version>2.0</Version> <CreatedDate>2024-01-01T00:00:00</CreatedDate> <ModifiedDate>2024-01-01T00:00:00</ModifiedDate> <Components> ... </Components> <Wires> ... </Wires> <WireSettings> ... </WireSettings> <DrawableElements /> <DrawingLayout> ... </DrawingLayout> </CircuitData>
节点 C# 类型 说明
Version string 固定 "2.0"
CreatedDate DateTime 创建时间(ISO 8601)
ModifiedDate DateTime 修改时间
Components List\ 所有电气元件(不含万用表/表笔)
Wires List\ 导线列表,AI 只需生成直线连接
WireSettings WireSettingsData 全局导线样式(正交、颜色等)
DrawableElements List\ 文字/图片标注(可为空)
DrawingLayout DrawingLayoutData 图纸尺寸、标题、分区、边框

🔌 元件定义 (ComponentData)

每个元件对应一个 节点。AI 必须从本规范控件清单获取完整的 TypeName、Size 以及端子集合定义。

📌 核心属性一览

属性 类型 说明 / 约束
ComponentGuid Guid 全局唯一标识,禁止 Guid.Empty
TypeName string 完整类型名,如 Controls.SVG.SinglePhasePower
Location Point 画布绝对坐标(控件左上角)
Size Size 控件宽高,必须与库定义一致
ComponentTitle string 内部标题,如 "CircuitBreaker1P"
ControlName string 用户可见名称,如 "断路器QF1"
ControlLabel string 元件标签,如 "QF1"
ShowComponentName bool 是否显示控件名称(仅非SVG有效)
ElectricalType enum ACDC(序列化为字符串)
ComponentType string 分类标识:PowerSupply / AirSwitch / LED / Contactor 等
IsSVG bool? 原理图必须 true;true=电气符号,false=实物图片
IsVoltage380V bool 线圈是否 380V(默认 false=220V)
RotationAngle int 旋转角度:0, 90, 180, 270(仅 SVG 控件有效)
Terminals List\ 端子列表,必须与本规范列出的端子明细完全一致

⚠️ IsSVG 精确语义与严格绑定

IsSVG 决定控件外观模式:true 渲染为标准电气符号(原理图),false 为实物图片(安装图)。

🔴 强绑定规则:TypeName 必须与 IsSVG 严格匹配!

🔄 旋转与端子位置计算(⚠️ 关键难点)

SVG 控件支持 RotationAngle = 0/90/180/270。旋转后端子的绝对位置会按旋转矩阵重新计算,导线的 Start/End 必须使用旋转后的绝对位置

💡 安全策略:若非绝对必要,AI 生成时保持所有控件 RotationAngle=0,避免复杂的旋转计算导致坐标不匹配。

如果必须旋转,请使用以下公式计算端子绝对位置(以控件中心为旋转原点):

// 1. 计算控件中心 centerX = WorldLocation.X + Size.Width / 2 centerY = WorldLocation.Y + Size.Height / 2 // 2. 计算端子相对控件中心的偏移 dx = Position.X - Size.Width / 2 dy = Position.Y - Size.Height / 2 // 3. 根据旋转角度计算旋转后偏移 (顺时针) // 0°: rotatedX = dx, rotatedY = dy // 90°: rotatedX = dy, rotatedY = -dx // 180°: rotatedX = -dx, rotatedY = -dy // 270°: rotatedX = -dy, rotatedY = dx // 4. 计算旋转后的绝对位置 absoluteX = centerX + rotatedX absoluteY = centerY + rotatedY

🔘 端子定义 (TerminalData)

端子位置 Position相对于元件左上角的坐标。端子的绝对位置计算公式:

绝对位置 = WorldLocation + 旋转后Position

例如:元件位于 (200, 120) 未旋转,端子相对位置 (39, 15),则绝对位置 = (239, 135)

<TerminalData> <Name>L</Name> <Position><X>39</X><Y>15</Y></Position> <Size>15</Size> <Color>Orange</Color> <IsConnected>true</IsConnected> <Direction>3</Direction> <ContactType>1</ContactType> <GroupId>Power</GroupId> <GroupType>5</GroupType> </TerminalData>

📐 Direction 端子方向枚举(⚠️ 致命重要性)

Direction 不仅控制 SVG 端子短线的绘制方向,更直接决定了 ESim电工制图优化器的出线点计算!

如果 Direction 设置错误,优化器计算的出线点会指向控件内部,导致布线失败或严重穿模。

枚举名 短线绘制方向 优化器出线点位置 AI 判定规则 (RotationAngle=0时)
0 Up 从端子位置向下画(向内 ↓) 控件上方 35px 绝对位置.Y < WorldLocation.Y + Size.Height/2
1 Down 从端子位置向上画(向内 ↑) 控件下方 35px 绝对位置.Y >= WorldLocation.Y + Size.Height/2
2 Left 从端子位置向右画(向内 →) 控件左方 35px 绝对位置.X < WorldLocation.X + Size.Width/2
3 Right 从端子位置向左画(向内 ←) 控件右方 35px 绝对位置.X >= WorldLocation.X + Size.Width/2

⚠️ Direction 值为 -1 时表示未定义,加载时不会覆盖控件默认值。AI 生成 SVG 控件时必须明确赋值 ≥ 0

⚡ ContactType 触点类型枚举

枚举名 含义 典型应用
0 Coil 线圈端 接触器 A1/A2
1 PowerL 火线端 电源 L
2 PowerN 零线端 电源 N
3 PowerPE 接地端 电源 PE
4 DCPowerpositive 直流正极 直流电源 +
5 DCPowernegative 直流负极 直流电源 -
6 NO 常开触点 按钮、接触器 NO
7 NC 常闭触点 急停按钮、接触器 NC
8 COM 公共端 继电器 COM
9 Undefined 未定义 未分类端子

📋 GroupType 端子组类型枚举

枚举名 含义 说明
0 SPST 单组触点 单刀单掷(如简单开关)
1 SPDT 单刀双掷 转换触点(如继电器 COM+NO+NC)
2 DPDT 双组触点 双触点组
3 Main 主触点 接触器主回路 L1-T1 等
4 Auxiliary 辅助触点 接触器辅助触点
5 Undefined 未定义 未分类组(如电源端子组)

🔴 重要:GroupType 枚举中不存在 Power 值!5=Undefined。电源端子的 GroupId 可设为 "Power",但 GroupType 应设为 5。

🎨 颜色序列化规则

端子 Color 字段通过 ColorTranslator.ToHtml 序列化,支持两种格式:

🔗 导线定义 (WireData)

🌟 核心策略:直线连接 + 优化器接管

v1.1 版本彻底废除了 AI 计算拐点的要求。AI 只需生成包含精确起止坐标的直线导线,ESim电工制图的【导线一键优化】功能会自动将其转化为完美的正交避障路径。

✅ 必须遵守:直线直连法

<WireData> <Id>唯一GUID</Id> <Start><X>239</X><Y>135</Y></Start> <!-- 必须精确等于起始端子绝对位置 --> <End><X>430</X><Y>120</Y></End> <!-- 必须精确等于终止端子绝对位置 --> <Points /> <!-- ✅ 留空!AI 不计算拐点 --> <Color>Black</Color> <Width>2</Width> <NetType>0</NetType> <ConnectionPoints /> <!-- ✅ 留空!AI 不生成交点 --> <StartTerminal> <ComponentGuid>电源GUID</ComponentGuid> <TerminalName>L</TerminalName> </StartTerminal> <EndTerminal> <ComponentGuid>断路器GUID</ComponentGuid> <TerminalName>L1</TerminalName> </EndTerminal> </WireData>

🚫 禁止使用的旧策略

禁止项 原因
❌ 计算 L/Z/U 形拐点 AI 拐点极易穿模,且会与优化器的通道式正交路由冲突导致布线混乱
❌ 使用 ConnectionPoints 优化器会消除交点,AI 生成的交点拓扑会被破坏
❌ 使用 StartWireTerminal / EndWireTerminal 虚拟端子是用户手动连线的中间产物,AI 应直接端子对端子

📌 WireData 核心属性

属性 类型 说明 / 约束
Id Guid 导线唯一标识。禁止 Guid.Empty
Start Point 必须等于 StartTerminal 所指端子的绝对位置
End Point 必须等于 EndTerminal 所指端子的绝对位置
Points List\ AI 生成时必须留空
Color Color 导线颜色,默认 Black
Width int 线宽,默认 2
Label string 线号标注,可为空
IsSelected bool 是否选中,固定 false
NetType int 网络类型枚举
ConnectionPoints List AI 生成时必须留空
StartTerminal ComponentTerminalReference 起始端子引用
EndTerminal ComponentTerminalReference 终止端子引用
StartWireTerminal WireTerminalReference AI 禁止使用
EndWireTerminal WireTerminalReference AI 禁止使用

🔴 致命约束:坐标精确匹配

🔴 关键规则:导线的 Start 坐标必须精确等于 StartTerminal 所指端子的绝对位置,End 坐标必须精确等于 EndTerminal 所指端子的绝对位置!

如果坐标不匹配,优化器将无法识别连接关系,导线会被错误删除!

📊 NetType 网络类型枚举

枚举名 含义 建议使用场景
0 Undefined 未定义 默认值,或不区分时使用
1 Power 火线 连接电源 L 端的导线
2 Neutral 零线 连接电源 N 端的导线
3 Ground 地线 连接 PE 端的导线
4 Signal 信号/控制线 控制回路导线

🛠️ 布线策略与优化器协同

🤖 ESim电工制图优化器工作原理

当用户点击【导线一键优化】时,系统执行以下流程:

  1. 拓扑提取:遍历所有导线,识别端子连接关系,消除虚拟端子
  2. 出线点计算:根据端子的 Direction 属性,在控件外围 35px 处计算出线点
  1. 通道式正交路由:WireRouter 先生成布线通道(基于障碍物边界向外扩展),再尝试 L型直连 → 通道绕行 → Z型逃逸 → 强制正交降级
  2. 避障规则

💡 AI 布局预留建议

为了让优化器能顺利布线,AI 在布局元件时应预留足够的空间:

📄 图纸布局 (DrawingLayoutData)

属性 类型 默认值 说明
PaperSize string "A4 横向" 纸张规格,如 "A3 横向"、"A4 纵向"、"自定义"
CustomPaperWidth float 297 自定义纸张宽度,单位:毫米
CustomPaperHeight float 210 自定义纸张高度,单位:毫米
LayoutColumns int 8 分区列数 (1-26)
LayoutRows int 6 分区行数 (1-26)
DrawingTitle string "电路原理图" 图纸标题
DrawingScale string "1:1" 比例
ShowBorder bool true 显示图框
ShowLayoutGrid bool true 显示分区网格
ShowInfo bool true 显示标题栏

📏 标准纸张规格

规格 横向 纵向
A0 1189 × 841 841 × 1189
A1 841 × 594 594 × 841
A2 594 × 420 420 × 594
A3 420 × 297 297 × 420
A4 297 × 210 210 × 297

💾 序列化规则与兼容性

🔧 类型查找机制

反序列化时通过以下分层容错查找机制定位控件类型:

  1. 优先直接按保存的全名查找(如 Controls.SVG.PushButtonNO
  2. 找不到时尝试加 Controls. 前缀(兼容旧版短名)
  3. 最后兜底全局查找

⚠️ AI 生成时必须使用完整命名空间,不得依赖容错机制!

🔧 端子匹配机制

加载时通过以下代码匹配端子引用:

var terminal = comp.Terminals.FirstOrDefault(t => t.Label == td.Name);

只有 Direction >= 0 时才覆盖控件默认方向;同样 ContactType >= 0GroupType >= 0 才覆盖默认值。GroupId 非空时才覆盖。

🔄 常见易混淆 TypeName 映射表

显示名称 SVG 版本 (IsSVG=true) 图片版本 (IsSVG=false)
单相电源 Controls.SVG.SinglePhasePower Controls.SinglePhasePowerSupply
三相电源 Controls.SVG.ThreePhasePower Controls.ThreePhasePowerSupply
断路器3P Controls.SVG.CircuitBreaker3P Controls.AirSwitch3P
电机 Controls.SVG.Motor Controls.ThreePhaseMotor
常开按钮 Controls.SVG.PushButtonNO Controls.GreenButton
指示灯 Controls.SVG.PilotLight Controls.LEDGreen

🔄 可空属性处理

IsSVG 为可空布尔(bool?):

AI 生成时务必明确赋值 true 或 false,不得省略!

🔧 WireSettings 关键节点

XML 节点名 C# 属性 AI 推荐值
WireColor WireColor Black
WireWidth WireWidth 2
IntersectionColor ConnectionPointColor Red
ConnectionPointSize ConnectionPointSize 8
ShowConnectionPoints ShowConnectionPoints true
SnapToGrid SnapToGrid true
GridSize GridSize 5
EnableOrthogonalConstraint EnableOrthogonalConstraint true
PreviewColor PreviewColor DarkGreen
PreviewWidth PreviewWidth 3
ShowGrid ShowGrid true
GridColor GridColor LightGrey

⭐ AI 生成最佳实践流程

  1. 初始化图纸:设定 DrawingLayout,选择合适纸张和标题。
  2. 布局规划:遵循"左电源、右负载、中开关保护"原则。元件间距 ≥ 80px,预留走线通道。
  3. 复制元件模板:从本规范控件清单获取完整 ComponentData(含全部端子定义),仅更新 ComponentGuid、Location、ControlName、ControlLabel。
  4. 计算端子绝对位置:对每个端子计算 绝对位置 = WorldLocation + 旋转后Position。
  5. 生成直线导线:为每对需连接的端子创建 WireData,Start=端子A绝对位置,End=端子B绝对位置,Points 留空
  6. 建立端子引用:为每根导线填写精确的 StartTerminal/EndTerminal(TerminalName 必须与控件清单中端子 Name 一致)。
  7. 全局设置检查:确保 EnableOrthogonalConstraint=true、IsSVG=true、所有 GUID 唯一且非空。
  8. 序列化输出:生成 XML,执行自检清单。

🔍 生成后自检清单

📑 完整控件类型清单

本节列出系统中所有可用的电气元件。TypeName 必须使用完整命名空间。控件分为两类:

⚠️ 以下控件在序列化时会被系统自动过滤,AI 不应生成:Multimeter、MultimeterProbe

一、SVG 电气符号控件(Controls.SVG.\*)

1.1 电源类

TypeName 端子数 电气类型 Size (W×H) 说明
Controls.SVG.SinglePhasePower 3 AC 93×126 单相交流电源(L, N, PE)
Controls.SVG.ThreePhasePower 5 AC 93×142 三相交流电源(L1, L2, L3, N, PE)
Controls.SVG.DCPowerSupply 5 DC 128×85 直流电源(L, N, PE, +V1, -V1)
Controls.SVG.SinglePhaseTransformer 4 AC 168×75 单相变压器(U1, U2, V1, V2)
Controls.SVG.SinglePhasePowerTerminal 3 AC 98×85 单相电源接线端子排(L, N, PE)
Controls.SVG.ThreePhasePowerTerminal 5 AC 93×142 三相电源接线端子排(L1, L2, L3, N, PE)
1.1.1 单相交流电源 Controls.SVG.SinglePhasePower

Size: 93 × 126

Name Position(X,Y) Direction ContactType GroupId GroupType
L (39, 15) Right(3) PowerL(1) Power Undefined(5)
N (39, 35) Right(3) PowerN(2) Power Undefined(5)
PE (39, 55) Right(3) PowerPE(3) Power Undefined(5)
1.1.2 三相交流电源 Controls.SVG.ThreePhasePower

Size: 93 × 142

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (39, 8) Right(3) PowerL(1) Power Undefined(5)
L2 (39, 28) Right(3) PowerL(1) Power Undefined(5)
L3 (39, 48) Right(3) PowerL(1) Power Undefined(5)
N (39, 68) Right(3) PowerN(2) Power Undefined(5)
PE (39, 88) Right(3) PowerPE(3) Power Undefined(5)
1.1.3 直流电源 Controls.SVG.DCPowerSupply

Size: 128 × 85

Name Position(X,Y) Direction ContactType GroupId GroupType
L (18, 0) Up(0) PowerL(1) Power Undefined(5)
N (38, 0) Up(0) PowerN(2) Power Undefined(5)
PE (55, 19) Right(3) PowerPE(3) Power Undefined(5)
+V1 (18, 50) Down(1) DCPowerpositive(4) DCPower Undefined(5)
-V1 (38, 50) Down(1) DCPowernegative(5) DCPower Undefined(5)
1.1.4 单相变压器 Controls.SVG.SinglePhaseTransformer

Size: 168 × 75

Name Position(X,Y) Direction ContactType GroupId GroupType
U1 (105, 50) Right(3) PowerL(1) PowerIn Undefined(5)
U2 (105, 270) Right(3) PowerN(2) PowerIn Undefined(5)
V1 (289, 50) Left(2) PowerL(1) PowerOut Undefined(5)
V2 (289, 270) Left(2) PowerN(2) PowerOut Undefined(5)
1.1.5 单相电源接线端子排 Controls.SVG.SinglePhasePowerTerminal

Size: 98 × 85

Name Position(X,Y) Direction ContactType GroupId GroupType
L (2, 13) Left(2) PowerL(1) Terminal Undefined(5)
N (2, 33) Left(2) PowerN(2) Terminal Undefined(5)
PE (2, 53) Left(2) PowerPE(3) Terminal Undefined(5)
1.1.6 三相电源接线端子排 Controls.SVG.ThreePhasePowerTerminal

Size: 93 × 142

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (2, 8) Left(2) PowerL(1) Terminal Undefined(5)
L2 (2, 28) Left(2) PowerL(1) Terminal Undefined(5)
L3 (2, 48) Left(2) PowerL(1) Terminal Undefined(5)
N (2, 68) Left(2) PowerN(2) Terminal Undefined(5)
PE (2, 88) Left(2) PowerPE(3) Terminal Undefined(5)

1.2 开关保护类

TypeName 端子数 电气类型 Size (W×H) 说明
Controls.SVG.CircuitBreaker1P 2 AC 99×71 断路器 1P(L1, R1)
Controls.SVG.CircuitBreaker2P 4 AC 119×71 断路器 2P(L1, R1, L2, R2)
Controls.SVG.CircuitBreaker3P 6 AC 139×71 断路器 3P(L1, R1, L2, R2, L3, R3)
Controls.SVG.CircuitBreaker4P 8 AC 159×71 断路器 4P(L1, R1, L2, R2, L3, R3, N1, N2)
Controls.SVG.MotorCircuitBreaker 6 AC 153×99 电机断路器(L1, R1, L2, R2, L3, R3)
Controls.SVG.Fuse1PY 2 AC 89×71 熔断器 1P(L1, R1)
Controls.SVG.Fuse2PY 4 AC 119×71 熔断器 2P(L1, R1, L2, R2)
Controls.SVG.Fuse3PY 6 AC 144×71 熔断器 3P(L1, R1, L2, R2, L3, R3)
Controls.SVG.ThermalProtectorY 6 AC 139×71 热过载继电器主回路(1L1, 2T1, 3L2, 4T2, 5L3, 6T3)
Controls.SVG.FRncY 2 AC 79×71 热继电器 NC 辅助触点(95, 96)
Controls.SVG.FRnoY 2 AC 89×71 热继电器 NO 辅助触点(97, 98)
1.2.1 断路器 1P Controls.SVG.CircuitBreaker1P

Size: 99 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (30, 0) Up(0) NO(6) SW SPST(0)
R1 (30, 50) Down(1) NO(6) SW SPST(0)
1.2.2 断路器 2P Controls.SVG.CircuitBreaker2P

Size: 119 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (30, 0) Up(0) NO(6) SW_L1 SPST(0)
R1 (30, 50) Down(1) NO(6) SW_L1 SPST(0)
L2 (50, 0) Up(0) NO(6) SW_L2 SPST(0)
R2 (50, 50) Down(1) NO(6) SW_L2 SPST(0)
1.2.3 断路器 3P Controls.SVG.CircuitBreaker3P

Size: 139 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (30, 0) Up(0) NO(6) SW_L1 SPST(0)
R1 (30, 50) Down(1) NO(6) SW_L1 SPST(0)
L2 (50, 0) Up(0) NO(6) SW_L2 SPST(0)
R2 (50, 50) Down(1) NO(6) SW_L2 SPST(0)
L3 (70, 0) Up(0) NO(6) SW_L3 SPST(0)
R3 (70, 50) Down(1) NO(6) SW_L3 SPST(0)
1.2.4 断路器 4P Controls.SVG.CircuitBreaker4P

Size: 159 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (30, 0) Up(0) NO(6) SW_L1 SPST(0)
R1 (30, 50) Down(1) NO(6) SW_L1 SPST(0)
L2 (50, 0) Up(0) NO(6) SW_L2 SPST(0)
R2 (50, 50) Down(1) NO(6) SW_L2 SPST(0)
L3 (70, 0) Up(0) NO(6) SW_L3 SPST(0)
R3 (70, 50) Down(1) NO(6) SW_L3 SPST(0)
N1 (90, 0) Up(0) NO(6) SW_L4 SPST(0)
N2 (90, 50) Down(1) NO(6) SW_L4 SPST(0)
1.2.5 电机断路器 Controls.SVG.MotorCircuitBreaker

Size: 153 × 99

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (10, 0) Up(0) NO(6) SW_L1 SPST(0)
R1 (10, 70) Down(1) NO(6) SW_L1 SPST(0)
L2 (30, 0) Up(0) NO(6) SW_L2 SPST(0)
R2 (30, 70) Down(1) NO(6) SW_L2 SPST(0)
L3 (50, 0) Up(0) NO(6) SW_L3 SPST(0)
R3 (50, 70) Down(1) NO(6) SW_L3 SPST(0)
1.2.6 热过载继电器主回路 Controls.SVG.ThermalProtectorY

Size: 139 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
1L1 (30, 0) Up(0) NC(7) TH_L Main(3)
2T1 (30, 50) Down(1) NC(7) TH_L Main(3)
3L2 (50, 0) Up(0) NC(7) TH_M Main(3)
4T2 (50, 50) Down(1) NC(7) TH_M Main(3)
5L3 (70, 0) Up(0) NC(7) TH_R Main(3)
6T3 (70, 50) Down(1) NC(7) TH_R Main(3)
1.2.7 热继电器 NC 辅助触点 Controls.SVG.FRncY

Size: 79 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
95 (10, 0) Up(0) NC(7) FR_NC SPST(0)
96 (10, 50) Down(1) NC(7) FR_NC SPST(0)
1.2.8 热继电器 NO 辅助触点 Controls.SVG.FRnoY

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
97 (10, 0) Up(0) NO(6) FR_NO SPST(0)
98 (10, 50) Down(1) NO(6) FR_NO SPST(0)
1.2.9 熔断器 1P Controls.SVG.Fuse1PY

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (25, 0) Up(0) Undefined(9) FU_1 SPST(0)
R1 (25, 50) Down(1) Undefined(9) FU_1 SPST(0)
1.2.10 熔断器 2P Controls.SVG.Fuse2PY

Size: 119 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (30, 0) Up(0) Undefined(9) FU_L SPST(0)
R1 (30, 50) Down(1) Undefined(9) FU_L SPST(0)
L2 (50, 0) Up(0) Undefined(9) FU_R SPST(0)
R2 (50, 50) Down(1) Undefined(9) FU_R SPST(0)
1.2.11 熔断器 3P Controls.SVG.Fuse3PY

Size: 144 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (20, 0) Up(0) Undefined(9) FU_L1 SPST(0)
R1 (20, 50) Down(1) Undefined(9) FU_L1 SPST(0)
L2 (40, 0) Up(0) Undefined(9) FU_L2 SPST(0)
R2 (40, 50) Down(1) Undefined(9) FU_L2 SPST(0)
L3 (60, 0) Up(0) Undefined(9) FU_L3 SPST(0)
R3 (60, 50) Down(1) Undefined(9) FU_L3 SPST(0)

1.3 按钮与开关类

TypeName 端子数 电气类型 Size (W×H) 说明
Controls.SVG.PushButtonNO 2 AC 89×71 常开按钮(13, 14)
Controls.SVG.PushButtonNC 2 AC 89×71 常闭按钮(11, 12)
Controls.SVG.PushButtonNOH 2 AC 89×71 常开自锁按钮(13, 14)
Controls.SVG.PushButtonNCH 2 AC 89×71 常闭自锁按钮(11, 12)
Controls.SVG.PushButtonNCNO 4 AC 108×71 双触点按钮 NC+NO(11, 12, 13, 14)
Controls.SVG.PushButtonNCNOH 4 AC 108×71 双触点自锁按钮 NC+NO(11, 12, 13, 14)
Controls.SVG.EStopNCH 2 AC 99×71 急停按钮 NC 自锁(11, 12)
Controls.SVG.EStopNOH 2 AC 99×71 急停按钮 NO 自锁(13, 14)
Controls.SVG.EStopNCNOH 4 AC 108×71 急停按钮 NC+NO 自锁(11, 12, 13, 14)
1.3.1 常开按钮 Controls.SVG.PushButtonNO

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
13 (20, 0) Up(0) NO(6) NO SPST(0)
14 (20, 50) Down(1) NO(6) NO SPST(0)
1.3.2 常闭按钮 Controls.SVG.PushButtonNC

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (20, 0) Up(0) NC(7) NC SPST(0)
12 (20, 50) Down(1) NC(7) NC SPST(0)
1.3.3 常开自锁按钮 Controls.SVG.PushButtonNOH

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
13 (30, 0) Up(0) NO(6) NO SPST(0)
14 (30, 50) Down(1) NO(6) NO SPST(0)
1.3.4 常闭自锁按钮 Controls.SVG.PushButtonNCH

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (20, 0) Up(0) NC(7) NC SPST(0)
12 (20, 50) Down(1) NC(7) NC SPST(0)
1.3.5 双触点按钮 NC+NO Controls.SVG.PushButtonNCNO

Size: 108 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (20, 0) Up(0) NC(7) NC SPST(0)
12 (20, 50) Down(1) NC(7) NC SPST(0)
13 (40, 0) Up(0) NO(6) NO SPST(0)
14 (40, 50) Down(1) NO(6) NO SPST(0)
1.3.6 双触点自锁按钮 NC+NO Controls.SVG.PushButtonNCNOH

Size: 108 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (20, 0) Up(0) NC(7) NC SPST(0)
12 (20, 50) Down(1) NC(7) NC SPST(0)
13 (40, 0) Up(0) NO(6) NO SPST(0)
14 (40, 50) Down(1) NO(6) NO SPST(0)
1.3.7 急停按钮 NC 自锁 Controls.SVG.EStopNCH

Size: 99 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (20, 0) Up(0) NC(7) NC SPST(0)
12 (20, 50) Down(1) NC(7) NC SPST(0)
1.3.8 急停按钮 NO 自锁 Controls.SVG.EStopNOH

Size: 99 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
13 (30, 0) Up(0) NO(6) NO SPST(0)
14 (30, 50) Down(1) NO(6) NO SPST(0)
1.3.9 急停按钮 NC+NO 自锁 Controls.SVG.EStopNCNOH

Size: 108 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (20, 0) Up(0) NC(7) NC SPST(0)
12 (20, 50) Down(1) NC(7) NC SPST(0)
13 (40, 0) Up(0) NO(6) NO SPST(0)
14 (40, 50) Down(1) NO(6) NO SPST(0)

1.4 指示灯与负载类

TypeName 端子数 电气类型 Size (W×H) 说明
Controls.SVG.PilotLight 2 AC 79×71 指示灯(1, 2)
Controls.SVG.BuzzerY 2 AC 94×71 蜂鸣器(1, 2)
Controls.SVG.SolenoidY 2 AC 89×71 电磁阀线圈(1, 2)
1.4.1 指示灯 Controls.SVG.PilotLight

Size: 79 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
1 (10, 0) Up(0) PowerL(1) Power Undefined(5)
2 (10, 50) Down(1) PowerN(2) Power Undefined(5)
1.4.2 蜂鸣器 Controls.SVG.BuzzerY

Size: 94 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
1 (20, 0) Up(0) PowerL(1) Power Undefined(5)
2 (20, 50) Down(1) PowerN(2) Power Undefined(5)
1.4.3 电磁阀线圈 Controls.SVG.SolenoidY

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
1 (20, 0) Up(0) PowerL(1) Power Undefined(5)
2 (20, 50) Down(1) PowerN(2) Power Undefined(5)

1.5 接触器与继电器类

TypeName 端子数 电气类型 Size (W×H) 说明
Controls.SVG.KMCoil 2 AC 79×71 接触器 KM 线圈(A1, A2)
Controls.SVG.KACoil 2 AC 79×71 中间继电器 KA 线圈(13, 14)
Controls.SVG.KTCoil 2 AC 89×71 时间继电器 KT 线圈(A1, A2)
Controls.SVG.NOcontact 2 AC 89×71 常开触点(13, 14)
Controls.SVG.NCcontact 2 AC 79×71 常闭触点(11, 12)
Controls.SVG.NCNOcontact 4 AC 108×71 转换触点 NC+NO(11, 12, 13, 14)
Controls.SVG.ContactorY 6 AC 139×71 接触器主触点(L1, R1, L2, R2, L3, R3)
Controls.SVG.NCNOrelayY 3 AC 79×71 继电器转换触点(9, 1, 5)
Controls.SVG.TimeNC 2 AC 79×71 时间继电器 NC 触点(1, 4)
Controls.SVG.TimeNO 2 AC 89×71 时间继电器 NO 触点(1, 3)
1.5.1 接触器线圈 Controls.SVG.KMCoil

Size: 79 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
A1 (20, 0) Up(0) Coil(0) KM_Coil Undefined(5)
A2 (20, 50) Down(1) Coil(0) KM_Coil Undefined(5)
1.5.2 中间继电器线圈 Controls.SVG.KACoil

Size: 79 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
13 (20, 0) Up(0) Coil(0) KA_Coil Undefined(5)
14 (20, 50) Down(1) Coil(0) KA_Coil Undefined(5)
1.5.3 时间继电器线圈 Controls.SVG.KTCoil

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
A1 (30, 10) Up(0) Coil(0) KT_Coil Undefined(5)
A2 (30, 60) Down(1) Coil(0) KT_Coil Undefined(5)
1.5.4 常开触点 Controls.SVG.NOcontact

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
13 (10, 0) Up(0) NO(6) NO SPST(0)
14 (10, 50) Down(1) NO(6) NO SPST(0)
1.5.5 常闭触点 Controls.SVG.NCcontact

Size: 79 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (10, 0) Up(0) NC(7) NC SPST(0)
12 (10, 50) Down(1) NC(7) NC SPST(0)
1.5.6 转换触点 NC+NO Controls.SVG.NCNOcontact

Size: 108 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (20, 0) Up(0) NC(7) NC SPST(0)
12 (20, 50) Down(1) NC(7) NC SPST(0)
13 (40, 0) Up(0) NO(6) NO SPST(0)
14 (40, 50) Down(1) NO(6) NO SPST(0)
1.5.7 接触器主触点 Controls.SVG.ContactorY

Size: 139 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
L1 (30, 0) Up(0) NO(6) SW_L Main(3)
R1 (30, 50) Down(1) NO(6) SW_L Main(3)
L2 (50, 0) Up(0) NO(6) SW_M Main(3)
R2 (50, 50) Down(1) NO(6) SW_M Main(3)
L3 (70, 0) Up(0) NO(6) SW_R Main(3)
R3 (70, 50) Down(1) NO(6) SW_R Main(3)
1.5.8 继电器转换触点 Controls.SVG.NCNOrelayY

Size: 79 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
9 (20, 0) Up(0) COM(8) Relay SPDT(1)
1 (10, 50) Down(1) NC(7) Relay SPDT(1)
5 (30, 50) Down(1) NO(6) Relay SPDT(1)
1.5.9 时间继电器 NC 触点 Controls.SVG.TimeNC

Size: 79 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
1 (10, 0) Up(0) NC(7) TimeNC SPST(0)
4 (10, 50) Down(1) NC(7) TimeNC SPST(0)
1.5.10 时间继电器 NO 触点 Controls.SVG.TimeNO

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
1 (20, 0) Up(0) NO(6) TimeNO SPST(0)
3 (20, 50) Down(1) NO(6) TimeNO SPST(0)

1.6 电机与执行器类

TypeName 端子数 电气类型 Size (W×H) 说明
Controls.SVG.Motor 7 AC 118×99 三相异步电机(U1, V1, W1, U2, V2, W2, PE)
Controls.SVG.SingleMotor 4 AC 129×81 单相电机(N, L1, L2, PE)
Controls.SVG.MD200Y 23 AC 468×140 汇川变频器 MD200
Controls.SVG.Easy320Y 21 DC 468×140 汇川 Easy320 PLC
Controls.SVG.MagneticBrake 2 AC 109×51 电磁制动器(1, 2)
1.6.1 三相异步电机 Controls.SVG.Motor

Size: 118 × 99

Name Position(X,Y) Direction ContactType GroupId GroupType
U1 (30, 10) Up(0) PowerL(1) 3M_U Undefined(5)
V1 (50, 10) Up(0) PowerL(1) 3M_V Undefined(5)
W1 (70, 10) Up(0) PowerL(1) 3M_W Undefined(5)
U2 (50, 70) Down(1) PowerL(1) 3M_U Undefined(5)
V2 (70, 70) Down(1) PowerL(1) 3M_V Undefined(5)
W2 (30, 70) Down(1) PowerL(1) 3M_W Undefined(5)
PE (80, 40) Left(2) PowerPE(3) M_PE Undefined(5)
1.6.2 单相电机 Controls.SVG.SingleMotor

Size: 129 × 81

Name Position(X,Y) Direction ContactType GroupId GroupType
N (20, 10) Up(0) PowerN(2) M Undefined(5)
L1 (45, 10) Up(0) PowerL(1) M Undefined(5)
L2 (70, 10) Up(0) PowerL(1) M Undefined(5)
PE (66, 61) Left(2) PowerPE(3) M Undefined(5)
1.6.3 电磁制动器 Controls.SVG.MagneticBrake

Size: 109 × 51

Name Position(X,Y) Direction ContactType GroupId GroupType
1 (0, 10) Left(2) PowerL(1) Power Undefined(5)
2 (50, 10) Right(3) PowerN(2) Power Undefined(5)
1.6.4 汇川变频器 MD200 Controls.SVG.MD200Y

Size: 468 × 140

主电源输入 (Power_Input):

Name Position(X,Y) Direction ContactType GroupId GroupType
R (-160, -50) Up(0) Undefined(9) Power_Input Undefined(5)
S (-125, -50) Up(0) Undefined(9) Power_Input Undefined(5)
T (-90, -50) Up(0) Undefined(9) Power_Input Undefined(5)
PE1 (-55, -50) Up(0) Undefined(9) Power_Input Undefined(5)

控制输入端 (Control_Input):

Name Position(X,Y) Direction ContactType GroupId GroupType
DI1 (-10, -50) Up(0) Undefined(9) Control_Input Undefined(5)
DI2 (15, -50) Up(0) Undefined(9) Control_Input Undefined(5)
DI3 (40, -50) Up(0) Undefined(9) Control_Input Undefined(5)
DI4 (65, -50) Up(0) Undefined(9) Control_Input Undefined(5)
COM (90, -50) Up(0) Undefined(9) Control_Input Undefined(5)
10V (125, -50) Up(0) Undefined(9) Control_Input Undefined(5)
GND (150, -50) Up(0) Undefined(9) Control_Input Undefined(5)
AI (175, -50) Up(0) Undefined(9) Control_Input Undefined(5)

主电源输出 (Power_Output):

Name Position(X,Y) Direction ContactType GroupId GroupType
U (-160, 60) Down(1) Undefined(9) Power_Output Undefined(5)
V (-125, 60) Down(1) Undefined(9) Power_Output Undefined(5)
W (-90, 60) Down(1) Undefined(9) Power_Output Undefined(5)
PE2 (-55, 60) Down(1) Undefined(9) Power_Output Undefined(5)

控制输出端 (Control_Output):

Name Position(X,Y) Direction ContactType GroupId GroupType
P+ (-10, 60) Down(1) Undefined(9) Control_Output Undefined(5)
P- (20, 60) Down(1) Undefined(9) Control_Output Undefined(5)
TA (55, 60) Down(1) Undefined(9) Control_Output Undefined(5)
TB (80, 60) Down(1) Undefined(9) Control_Output Undefined(5)
TC (105, 60) Down(1) Undefined(9) Control_Output Undefined(5)
DO1 (140, 60) Down(1) Undefined(9) Control_Output Undefined(5)
COM (165, 60) Down(1) Undefined(9) Control_Output Undefined(5)
1.6.5 汇川 Easy320 PLC Controls.SVG.Easy320Y

Size: 468 × 140

输入端 (PLC_Input):

Name Position(X,Y) Direction ContactType GroupId GroupType
X0 (-45, -50) Up(0) Undefined(9) PLC_Input Undefined(5)
X1 (-20, -50) Up(0) Undefined(9) PLC_Input Undefined(5)
X2 (5, -50) Up(0) Undefined(9) PLC_Input Undefined(5)
X3 (30, -50) Up(0) Undefined(9) PLC_Input Undefined(5)
X4 (55, -50) Up(0) Undefined(9) PLC_Input Undefined(5)
X5 (80, -50) Up(0) Undefined(9) PLC_Input Undefined(5)
X6 (105, -50) Up(0) Undefined(9) PLC_Input Undefined(5)
X7 (130, -50) Up(0) Undefined(9) PLC_Input Undefined(5)
SS (155, -50) Up(0) Undefined(9) PLC_Input Undefined(5)

输出端 (PLC_Output):

Name Position(X,Y) Direction ContactType GroupId GroupType
Y0 (-45, 60) Down(1) Undefined(9) PLC_Output Undefined(5)
Y1 (-20, 60) Down(1) Undefined(9) PLC_Output Undefined(5)
Y2 (5, 60) Down(1) Undefined(9) PLC_Output Undefined(5)
Y3 (30, 60) Down(1) Undefined(9) PLC_Output Undefined(5)
Y4 (55, 60) Down(1) Undefined(9) PLC_Output Undefined(5)
Y5 (80, 60) Down(1) Undefined(9) PLC_Output Undefined(5)
Y6 (105, 60) Down(1) Undefined(9) PLC_Output Undefined(5)
Y7 (130, 60) Down(1) Undefined(9) PLC_Output Undefined(5)
COM (155, 60) Down(1) Undefined(9) PLC_Output Undefined(5)

电源端 (PLC_Power):

Name Position(X,Y) Direction ContactType GroupId GroupType
24V (-170, 60) Down(1) Undefined(9) PLC_Power Undefined(5)
0V (-135, 60) Down(1) Undefined(9) PLC_Power Undefined(5)
GND (-100, 60) Down(1) Undefined(9) PLC_Power Undefined(5)

1.7 传感器类

TypeName 端子数 电气类型 Size (W×H) 说明
Controls.SVG.PhotoelectricSensor 5 DC 139×141 光电传感器(BR, BL, GY, BK, WH)
Controls.SVG.SensorNCN 3 DC 140×121 NPN 常闭传感器(BR, BL, BK)
Controls.SVG.SensorNCP 3 DC 140×121 NPN 常开传感器(BR, BL, BK)
Controls.SVG.SensorNON 3 DC 140×121 PNP 常开传感器(BR, BL, BK)
Controls.SVG.SensorNOP 3 DC 140×121 PNP 常闭传感器(BR, BL, BK)
Controls.SVG.LevelSwitchNO 2 AC 89×71 液位开关 NO(13, 14)
Controls.SVG.LevelSwitchNC 2 AC 89×71 液位开关 NC(11, 12)
Controls.SVG.LimitSwitchNO 2 AC 79×71 限位开关 NO(13, 14)
Controls.SVG.LimitSwitchNC 2 AC 79×71 限位开关 NC(11, 12)
Controls.SVG.PressureSwitchNO 2 AC 89×71 压力开关 NO(13, 14)
Controls.SVG.PressureSwitchNC 2 AC 89×71 压力开关 NC(11, 12)
Controls.SVG.MagneticSwitch 2 AC 89×71 磁性开关(13, 14)
1.7.1 光电传感器 Controls.SVG.PhotoelectricSensor

Size: 139 × 141

Name Position(X,Y) Direction ContactType GroupId GroupType
BR (30, 0) Up(0) PowerL(1) Sensor Undefined(5)
BL (30, 120) Down(1) NC(7) Sensor Undefined(5)
GY (80, 40) Right(3) NO(6) Sensor Undefined(5)
BK (80, 60) Right(3) COM(8) Sensor Undefined(5)
WH (80, 80) Right(3) NC(7) Sensor Undefined(5)
1.7.2 DC 三线传感器 Controls.SVG.SensorNCN / SensorNCP / SensorNON / SensorNOP

Size: 140 × 121(四个子类型尺寸和端子位置完全相同,仅 ContactType 有所差异)

通用端子位置(适用于所有四个子类型):

Name Position(X,Y) Direction 说明
BR (30, 0) Up(0) 棕色线——正极
BL (30, 100) Down(1) 蓝色线——负载/输出
BK (80, 50) Right(3) 黑色线——负极/公共端

SensorNCN(NPN 常闭)端子属性:

Name ContactType GroupId GroupType
BR DCPowerpositive(4) SensorNON Undefined(5)
BL NC(7) SensorNON Undefined(5)
BK DCPowernegative(5) SensorNON Undefined(5)

SensorNCP(NPN 常开)端子属性:

Name ContactType GroupId GroupType
BR DCPowerpositive(4) SensorNCP Undefined(5)
BL NO(6) SensorNCP Undefined(5)
BK DCPowernegative(5) SensorNCP Undefined(5)

SensorNON(PNP 常开)端子属性:

Name ContactType GroupId GroupType
BR DCPowerpositive(4) SensorNON Undefined(5)
BL NO(6) SensorNON Undefined(5)
BK DCPowernegative(5) SensorNON Undefined(5)

SensorNOP(PNP 常闭)端子属性:

Name ContactType GroupId GroupType
BR DCPowerpositive(4) SensorNOP Undefined(5)
BL NC(7) SensorNOP Undefined(5)
BK DCPowernegative(5) SensorNOP Undefined(5)
1.7.3 液位开关 NO Controls.SVG.LevelSwitchNO

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
13 (20, 0) Up(0) NO(6) LevelSwitchNO Undefined(5)
14 (20, 50) Down(1) NO(6) LevelSwitchNO Undefined(5)
1.7.4 液位开关 NC Controls.SVG.LevelSwitchNC

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (20, 0) Up(0) NC(7) LevelSwitchNC SPST(0)
12 (20, 50) Down(1) NC(7) LevelSwitchNC SPST(0)
1.7.5 限位开关 NO Controls.SVG.LimitSwitchNO

Size: 79 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
13 (10, 0) Up(0) NO(6) LimitSwitchNO SPST(0)
14 (10, 50) Down(1) NO(6) LimitSwitchNO SPST(0)
1.7.6 限位开关 NC Controls.SVG.LimitSwitchNC

Size: 79 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (10, 0) Up(0) NC(7) LimitSwitchNC SPST(0)
12 (10, 50) Down(1) NC(7) LimitSwitchNC SPST(0)
1.7.7 压力开关 NO Controls.SVG.PressureSwitchNO

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
13 (20, 0) Up(0) NO(6) PressureSwitchNO Undefined(5)
14 (20, 50) Down(1) NO(6) PressureSwitchNO Undefined(5)
1.7.8 压力开关 NC Controls.SVG.PressureSwitchNC

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
11 (20, 0) Up(0) NC(7) PressureSwitchNC SPST(0)
12 (20, 50) Down(1) NC(7) PressureSwitchNC SPST(0)
1.7.9 磁性开关 Controls.SVG.MagneticSwitch

Size: 89 × 71

Name Position(X,Y) Direction ContactType GroupId GroupType
13 (20, 0) Up(0) Undefined(9) MagneticSwitch Undefined(5)
14 (20, 100) Down(1) Undefined(9) MagneticSwitch Undefined(5)

1.8 接线端子类

TypeName 端子数 电气类型 Size (W×H) 说明
Controls.SVG.SingleTerminalBlock 1 AC 93×30 单端子排 标准型(1),Direction=Right
Controls.SVG.SingleTerminalBlockA 1 AC 93×30 单端子排 A 型(1),Direction=Left
Controls.SVG.SingleTerminalBlockB 1 AC 93×30 单端子排 B 型(1),Direction=Left,偏移位置
Controls.SVG.SingleTerminalBlockC 1 AC 93×30 单端子排 C 型(1),Direction=Right
Controls.SVG.SingleGroundTerminal 1 AC 93×30 单接地端子(PE)
Controls.SVG.SinglePhasePowerTerminal 3 AC 98×85 单相电源端子(L, N, PE)
Controls.SVG.ThreePhasePowerTerminal 5 AC 93×142 三相电源端子(L1, L2, L3, N, PE)
1.8.1 单端子排 Controls.SVG.SingleTerminalBlock

Size: 93 × 30

Name Position(X,Y) Direction ContactType GroupId GroupType
1 (19, 32.5) Right(3) Undefined(9) Terminal Undefined(5)
1.8.2 单端子排 A 型 Controls.SVG.SingleTerminalBlockA

Size: 93 × 30

Name Position(X,Y) Direction ContactType GroupId GroupType
1 (2, 15) Left(2) Undefined(9) Terminal Undefined(5)
1.8.3 单端子排 B 型 Controls.SVG.SingleTerminalBlockB

Size: 93 × 30

Name Position(X,Y) Direction ContactType GroupId GroupType
1 (11, 32.5) Left(2) Undefined(9) Terminal Undefined(5)
1.8.4 单端子排 C 型 Controls.SVG.SingleTerminalBlockC

Size: 93 × 30

Name Position(X,Y) Direction ContactType GroupId GroupType
1 (19, 32.5) Right(3) Undefined(9) Terminal Undefined(5)
1.8.5 单接地端子 Controls.SVG.SingleGroundTerminal

Size: 93 × 30

Name Position(X,Y) Direction ContactType GroupId GroupType
PE (2, 15) Left(2) PowerPE(3) Terminal Undefined(5)

二、图片实物控件(Controls.\*)

图片控件端子的 Direction、ContactType、GroupId、GroupType 均使用系统默认值,AI 无需显式赋值。AI 生成图片控件时 IsSVG 必须设为 false

2.1 电源类

TypeName 端子数 电气类型 端子名称 说明
Controls.SinglePhasePowerSupply 2 AC L, N 单相交流电源
Controls.ThreePhasePowerSupply 5 AC L1, L2, L3, N, PE 三相交流电源
Controls.DCPower 5 AC L, N, PE, +V1, -V1 直流电源

2.2 开关保护类

TypeName 端子数 电气类型 端子名称 说明
Controls.AirSwitch1P 2 AC L1, R1 空气开关 1P
Controls.AirSwitch2P 4 AC 空气开关 2P
Controls.AirSwitch3P 6 AC 空气开关 3P
Controls.AirSwitch4P 8 AC 空气开关 4P
Controls.ThermalProtectionSwitch 10 AC 1L1, 3L2, 5L3, 2T1, 4T2, 6T3, NC95, NC96, NO97, NO98 热过载保护开关
Controls.Fuse1P AC 熔断器 1P
Controls.Fuse2P AC 熔断器 2P
Controls.Fuse3P AC 熔断器 3P

2.3 按钮开关类

TypeName 端子数 电气类型 端子名称 说明
Controls.GreenButton 4 AC 1, 2, 3, 4 绿色按钮
Controls.RedButton 4 AC 1, 2, 3, 4 红色按钮
Controls.YellowButton 4 AC 1, 2, 3, 4 黄色按钮
Controls.GreenJogButton 4 AC 1, 2, 3, 4 绿色点动按钮
Controls.RedJogButton 4 AC 1, 2, 3, 4 红色点动按钮
Controls.EmergencyStop AC 急停按钮
Controls.FootSwitch 2 AC 1, 3 脚踏开关

2.4 指示灯与负载类

TypeName 端子数 电气类型 端子名称 说明
Controls.Bulb 2 AC L, N 灯泡
Controls.Buzzer 2 AC 1, 2 蜂鸣器
Controls.BuzzerDC DC 蜂鸣器 DC
Controls.LEDGreen 2 AC 1, 2 绿色 LED
Controls.LEDRed 2 AC 1, 2 红色 LED
Controls.LEDYellow 2 AC 1, 2 黄色 LED
Controls.LEDGreenDC 2 DC 1, 2 绿色 LED DC
Controls.LEDRedDC 2 DC 1, 2 红色 LED DC
Controls.LEDYellowDC 2 DC 1, 2 黄色 LED DC
Controls.TriColourLight 4 AC Yellow, Green, Red, N 三色灯
Controls.TriColourLightDC 4 DC Yellow, Green, Red, N 三色灯 DC

2.5 接触器与继电器类

TypeName 端子数 电气类型 端子名称 说明
Controls.ACContactorA 12 AC A1, A2, A21, L1, L2, L3, T1, T2, T3, 21NC, 13NO, 14NO, 22NC 交流接触器 A 型
Controls.ACContactorB AC 交流接触器 B 型
Controls.ACContactorC AC 交流接触器 C 型
Controls.ACContactorD AC 交流接触器 D 型
Controls.Relay8Pin 8 AC 1, 4, 5, 8, 9, 12, 13, 14 8脚继电器
Controls.Relay14Pin AC 14脚继电器
Controls.TimeRelay AC 时间继电器
Controls.TimeRelayDC DC 时间继电器 DC
Controls.TimeRelayE AC 时间继电器 E 型

2.6 传感器类

TypeName 端子数 电气类型 端子名称 说明
Controls.ProximitySwitchNO 2 AC 1, 2 接近开关 NO
Controls.ProximitySwitchNC 2 AC 1, 2 接近开关 NC
Controls.OptoElectronicSwitchNO 2 AC 1, 2 光电开关 NO
Controls.OptoElectronicSwitchNC 2 AC 1, 2 光电开关 NC
Controls.FloatSwitch 3 AC 1, 2, 3 浮球开关
Controls.CylinderMagneticSwitch 2 DC 1, 2 气缸磁性开关
Controls.SafetyLightCurtainDC 3 DC +24V, 0V, OUT 安全光幕 DC
Controls.MagneticSafetySwitchP 3 DC +24V, 0V, OUT 磁性安全开关 P 型

2.7 安全与保护类

TypeName 端子数 电气类型 端子名称 说明
Controls.SafetyRelay 16 AC 13, 23, 24, A1, S33, S34, S21, S22, A2, 14, S11, S12, CH11, CH12, CH21, CH22 安全继电器
Controls.SafetyRelayDC 16 DC 13, 23, 24, A1, S33, S34, S21, S22, A2, 14, S11, S12, CH11, CH12, CH21, CH22 安全继电器 DC

2.8 仪表与测量类

TypeName 端子数 电气类型 端子名称 说明
Controls.AmMeter 2 AC L1, L2 电流表
Controls.VoltMeter AC 电压表
Controls.ElectricEnergyMeter 4 AC 1, 2, 3, 4 单相电能表

2.9 墙壁开关插座类

TypeName 端子数 电气类型 端子名称 说明
Controls.WallSwitch 3 AC 1, 2, 3 墙壁开关
Controls.WallSocket 3 AC L, N, PE 墙壁插座

📁 成功案例:双指示灯并联控制电路(v1.1 直连版)

该案例演示了 v1.1 规范的直线直连法。导线不计算任何拐点,加载后通过 ESim电工制图优化器自动生成完美的正交路径。

电路拓扑

单相电源 L → 断路器 L1→R1 ──┬── 指示灯HL1 端子1→2 ──┬── 电源 N └── 指示灯HL2 端子1→2 ──┘

布局说明

元件 WorldLocation 说明
单相电源 (200, 120) 左侧电源区
断路器QF1 (400, 120) 中部保护区
指示灯HL1 (320, 310) 右侧负载区上行
指示灯HL2 (500, 310) 右侧负载区下行

端子绝对位置计算验证

单相电源 Controls.SVG.SinglePhasePower (Size: 93×126) at (200, 120):

端子Name 相对Position 绝对位置
L (39, 15) (239, 135)
N (39, 35) (239, 155)
PE (39, 55) (239, 175)

断路器1P Controls.SVG.CircuitBreaker1P (Size: 99×71) at (400, 120):

端子Name 相对Position 绝对位置
L1 (30, 0) (430, 120)
R1 (30, 50) (430, 170)

指示灯HL1 Controls.SVG.PilotLight (Size: 79×71) at (320, 310):

端子Name 相对Position 绝对位置
1 (10, 0) (330, 310)
2 (10, 50) (330, 360)

指示灯HL2 Controls.SVG.PilotLight (Size: 79×71) at (500, 310):

端子Name 相对Position 绝对位置
1 (10, 0) (510, 310)
2 (10, 50) (510, 360)

导线数据(✅ v1.1 直连法:无拐点)

导线 起点→绝对位置 终点→绝对位置 Points NetType 策略说明
W1 电源L→(239,135) 断路器L1→(430,120) 1(Power) ✅ 直连线,优化器自动处理
W2 断路器R1→(430,170) HL1端子1→(330,310) 1(Power) ✅ 直连线,优化器自动处理
W3 断路器R1→(430,170) HL2端子1→(510,310) 1(Power) ✅ 直连线,优化器自动处理
W4 HL1端子2→(330,360) 电源N→(239,155) 2(Neutral) ✅ 直连线,优化器自动处理
W5 HL2端子2→(510,360) 电源N→(239,155) 2(Neutral) ✅ 直连线,优化器自动处理

📊 本案例关键验证点

完整 XML 示例

展开查看完整 XML(点击展开)
<?xml version="1.0"?> <CircuitData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Version>2.0</Version> <CreatedDate>2026-06-01T10:50:14.6558068+08:00</CreatedDate> <ModifiedDate>2026-06-01T10:50:14.6558068+08:00</ModifiedDate> <Components> <ComponentData> <ComponentGuid>a1000000-0000-0000-0000-000000000001</ComponentGuid> <TypeName>Controls.SVG.SinglePhasePower</TypeName> <Location> <X>200</X> <Y>120</Y> </Location> <Size> <Width>93</Width> <Height>126</Height> </Size> <ComponentTitle>SinglePhasePower</ComponentTitle> <ControlName>交流电源L0</ControlName> <ControlLabel>L0</ControlLabel> <ShowComponentName>false</ShowComponentName> <ElectricalType>AC</ElectricalType> <IsVoltage380V>false</IsVoltage380V> <IsLabelDrawn>false</IsLabelDrawn> <IsSVG>true</IsSVG> <RotationAngle>0</RotationAngle> <ComponentType>PowerSupply</ComponentType> <Terminals> <TerminalData> <Name>L</Name> <Position> <X>92</X> <Y>5</Y> </Position> <Size>15</Size> <Color>#E63946</Color> <IsConnected>true</IsConnected> <Direction>3</Direction> <ContactType>1</ContactType> <GroupId>Power</GroupId> <GroupType>5</GroupType> </TerminalData> <TerminalData> <Name>N</Name> <Position> <X>92</X> <Y>34</Y> </Position> <Size>15</Size> <Color>#2563EB</Color> <IsConnected>true</IsConnected> <Direction>3</Direction> <ContactType>2</ContactType> <GroupId>Power</GroupId> <GroupType>5</GroupType> </TerminalData> <TerminalData> <Name>PE</Name> <Position> <X>92</X> <Y>62</Y> </Position> <Size>15</Size> <Color>#84CC16</Color> <IsConnected>false</IsConnected> <Direction>3</Direction> <ContactType>3</ContactType> <GroupId>Power</GroupId> <GroupType>5</GroupType> </TerminalData> </Terminals> <SerializableProperties /> </ComponentData> <ComponentData> <ComponentGuid>a2000000-0000-0000-0000-000000000001</ComponentGuid> <TypeName>Controls.SVG.CircuitBreaker1P</TypeName> <Location> <X>400</X> <Y>120</Y> </Location> <Size> <Width>99</Width> <Height>71</Height> </Size> <ComponentTitle>CircuitBreaker1P</ComponentTitle> <ControlName>断路器QF1</ControlName> <ControlLabel>QF1</ControlLabel> <ShowComponentName>false</ShowComponentName> <ElectricalType>AC</ElectricalType> <IsVoltage380V>false</IsVoltage380V> <IsLabelDrawn>false</IsLabelDrawn> <IsSVG>true</IsSVG> <RotationAngle>0</RotationAngle> <ComponentType>AirSwitch</ComponentType> <Terminals> <TerminalData> <Name>L1</Name> <Position> <X>68</X> <Y>0</Y> </Position> <Size>15</Size> <Color>#404040</Color> <IsConnected>true</IsConnected> <Direction>0</Direction> <ContactType>6</ContactType> <GroupId>SW</GroupId> <GroupType>0</GroupType> </TerminalData> <TerminalData> <Name>R1</Name> <Position> <X>68</X> <Y>70</Y> </Position> <Size>15</Size> <Color>#404040</Color> <IsConnected>true</IsConnected> <Direction>1</Direction> <ContactType>6</ContactType> <GroupId>SW</GroupId> <GroupType>0</GroupType> </TerminalData> </Terminals> <SerializableProperties /> </ComponentData> <ComponentData> <ComponentGuid>a3000000-0000-0000-0000-000000000001</ComponentGuid> <TypeName>Controls.SVG.PilotLight</TypeName> <Location> <X>320</X> <Y>310</Y> </Location> <Size> <Width>79</Width> <Height>71</Height> </Size> <ComponentTitle>PilotLight</ComponentTitle> <ControlName>指示灯HL1</ControlName> <ControlLabel>HL1</ControlLabel> <ShowComponentName>false</ShowComponentName> <ElectricalType>AC</ElectricalType> <IsVoltage380V>false</IsVoltage380V> <IsLabelDrawn>false</IsLabelDrawn> <IsSVG>true</IsSVG> <RotationAngle>0</RotationAngle> <ComponentType>LED</ComponentType> <Terminals> <TerminalData> <Name>1</Name> <Position> <X>58</X> <Y>0</Y> </Position> <Size>15</Size> <Color>Red</Color> <IsConnected>true</IsConnected> <Direction>0</Direction> <ContactType>1</ContactType> <GroupId>Power</GroupId> <GroupType>5</GroupType> </TerminalData> <TerminalData> <Name>2</Name> <Position> <X>58</X> <Y>70</Y> </Position> <Size>15</Size> <Color>Blue</Color> <IsConnected>true</IsConnected> <Direction>1</Direction> <ContactType>2</ContactType> <GroupId>Power</GroupId> <GroupType>5</GroupType> </TerminalData> </Terminals> <SerializableProperties /> </ComponentData> <ComponentData> <ComponentGuid>a3000000-0000-0000-0000-000000000002</ComponentGuid> <TypeName>Controls.SVG.PilotLight</TypeName> <Location> <X>500</X> <Y>310</Y> </Location> <Size> <Width>79</Width> <Height>71</Height> </Size> <ComponentTitle>PilotLight</ComponentTitle> <ControlName>指示灯HL2</ControlName> <ControlLabel>HL2</ControlLabel> <ShowComponentName>false</ShowComponentName> <ElectricalType>AC</ElectricalType> <IsVoltage380V>false</IsVoltage380V> <IsLabelDrawn>false</IsLabelDrawn> <IsSVG>true</IsSVG> <RotationAngle>0</RotationAngle> <ComponentType>LED</ComponentType> <Terminals> <TerminalData> <Name>1</Name> <Position> <X>58</X> <Y>0</Y> </Position> <Size>15</Size> <Color>Red</Color> <IsConnected>true</IsConnected> <Direction>0</Direction> <ContactType>1</ContactType> <GroupId>Power</GroupId> <GroupType>5</GroupType> </TerminalData> <TerminalData> <Name>2</Name> <Position> <X>58</X> <Y>70</Y> </Position> <Size>15</Size> <Color>Blue</Color> <IsConnected>true</IsConnected> <Direction>1</Direction> <ContactType>2</ContactType> <GroupId>Power</GroupId> <GroupType>5</GroupType> </TerminalData> </Terminals> <SerializableProperties /> </ComponentData> </Components> <Wires> <WireData> <Id>887e3170-479d-4765-88f9-926bf4dc2e69</Id> <Start> <X>292</X> <Y>125</Y> </Start> <End> <X>468</X> <Y>120</Y> </End> <Points> <Point> <X>322</X> <Y>125</Y> </Point> <Point> <X>322</X> <Y>90</Y> </Point> <Point> <X>468</X> <Y>90</Y> </Point> </Points> <Color>Black</Color> <Width>2</Width> <Label /> <IsSelected>false</IsSelected> <NetType>1</NetType> <ConnectionPoints /> <StartTerminal> <ComponentGuid>a1000000-0000-0000-0000-000000000001</ComponentGuid> <TerminalName>L</TerminalName> </StartTerminal> <EndTerminal> <ComponentGuid>a2000000-0000-0000-0000-000000000001</ComponentGuid> <TerminalName>L1</TerminalName> </EndTerminal> </WireData> <WireData> <Id>32da2d19-8222-4a85-b78e-0653b8e358c9</Id> <Start> <X>468</X> <Y>190</Y> </Start> <End> <X>378</X> <Y>310</Y> </End> <Points> <Point> <X>468</X> <Y>220</Y> </Point> <Point> <X>378</X> <Y>220</Y> </Point> </Points> <Color>Black</Color> <Width>2</Width> <Label /> <IsSelected>false</IsSelected> <NetType>1</NetType> <ConnectionPoints /> <StartTerminal> <ComponentGuid>a2000000-0000-0000-0000-000000000001</ComponentGuid> <TerminalName>R1</TerminalName> </StartTerminal> <EndTerminal> <ComponentGuid>a3000000-0000-0000-0000-000000000001</ComponentGuid> <TerminalName>1</TerminalName> </EndTerminal> </WireData> <WireData> <Id>633bf605-50e4-456d-b0c6-c055c6adfa37</Id> <Start> <X>468</X> <Y>190</Y> </Start> <End> <X>558</X> <Y>310</Y> </End> <Points> <Point> <X>468</X> <Y>220</Y> </Point> <Point> <X>558</X> <Y>220</Y> </Point> </Points> <Color>Black</Color> <Width>2</Width> <Label /> <IsSelected>false</IsSelected> <NetType>1</NetType> <ConnectionPoints /> <StartTerminal> <ComponentGuid>a2000000-0000-0000-0000-000000000001</ComponentGuid> <TerminalName>R1</TerminalName> </StartTerminal> <EndTerminal> <ComponentGuid>a3000000-0000-0000-0000-000000000002</ComponentGuid> <TerminalName>1</TerminalName> </EndTerminal> </WireData> <WireData> <Id>75ed0ce5-7a18-4d07-9a57-fb86d4ba0f8a</Id> <Start> <X>292</X> <Y>154</Y> </Start> <End> <X>378</X> <Y>380</Y> </End> <Points> <Point> <X>320</X> <Y>154</Y> </Point> <Point> <X>320</X> <Y>380</Y> </Point> </Points> <Color>Black</Color> <Width>2</Width> <Label /> <IsSelected>false</IsSelected> <NetType>0</NetType> <ConnectionPoints /> <StartTerminal> <ComponentGuid>a1000000-0000-0000-0000-000000000001</ComponentGuid> <TerminalName>N</TerminalName> </StartTerminal> <EndTerminal> <ComponentGuid>a3000000-0000-0000-0000-000000000001</ComponentGuid> <TerminalName>2</TerminalName> </EndTerminal> </WireData> <WireData> <Id>a3027543-5779-4672-8167-6da6120e74d8</Id> <Start> <X>378</X> <Y>380</Y> </Start> <End> <X>558</X> <Y>380</Y> </End> <Points /> <Color>Black</Color> <Width>2</Width> <Label /> <IsSelected>false</IsSelected> <NetType>0</NetType> <ConnectionPoints /> <StartTerminal> <ComponentGuid>a3000000-0000-0000-0000-000000000001</ComponentGuid> <TerminalName>2</TerminalName> </StartTerminal> <EndTerminal> <ComponentGuid>a3000000-0000-0000-0000-000000000002</ComponentGuid> <TerminalName>2</TerminalName> </EndTerminal> </WireData> </Wires> <WireSettings> <WireColor>Black</WireColor> <WireWidth>2</WireWidth> <IntersectionColor>Red</IntersectionColor> <ConnectionPointSize>8</ConnectionPointSize> <ShowConnectionPoints>true</ShowConnectionPoints> <SnapToGrid>true</SnapToGrid> <GridSize>5</GridSize> <EnableOrthogonalConstraint>true</EnableOrthogonalConstraint> <PreviewColor>DarkGreen</PreviewColor> <PreviewWidth>3</PreviewWidth> <ShowGrid>true</ShowGrid> <GridColor>LightGrey</GridColor> </WireSettings> <DrawableElements /> <DrawingLayout> <PaperSize>A4 横向</PaperSize> <CustomPaperWidth>297</CustomPaperWidth> <CustomPaperHeight>210</CustomPaperHeight> <LayoutColumns>8</LayoutColumns> <LayoutRows>6</LayoutRows> <DrawingTitle>双指示灯并联控制电路</DrawingTitle> <DrawingScale>1:1</DrawingScale> <ShowBorder>true</ShowBorder> <ShowLayoutGrid>true</ShowLayoutGrid> <ShowInfo>true</ShowInfo> </DrawingLayout> </CircuitData>

⚡ ESim 电工制图 AI 电路生成规范 v1.1

📐 严谨数据契约 · 布局优先接线 · 优化器接管路由