Sfoglia il codice sorgente

打标机和rfid脚本

zhuhao 2 anni fa
parent
commit
8fec11ae7a
3 ha cambiato i file con 437 aggiunte e 0 eliminazioni
  1. 0 0
      doc/~$接口文档.docx
  2. 387 0
      doc/接口文档.docx
  3. 50 0
      sql/update_1031.sql

+ 0 - 0
doc/~$接口文档.docx


+ 387 - 0
doc/接口文档.docx

@@ -0,0 +1,387 @@
+1.智能单元取物品
+http://192.168.170.240:8090/api/GetIntelligenceUnit
+{"url":"192.168.170.81",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "Location":"5"
+    }
+}
+
+2.柔性线取物品
+
+http://192.168.170.240:8090/api/GetFlexibleWire
+
+{"url":"192.168.170.71",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "location":"5"
+    }
+}
+3.质量中心取物品
+http://192.168.170.240:8090/api/GetQualityCenter
+{"url":"192.168.170.61",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "location":"5"
+    }
+}
+
+4.智能单元送物品
+http://192.168.170.240:8090/api/SendIntelligenceUnit
+{"url":"192.168.170.81",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "location":"5"
+    }
+}
+5.柔性线送物品
+http://192.168.170.240:8090/api/SendFlexibleWire
+{"url":"192.168.170.71",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "location":"5"
+    }
+}
+6.质量中心送物品
+http://192.168.170.240:8090/api/SendQualityCenter
+{"url":"192.168.170.61",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "location":"5"
+    }
+
+}
+7.柔性线机器人移动物品
+http://192.168.170.240:8090/api/MoveRobotPosition
+{"url":"192.168.170.71",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "location":"5"
+    }
+}
+
+
+8.上传文件
+http://192.168.170.240:8090/api/UploadFile
+{"url":"192.168.170.206",
+"port":"502",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+      "fileName":"225.MPF",
+      "remotePath":"/card/user/system/home/manufact/"
+    }
+}
+
+http://192.168.170.240:8090/api/StartNCProgram
+9.启动机床程序
+{"url":"192.168.170.206",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+      "remotePath":"Sinumerik/FileSystem/NCExtend/YGMESFILE/223.MPF"
+    }
+}
+10.粗偏写入
+http://192.168.170.240:8090/api/SendLinShift
+{"url":"192.168.170.206",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "x":"1",
+        "Y":"2",
+        "Z":"3",
+        "A":"4",
+        "B":"5"
+    }
+}
+11.精偏写入
+http://192.168.170.240:8090/api/SendLinShiftFine
+{"url":"192.168.170.206",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "x":"1",
+        "Y":"2",
+        "Z":"3",
+        "A":"4",
+        "B":"5"
+    }
+}
+
+http://192.168.170.240:8090/api/StartCleanMachine
+12.启动清洗机
+{"url":"192.168.170.74",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+       
+    }
+}
+13.启动打标机
+http://192.168.170.240:8090/api/StartLabelMachine
+{"url":"192.168.170.76",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+       "workId":"1",
+       "labelContent":"12345678"
+    }
+}
+
+14.查询三坐标空闲位
+http://192.168.170.240:8090/api/QueryThreeCoordinatesFreePos
+{"url":"192.168.170.61",
+"port":"4840" 
+}
+ 响应值,result 成功返回点位(L,M,R),否则返回false
+{
+  "taskID": "",
+  "taskNodeID": "",
+  "result": "false"
+}
+15.放三坐标滑台
+http://192.168.170.240:8090/api/SendThreeCoordinates
+{"url":"192.168.170.61",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "workId": "string",
+    	    "procedureNo": "string",
+         "workProgramName": "string",
+         "location": "string",
+         "stationId": "L"
+    }
+}
+
+响应
+{
+  "taskID": "string",
+  "taskNodeID": "string",
+  "result": "false"
+}
+15.伺服舵机取物品
+http://192.168.170.240:8090/api/GetServoStacker
+{"url":"192.168.170.130",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "location":"1"
+    }
+}
+16.伺服舵机放物品
+http://192.168.170.240:8090/api/SendServoStacker
+{"url":"192.168.170.130",
+"port":"4840",
+"taskId":"10001",
+"taskNodeId":"10001",
+"data":
+    {
+        "location":"2"
+    }
+}
+
+17.刀具接口列表
+http://localhost:63570/api/GetTools
+                                    名称
+       类型
+      备注
+url
+  String
+   IP地址
+port
+  String
+    端口号
+
+{
+"url":"192.168.170.205",
+"port":"4840"
+}
+
+                                    名称
+       类型
+      备注
+monitorType
+string
+监控类型
+toolNo
+String
+刀具号
+name
+String
+刀具名称
+warnLife
+String
+刀具寿命预警
+targetLife
+String
+刀具寿命目标值
+workPiece
+String
+工件数
+workPieceWarn
+String
+工件数预警值
+workPieceTarget
+String
+工件数目标值
+wear
+String
+磨损量
+wearWarn
+String
+磨损量预警值
+wearTarget
+String
+磨损量目标值
+sisterNo
+String 
+姊妹刀号
+toolEdgeNo
+String
+刀沿号
+toolPosition
+String 
+刀具位置	
+toolRadius
+String 
+刀具半径
+
+返回
+[
+    {
+        "number": "57",
+        "name": "YYYY",
+        "warnLife": "30",
+        "targetLife": "40",
+        "workPiece": "35",
+        "workPieceWarn": "36",
+        "workPieceTarget": "37",
+        "wear": "32",
+        "wearWarn": "31",
+        "wearTarget": "32"
+  }
+]
+
+18.读RFID
+http://localhost:8089/api/ReadRFID
+{
+  "url": "192.168.170.130",
+  "port": "102",
+  "taskId": "10001",
+  "taskNodeId": "10001",
+  "data": { 
+    "positionIndex": "1"
+  }
+} 
+响应值
+{
+	"taskID": "10001",
+	"taskNodeID": "10001",
+	"result": "false"  (如果读出值,返回读出的内容,否则返回false)
+}
+19写RFID
+http://localhost:8089/api//WriteRFID
+{
+  "url": "192.168.170.130",
+  "port": "102",
+  "taskId": "10001",
+  "taskNodeId": "10001",
+  "data": { 
+    "content": "string",
+    "positionIndex": "1"
+  }
+} 
+响应值
+{
+	"taskID": "10001",
+	"taskNodeID": "10001",
+	"result": "true"   
+}
+
+
+20.获取数据采集名称列表
+http://106.15.38.8:8090//api/GetTagList
+POST方式
+输入参数:空
+返回结果
+{
+        "ID": 0,
+        "Name": "DB200.6",
+        "Type": "SHORT",
+        "Unit": "NULL",
+        "Source": "S7-1500",
+        "IP": "192.168.170.130",
+        "Description": "安全位"
+    },
+    {
+        "ID": 0,
+        "Name": "DB200.8",
+        "Type": "SHORT",
+        "Unit": "NULL",
+        "Source": "S7-1500",
+        "IP": "192.168.170.130",
+        "Description": "系统启动状态"
+    },
+    {
+        "ID": 0,
+        "Name": "DB200.10",
+        "Type": "SHORT",
+        "Unit": "NULL",
+        "Source": "S7-1500",
+        "IP": "192.168.170.130",
+        "Description": "PLC三色灯状态"
+  },
+  
+21.获取状态当前值
+http://106.15.38.8:8090//api/GetTagValue
+
+POST
+输入参数:
+{
+
+    "tagname":"DB200.6",
+    "ip":"192.168.170.130",
+}
+返回纯文本
+0
+
+
+
+

+ 50 - 0
sql/update_1031.sql

@@ -0,0 +1,50 @@
+INSERT INTO `ccs_action` (`id`, `ip`, `protocol_type`, `operate_type`, `operate_name`, `file_path`, `plc_ip`, `order_index`, `description`) VALUES ('55', '192.168.170.130', 'S7_1500', 'ReadRFID', '读RFID', NULL, NULL, NULL, NULL);
+INSERT INTO `ccs_action` (`id`, `ip`, `protocol_type`, `operate_type`, `operate_name`, `file_path`, `plc_ip`, `order_index`, `description`) VALUES ('56', '192.168.170.130', 'S7_1500', 'WriteRFID', '写RFID', NULL, NULL, NULL, NULL);
+
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('100', '37', 'WRITE', 'DB200.52', '', '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('101', '37', 'WRITE', 'DB200.53', NULL, '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('102', '37', 'WRITE', 'DB200.54', NULL, '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('104', '37', 'WRITE', 'DB200.182', NULL, '', '4');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('105', '37', 'WRITE', 'DB200.310', NULL, '', '5');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('106', '37', 'WRITE', 'DB200.438', NULL, '', '6');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('107', '37', 'WRITE', 'DB200.470', NULL, '', '7');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('108', '37', 'WRITE', 'DB200.24', '0', '', '8');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('109', '37', 'WRITE', 'DB200.50', '1', '', '9');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('110', '37', 'CALLBACK', 'DB200.50', '3', '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('111', '37', 'CALLBACK', 'DB200.24', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('112', '55', 'WRITE1', 'DB200.508', '', '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('113', '55', 'WRITE1', 'DB200.476', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('114', '55', 'WRITE1', 'DB200.476', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('115', '55', 'WRITE2', 'DB200.748', '', '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('116', '55', 'WRITE2', 'DB200.480', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('117', '55', 'WRITE2', 'DB200.480', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('118', '55', 'WRITE3', 'DB200.988', '', '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('119', '55', 'WRITE3', 'DB200.484', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('120', '55', 'WRITE3', 'DB200.484', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('121', '55', 'WRITE4', 'DB200.1228', NULL, '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('122', '55', 'WRITE4', 'DB200.488', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('123', '55', 'WRITE4', 'DB200.488', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('124', '55', 'WRITE5', 'DB200.1468', NULL, '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('125', '55', 'WRITE5', 'DB200.492', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('126', '55', 'WRITE5', 'DB200.492', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('127', '55', 'WRITE6', 'DB200.1708', NULL, '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('128', '55', 'WRITE6', 'DB200.496', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('129', '55', 'WRITE6', 'DB200.496', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('130', '56', 'WRITE1', 'DB200.628', '', '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('131', '56', 'WRITE1', 'DB200.478', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('132', '56', 'WRITE1', 'DB200.478', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('133', '56', 'WRITE2', 'DB200.868', '', '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('134', '56', 'WRITE2', 'DB200.482', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('135', '56', 'WRITE2', 'DB200.482', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('136', '56', 'WRITE3', 'DB200.1108', '', '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('137', '56', 'WRITE3', 'DB200.486', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('138', '56', 'WRITE3', 'DB200.486', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('139', '56', 'WRITE4', 'DB200.1348', NULL, '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('140', '56', 'WRITE4', 'DB200.490', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('141', '56', 'WRITE4', 'DB200.490', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('142', '56', 'WRITE5', 'DB200.1588', NULL, '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('143', '56', 'WRITE5', 'DB200.494', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('144', '56', 'WRITE5', 'DB200.494', '0', '', '3');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('145', '56', 'WRITE6', 'DB200.1828', NULL, '', '1');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('146', '56', 'WRITE6', 'DB200.498', '1', '', '2');
+INSERT INTO `ccs_action_address` (`id`, `action_id`, `type`, `address`, `value`, `check_type`, `sort`) VALUES ('147', '56', 'WRITE6', 'DB200.498', '0', '', '3');