wangxinhui
2024-11-06 8f392cc88b0768b74efca3b68785cf5aa1c38e70
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
using HslCommunication;
using Quartz;
using System;
using System.Threading.Tasks;
using WIDESEA_WCS.Jobs;
using WIDESEA_WCS.WCSClient;
 
namespace WIDESEA_WCS
{
    /// <summary>
    /// 正极辊分下料任务
    /// </summary>
    [DisallowConcurrentExecution]
    public class Z_GFSB_DownTaskJob : JobBase, IJob
    {
 
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                ExecuteJob(context, DoAction);
            }
            catch { }
            return Task.FromResult(string.Empty);
        }
 
 
        private void DoAction(IJobExecutionContext context)
        {
            try
            {
                StackerExecutor.Z_GFSB_DownTask();//正极辊分下料任务
                                                  //Console.WriteLine(DateTime.Now);
                PLCClient agvplc = WCSService.Clients.Find(v => v.PLCName == "组装AGV调度");
                if (agvplc != null) { 
                OperateResult W_AGV_XTZZ = agvplc.SiemensPLCClient.SiemensS7NetClient.Write("DB1000.306.0", true);
                }
            }
            catch (Exception) { }
        }
    }
}