'换火20min,缩放校正,换火时间预置'
This commit is contained in:
@@ -4,6 +4,7 @@ import utils from './utils';
|
||||
|
||||
const wss = new WebSocketServer({ port: 9800 });
|
||||
const frequency = 10; // seconds
|
||||
const frequency1 = 1200; // seconds
|
||||
wss.on('connection', function (ws, req) {
|
||||
// console.log("ws", ws);
|
||||
console.log(
|
||||
@@ -26,7 +27,6 @@ wss.on('connection', function (ws, req) {
|
||||
|
||||
const timer = setInterval(() => {
|
||||
sendMsg(ws, 'kiln-info'); // 窑炉信息
|
||||
sendMsg(ws, 'run-state'); // 运行状态
|
||||
sendMsg(ws, 'energy-cost'); // 运行状态
|
||||
sendMsg(ws, 'realtime');
|
||||
sendMsg(ws, 'his-trend');
|
||||
@@ -35,9 +35,14 @@ wss.on('connection', function (ws, req) {
|
||||
// sendMsg(ws, 'kiln-bottom');
|
||||
}, frequency * 1000);
|
||||
|
||||
const timer1 = setInterval(() => {
|
||||
sendMsg(ws, 'run-state'); // 运行状态
|
||||
}, frequency1 * 1000);
|
||||
|
||||
ws.on('close', function () {
|
||||
console.log('停止监听');
|
||||
clearInterval(timer);
|
||||
clearInterval(timer1);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
"gasii": "...m³"
|
||||
},
|
||||
"runState": {
|
||||
"lastFireChangeTime": "3分28秒",
|
||||
"fireChangeTime": "20:00",
|
||||
"fireDirection": "东火"
|
||||
"lastFireChangeTime": "19分28秒",
|
||||
"fireChangeTime": "19:56",
|
||||
"fireDirection": "南火"
|
||||
},
|
||||
"fan": [
|
||||
["8#压延冷却风机", "4373Hz", "正常"],
|
||||
|
||||
Reference in New Issue
Block a user