diff --git a/directory.json b/directory.json index e988c511..8161023b 100644 --- a/directory.json +++ b/directory.json @@ -460,6 +460,10 @@ { "title": "DF1", "path": "configuration/south-devices/df1/df1" + }, + { + "title": "KND CNC", + "path": "configuration/south-devices/knd/knd" } ] }, @@ -1140,6 +1144,10 @@ { "title": "DF1", "path": "configuration/south-devices/df1/df1" + }, + { + "title": "KND CNC", + "path": "configuration/south-devices/knd/knd" } ] }, diff --git a/en_US/configuration/south-devices/knd/knd.md b/en_US/configuration/south-devices/knd/knd.md new file mode 100644 index 00000000..a7aa3bbc --- /dev/null +++ b/en_US/configuration/south-devices/knd/knd.md @@ -0,0 +1,134 @@ +# KND CNC + +The KND CNC driver accesses KND K2000, K1000 C/Ci/F/Fi, and K1000TTCi series CNC systems via HTTP protocol, enabling real-time collection of various device operation data, including program name, spindle override, operating status, PLC points, etc. + +## Device Settings + +| Field | Description | +| ----- | -------------------------------- | +| host | Device IP address | +| port | Device port number, default 8000 | + +## Supported Data Types + +* uint8 +* int8 +* uint16 +* int16 +* uint32 +* int32 +* uint64 +* int64 +* float +* double +* bool +* bit +* string + +## CNC Data + +> address\[.m] + +| Tag Identifier (Address) | Description | Data Type | Parameter | Remarks | +| ----------------------------- | ----------------------------------- | ------------ | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| systemInfo.id | ID | int32 | - | - | +| systemInfo.type | System Type | string | - | - | +| systemInfo.manufacturer | Manufacturer | string | - | - | +| systemInfo.manufacture-time | Manufacture Time | string | - | - | +| systemInfo.soft-version | System Software Version | string | - | - | +| systemInfo.fpga-version | FPGA Version | string | - | - | +| systemInfo.ladder-version | Ladder Version | string | - | - | +| systemInfo.user-axes | User Axis List | array string | - | - | +| systemStatus.run-status | Current Run Status | int32 | - | 0: CNC is stopped 1: CNC is paused (feed hold) 2: CNC is running | +| systemStatus.opr-mode | Current Operation Mode | int32 | - | 0: Manual data input mode 1: Automatic mode 2: Invalid mode 3: Edit mode 4: Single step mode 5: Manual mode 8: Handle wheel mode 9: Machine zero return mode 10: Program zero return mode | +| systemStatus.ready | Is Ready | bool | - | - | +| systemStatus.not-ready-reason | Not Ready Reason Mask | int32 | - | 0x1: Emergency stop signal active 0x2: Servo not ready 0x4: IO not ready (remote IO devices, etc.) | +| systemStatus.alarms | Alarm List | array string | - | - | +| alarms | Alarm Description Information | string | m | prm-switch: Parameter switch alarm (system parameter switch or servo parameter switch) reboot: Power on/off alarm plc: PLC alarm or prompt (external alarm) ps: PS alarm (operation error) over-travel: Over-travel alarm over-heat: Overheat alarm mem: Memory alarm servo: Servo drive alarm servo-bus: Servo bus alarm over-workarea: Out of work area alarm io-bus: IO bus alarm io-module: IO module alarm manufacture: Machine factory alarm forbid-move: Axis movement not allowed when axis moves | +| absolute | Absolute Coordinates | double | m | X Y Z | +| machine | Machine Coordinates | double | m | X Y Z | +| relative | Relative Coordinates | double | m | X Y Z | +| cycleTime | Processing Time | int32 | m | total: Processing time (unit: seconds) cur: Cycle time (unit: seconds) | +| workCounts | Processing Counts | int32 | m | total: Total processing count batch: Single batch processing count | +| workCountGoals | Target Counts | int32 | m | total: Total target count batch: Single batch target count | +| feedOverride | Current Feed Override | double | - | - | +| jogOverride | Current Jog Override | double | - | - | +| rapidOverride | Current Rapid Override | double | - | - | +| handleOverride | Current Handle/Single Step Override | double | - | - | +| spindleOverride | Current Spindle Override | double | m | 1: Spindle 1 2: Spindle 2 3: Spindle 3 | +| spSpeed | Current Spindle Speed | double | m | 1: Spindle 1 2: Spindle 2 3: Spindle 3 | +| feedrate | Actual Feedrate | double | - | - | +| g54 | G54 Work Coordinate System | double | m | X Y Z | +| g55 | G55 Work Coordinate System | double | m | X Y Z | +| g56 | G56 Work Coordinate System | double | m | X Y Z | +| g57 | G57 Work Coordinate System | double | m | X Y Z | +| g58 | G58 Work Coordinate System | double | m | X Y Z | +| g59 | G59 Work Coordinate System | double | m | X Y Z | +| workCoorsCur | Current Work Coordinate System | string | - | - | +| vars | Macro Variables | double | m | Macro variable number | +| progCur | Current Program | int32 | - | - | +| progExecStatus | Program Execution Status | int32 | m | O: Program O number N: Program N number P: Paragraph number | + +::: tip +Spindle numbers start from 1 and increase according to the actual number of spindles. + +Macro variables (vars) are readable and writable, others are read-only. +::: + +*CNC Address Examples* + +| Address | Description | +| ----------------- | ------------------------------------ | +| systemInfo.type | Read processing main program number | +| machine.X | Read X-axis coordinate | +| vars.100 | Read/write macro variable 100 | +| feedOverride | Read current feed override | +| alarms.plc | PLC alarm or prompt (external alarm) | +| spindleOverride.1 | Spindle 1 override | +| spSpeed.1 | Spindle 1 speed | +| cycleTime.cur | Cycle time | + +### PLC Data + +### Address Format + +> AREA ADDRESS\[.BIT]\[.LEN] + +| Identifier | Description | Type | Permission | +| ---------- | --------------------------- | ---- | ---------- | +| X | DI Input | all | Read | +| Y | DO Output | all | Read | +| F | NC -> PLC | all | Read | +| G | PLC -> NC | all | Read | +| R | PLC Internal Control Relay | all | Read/Write | +| S | PLC Internal Special Flag | all | Read | +| K | PLC Internal Power-On Relay | all | Read | +| D | Data Table | all | Read | +| TL | Label Sequence Number | all | Read | + +::: tip +Currently, only part of the R area can be set, i.e., R17000-R17099, and it requires explicit permission in the ladder diagram. The ladder diagram must set G138 to 181 to allow remote modification of the above R area. +::: + +> AREA ADDRESS\[.cur/conf] + +| Identifier | Description | Type | Permission | +| ---------- | ----------- | ------------ | ---------- | +| T | Timer | int32/uint32 | Read | +| C | Counter | int32/uint32 | Read | + +::: tip +When reading timers and counters, you need to specify whether it is the set value or the current value. +::: + +*Common PLC Points* + +| Address | Type | Description | +| ------- | ------ | -------------------------------------------------- | +| X0.0 | bit | DI area, data at address 0 | +| Y0.0 | bit | DO area, data at address 0 | +| D10 | int32 | Data table area, data at address 10 | +| R17000 | float | Internal control relay area, data at address 17000 | +| D20.24 | string | Data table area, data at address 20 | +| T0.conf | int32 | Timer area, set value data at address 0 | +| T0.cur | int32 | Timer area, current data at address 0 | \ No newline at end of file diff --git a/zh_CN/configuration/south-devices/knd/knd.md b/zh_CN/configuration/south-devices/knd/knd.md new file mode 100644 index 00000000..d6456f3c --- /dev/null +++ b/zh_CN/configuration/south-devices/knd/knd.md @@ -0,0 +1,140 @@ +# KND CNC + +凯恩帝 CNC 驱动通过 HTTP 协议访问凯恩帝 K2000、K1000 C/Ci/F/Fi、K1000TTCi 系列的数控系统,可以实时采集多种设备运行数据,包括程序名,主轴倍率,运行状态,PLC 点位等。 + +## 设备设置 + +| 字段 | 说明 | +| ---- | -------------------- | +| host | 设备 IP 地址 | +| port | 设备端口号, 默认8000 | + +## 支持的数据类型 + +* uint8 +* int8 +* uint16 +* int16 +* uint32 +* int32 +* uint64 +* int64 +* float +* double +* bool +* bit +* string + +## CNC 数据 + +> address\[.m] + +| tag 标识(地址) | 说明 | 数据类型 | 参数 | 备注 | +| ----------------------------- | ------------------ | ------------ | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| systemInfo.id | ID | int32 | - | - | +| systemInfo.type | 系统类型 | string | - | - | +| systemInfo.manufacturer | 制造商 | string | - | - | +| systemInfo.manufacture-time | 生产时间 | string | - | - | +| systemInfo.soft-version | 系统软件版本号 | string | - | - | +| systemInfo.fpga-version | FPGA版本号 | string | - | - | +| systemInfo.ladder-version | 梯图版本号 | string | - | - | +| systemInfo.user-axes | 用户轴列表 | array string | - | - | +| systemStatus.run-status | 当前运行状态 | int32 | - | 0: CNC 处于停止状态 1: CNC 处于暂停(进给保持)状态 2: CNC 处于运行状态 | +| systemStatus.opr-mode | 当前工作模式 | int32 | - | 0: 录入方式 1: 自动方式 2: 无效方式 3: 编辑方式 4: 单步方式 5: 手动方式 8: 手轮方式 9: 机械回零方式 10: 程序回零方式 | +| systemStatus.ready | 是否准备就绪 | bool | - | - | +| systemStatus.not-ready-reason | 准备未绪的原因掩码 | int32 | - | 0x1: 急停信号有效 0x2: 伺服准备未绪 0x4: IO 准备未绪(远程 IO 设备等) | +| systemStatus.alarms | 报警列表 | array string | - | - | +| alarms | 报警描述信息 | string | m | prm-switch: 参数开关报警(系统参数开关或伺服参数开关) reboot:开关机报警 plc:PLC 报警或提示(外部报警)ps:PS 报警(操作错)over-travel:超程报警 over-heat:过热报警 mem:存储器报警 servo:伺服驱动报警 servo-bus:伺服总线报警 over-workarea:超出工作区报警 io-bus:IO 总线报警 io-module:IO 模块报警 manufacture:机床厂报警 forbid-move:不允许移动的轴发生移动时报警 | +| absolute | 绝对坐标 | double | m | X Y Z | +| machine | 机械坐标 | double | m | X Y Z | +| relative | 相对坐标 | double | m | X Y Z | +| cycleTime | 加工时间 | int32 | m | total: 加工时间(单位:秒) cur: 循环时间(单位:秒) | +| workCounts | 加工计数 | int32 | m | total: 总加工计数 batch: 单批加工计数 | +| workCountGoals | 目标件数 | int32 | m | total: 总目标件数 batch: 单批目标件数 | +| feedOverride | 当前进给倍率 | double | - | - | +| jogOverride | 当前手动倍率 | double | - | - | +| rapidOverride | 当前快速倍率 | double | - | - | +| handleOverride | 当前手轮/单步档位 | double | - | - | +| spindleOverride | 当前主轴倍率 | double | m | 1:主轴1 2:主轴2 3:主轴3 | +| spSpeed | 当前主轴转速 | double | m | 1:主轴1 2:主轴2 3:主轴3 | +| feedrate | 实际进给速率 | double | - | - | +| g54 | G54工件坐标系 | double | m | X Y Z | +| g55 | G55工件坐标系 | double | m | X Y Z | +| g56 | G56工件坐标系 | double | m | X Y Z | +| g57 | G57工件坐标系 | double | m | X Y Z | +| g58 | G58工件坐标系 | double | m | X Y Z | +| g59 | G59工件坐标系 | double | m | X Y Z | +| workCoorsCur | 当前工件坐标系 | string | - | - | +| vars | 宏变量 | double | m | 宏变量编号 | +| progCur | 当前程序 | int32 | - | - | +| progExecStatus | 程序执行状态 | int32 | m | O: 程序 O 号 N: 程序 N 号 P: 段落号 | + +::: tip +主轴数从1开始,根据实际主轴数递增。 + +vars 宏变量可读写,其他只读。 +::: + + + + +*CNC 地址示例* + +| 地址 | 说明 | +| ----------------- | -------------------------- | +| systemInfo.type | 读取加工主程序号 | +| machine.X | 读取 X 轴坐标 | +| vars.100 | 读写100号宏变量置 | +| feedOverride | 读取当前进给倍率 | +| alarms.plc | PLC 报警或提示(外部报警) | +| spindleOverride.1 | 主轴1倍率 | +| spSpeed.1 | 主轴1转速 | +| cycleTime.cur | 循环时间 | + + +### PLC 数据 + +### 地址格式 + +> AREA ADDRESS\[.BIT]\[.LEN] + +| 标识 | 说明 | 类型 | 权限 | +| ---- | ---------------------- | ---- | ----- | +| X | DI 输入 | all | 读 | +| Y | DO 输出 | all | 读 | +| F | NC -> PLC | all | 读 | +| G | PLC -> NC | all | 读 | +| R | PLC 内部控制继电器 | all | 读/写 | +| S | PLC 内部特殊标志 | all | 读 | +| K | PLC 内部掉电保护继电器 | all | 读 | +| D | 数据表 | all | 读 | +| TL | 标号序号 | all | 读 | + + +::: tip +目前只支持设置部分 R 区,即 R17000-R17099,并且需要梯图显式允许,梯图必 +须将 G138 赋为 181,才能远程修改上述 R 区。 +::: + +> AREA ADDRESS\[.cur/conf] + +| 标识 | 说明 | 类型 | 权限 | +| ---- | ------ | ------------ | ---- | +| T | 定时器 | int32/uint32 | 读 | +| C | 计数器 | int32/uint32 | 读 | + +::: tip +读取定时器和计数器时,需要指定是设置值还是当前值。 +::: + +*PLC 常用点位* + +| 地址 | 类型 | 说明 | +| ------- | ------ | ------------------------------------ | +| X0.0 | bit | DI 区域,地址0的数据 | +| Y0.0 | bit | DO 区域,地址0的数据 | +| D10 | int32 | 数据表 区域,地址10的数据 | +| R17000 | float | 内部控制继电器 区域,地址17000的数据 | +| D20.24 | string | 数据表 区域,地址20的数据 | +| T0.conf | int32 | 定时器 区域,地址0的设定值数据 | +| T0.cur | int32 | 定时器 区域,地址0的当前数据 |