hudong
2025-05-09 56138493c172bcc34e5dd362067764cde8c520c1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using HH.WCS.Mobox3.pinggao.device;
using HH.WCS.Mobox3.pinggao.process;
using HH.WCS.Mobox3.pinggao.util;
using HH.WCS.Mobox3.pinggao.wms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
 
namespace HH.WCS.Mobox3.pinggao.core
{
    /// <summary>
    /// 定时轮询任务
    /// </summary>
    internal class Monitor
    {
        internal static void CheckThirdOutWork() {
            //第三方读中间表
            //var db= new SqlHelper<object>().GetInstance("中间表的sql连接字符串");
            // db.Queryable<object>
 
            //读到了出库单,插入到我们的表
 
 
        }
 
        internal static void CheckOutWork() {
            //读自己的中间表,我们自己的表有表有个字段计数,计数小于最大值,继续出库,一次生成一条任务
 
        }
 
 
        internal static void CheckDevice() {
            //检测输送线状态
 
            S7Helper.ReadStr("plc1", 100, 1, 8);
            S7Helper.ReadBit("plc1", 101, 1, 2);
            S7Helper.ReadInt("plc1", 102, 1, 6);
            //1 设备plc的ip deviceNo 自动建立连接
            //2 设备对应的通讯项和线体类型(输送线入口、输送线出口、提升机的入口。。。。)起始读的偏移地址,写的偏移地址
            //{ "deviceNo":"5","code":"9001","location":"F1CJ-SSX1-01","writeAddr900":0,"writeAddr905":-1,"writeAddr710":0,"readAddr901":2,"readAddr902":0,"lineType":1},
            //3 通讯项自动读plc,读到的数据根据lineType做处理,自动创建任务或者更新任务状态(创建一个设备动作或任务动作,如果是任务动作有个线程去读)
        }
 
 
 
    }
}