initial commit
This commit is contained in:
36
Cs_HMI/StateMachine/_Close.cs
Normal file
36
Cs_HMI/StateMachine/_Close.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
public partial class fMain
|
||||
{
|
||||
/// <summary>
|
||||
/// 프로그램을 닫을때 1회 실행되는 함수
|
||||
/// </summary>
|
||||
private void _Close_Start()
|
||||
{
|
||||
if (Pub.plc1 != null) Pub.plc1.Dispose();
|
||||
|
||||
Pub.log.Add("Program Close");
|
||||
Pub.log.Flush();
|
||||
Pub.sm.Stop();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 프로그램종료시 특정상황에 따른 무기한 대기 루틴 이 작업은 close_start 이후에 반복됩니다.
|
||||
/// 모든 조건이 일치하게되면 closed 상태로 호출되어 프로그램이 종료됩니다.
|
||||
/// </summary>
|
||||
//private void _Close_Wait()
|
||||
//{
|
||||
// if (!Pub.dio.isRunIOMonitor && !Pub.mot.isRunIOMonitor)
|
||||
// Pub.sm.setNewStep(eSystemStep.CLOSED);
|
||||
// else if (!Pub.dio.isDisposed) Pub.dio.Dispose();
|
||||
// else if (!Pub.mot.isDisposed) Pub.mot.Dispose(); //181206
|
||||
//}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user