..
This commit is contained in:
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
using Project.StateMachine;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AR;
|
||||
using COMM;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using System.Diagnostics;
|
||||
using AR;
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using arCtl;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
namespace Project
|
||||
|
||||
120
Cs_HMI/Project/StateMachine/_AGV.resx
Normal file
120
Cs_HMI/Project/StateMachine/_AGV.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -5,7 +5,7 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using arCtl;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
|
||||
|
||||
@@ -12,185 +12,184 @@ namespace Project
|
||||
public partial class fMain
|
||||
{
|
||||
|
||||
private void PLC_DioChanged(object sender, arDev.FakePLC.IOValueEventArgs e)
|
||||
{
|
||||
if (e.Direction == arDev.Arduino.IODirection.Input)
|
||||
{
|
||||
var diName = (arDev.FakePLC.DIName)e.ArrIDX;
|
||||
Console.WriteLine(string.Format("[DI:{1}]{0}=>{2}", diName, e.ArrIDX, e.NewValue));
|
||||
//private void PLC_DioChanged(object sender, arDev.FakePLC.IOValueEventArgs e)
|
||||
//{
|
||||
// if (e.Direction == arDev.Arduino.IODirection.Input)
|
||||
// {
|
||||
// var diName = (arDev.FakePLC.DIName)e.ArrIDX;
|
||||
// Console.WriteLine(string.Format("[DI:{1}]{0}=>{2}", diName, e.ArrIDX, e.NewValue));
|
||||
|
||||
if (diName == arDev.FakePLC.DIName.PINI_BTN_1) //reset
|
||||
{
|
||||
if (e.NewValue == true)
|
||||
{
|
||||
PUB.log.Add($"버튼({diName}) 눌림(AGV_RESET)");
|
||||
PUB.AGV.AGVErrorReset();
|
||||
// if (diName == arDev.FakePLC.DIName.PINI_BTN_1) //reset
|
||||
// {
|
||||
// if (e.NewValue == true)
|
||||
// {
|
||||
// PUB.log.Add($"버튼({diName}) 눌림(AGV_RESET)");
|
||||
// PUB.AGV.AGVErrorReset();
|
||||
|
||||
//241203
|
||||
if(PUB.AGV.system1.agv_run || PUB.AGV.system1.agv_run_manual)
|
||||
{
|
||||
PUB.AGV.AGVMoveStop("button1");
|
||||
}
|
||||
//PUB.XBE.NewMsgEvent('0', '1');
|
||||
}
|
||||
}
|
||||
else if (diName == arDev.FakePLC.DIName.PINI_BTN_2) //auto -> QC //230424
|
||||
{
|
||||
if (e.NewValue == true)
|
||||
{
|
||||
PUB.log.Add($"버튼({diName}) 눌림");
|
||||
if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == true)
|
||||
{
|
||||
if (PUB.sm.RunStep == StateMachine.ERunStep.GOUP)
|
||||
{
|
||||
//zup을 자동으로 해준다
|
||||
if (VAR.BOOL[eVarBool.WAIT_COVER_UP])
|
||||
{
|
||||
PUB.log.Add($"버튼({diName}) 눌림");
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP);
|
||||
PUB.Result.NextPos = ePosition.QC;
|
||||
}
|
||||
else PUB.Speak(Lang.커버업대기상태가아닙니다);
|
||||
}
|
||||
else if (PUB.sm.RunStep == StateMachine.ERunStep.GODOWN)
|
||||
{
|
||||
//이미 하차진행중에 누른 경우이다
|
||||
PUB.Result.NextPos = ePosition.QC;
|
||||
PUB.Result.TargetPos = ePosition.QC;
|
||||
}
|
||||
else
|
||||
{
|
||||
PUB.log.Add(Lang.QC이동버튼은상하차에서만사용가능합니다);
|
||||
PUB.Speak(Lang.하차상태에서만사용가능합니다);
|
||||
}
|
||||
}
|
||||
else PUB.Speak(Lang.자동운전상태가아닙니다);
|
||||
// //241203
|
||||
// if(PUB.AGV.system1.agv_run || PUB.AGV.system1.agv_run_manual)
|
||||
// {
|
||||
// PUB.AGV.AGVMoveStop("button1");
|
||||
// }
|
||||
// //PUB.XBE.NewMsgEvent('0', '1');
|
||||
// }
|
||||
// }
|
||||
// else if (diName == arDev.FakePLC.DIName.PINI_BTN_2) //auto -> QC //230424
|
||||
// {
|
||||
// if (e.NewValue == true)
|
||||
// {
|
||||
// PUB.log.Add($"버튼({diName}) 눌림");
|
||||
// if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == true)
|
||||
// {
|
||||
// if (PUB.sm.RunStep == StateMachine.ERunStep.GOUP)
|
||||
// {
|
||||
// //zup을 자동으로 해준다
|
||||
// if (VAR.BOOL[eVarBool.WAIT_COVER_UP])
|
||||
// {
|
||||
// PUB.log.Add($"버튼({diName}) 눌림");
|
||||
// PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP);
|
||||
// PUB.Result.NextPos = ePosition.QC;
|
||||
// }
|
||||
// else PUB.Speak(Lang.커버업대기상태가아닙니다);
|
||||
// }
|
||||
// else if (PUB.sm.RunStep == StateMachine.ERunStep.GODOWN)
|
||||
// {
|
||||
// //이미 하차진행중에 누른 경우이다
|
||||
// PUB.Result.NextPos = ePosition.QC;
|
||||
// PUB.Result.TargetPos = ePosition.QC;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// PUB.log.Add(Lang.QC이동버튼은상하차에서만사용가능합니다);
|
||||
// PUB.Speak(Lang.하차상태에서만사용가능합니다);
|
||||
// }
|
||||
// }
|
||||
// else PUB.Speak(Lang.자동운전상태가아닙니다);
|
||||
|
||||
//if (VAR.BOOL[eVarBool.FLAG_AUTORUN]==false)
|
||||
//{
|
||||
// PUB.sm.ClearRunStep();
|
||||
// PUB.sm.SetNewRunStep(StateMachine.ERunStep.READY);
|
||||
// PUB.sm.SetNewStep(StateMachine.eSMStep.RUN);
|
||||
// PUB.Speak("자동 상태로 전환 합니다");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// PUB.Speak("현재 자동 상태 입니다");
|
||||
//}
|
||||
}
|
||||
}
|
||||
else if (diName == arDev.FakePLC.DIName.PINI_BTN_3) //z-down -> QA //230424
|
||||
{
|
||||
if (e.NewValue == true)
|
||||
{
|
||||
//Z-dn기능으로 업데이트 230119
|
||||
PUB.log.Add($"버튼({diName}) 눌림");
|
||||
if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == true)
|
||||
{
|
||||
if (PUB.sm.RunStep == StateMachine.ERunStep.GOUP)
|
||||
{
|
||||
//zup.을 자동으로 해준다
|
||||
if (VAR.BOOL[eVarBool.WAIT_COVER_UP])
|
||||
{
|
||||
PUB.log.Add($"버튼({diName}) 눌림");
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP);
|
||||
PUB.Result.NextPos = ePosition.QA;
|
||||
}
|
||||
else PUB.Speak(Lang.커버업대기상태가아닙니다);
|
||||
}
|
||||
else if (PUB.sm.RunStep == StateMachine.ERunStep.GODOWN)
|
||||
{
|
||||
//이미 하차진행중에 누른 경우이다
|
||||
PUB.Result.NextPos = ePosition.QA;
|
||||
PUB.Result.TargetPos = ePosition.QA;
|
||||
}
|
||||
else
|
||||
{
|
||||
PUB.log.Add($"QA이동 버튼은 상/하차에서만 사용 가능합니다");
|
||||
PUB.Speak(Lang.하차상태에서만사용가능합니다);
|
||||
}
|
||||
}
|
||||
else PUB.Speak(Lang.자동운전상태가아닙니다);
|
||||
// //if (VAR.BOOL[eVarBool.FLAG_AUTORUN]==false)
|
||||
// //{
|
||||
// // PUB.sm.ClearRunStep();
|
||||
// // PUB.sm.SetNewRunStep(StateMachine.ERunStep.READY);
|
||||
// // PUB.sm.SetNewStep(StateMachine.eSMStep.RUN);
|
||||
// // PUB.Speak("자동 상태로 전환 합니다");
|
||||
// //}
|
||||
// //else
|
||||
// //{
|
||||
// // PUB.Speak("현재 자동 상태 입니다");
|
||||
// //}
|
||||
// }
|
||||
// }
|
||||
// else if (diName == arDev.FakePLC.DIName.PINI_BTN_3) //z-down -> QA //230424
|
||||
// {
|
||||
// if (e.NewValue == true)
|
||||
// {
|
||||
// //Z-dn기능으로 업데이트 230119
|
||||
// PUB.log.Add($"버튼({diName}) 눌림");
|
||||
// if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == true)
|
||||
// {
|
||||
// if (PUB.sm.RunStep == StateMachine.ERunStep.GOUP)
|
||||
// {
|
||||
// //zup.을 자동으로 해준다
|
||||
// if (VAR.BOOL[eVarBool.WAIT_COVER_UP])
|
||||
// {
|
||||
// PUB.log.Add($"버튼({diName}) 눌림");
|
||||
// PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP);
|
||||
// PUB.Result.NextPos = ePosition.QA;
|
||||
// }
|
||||
// else PUB.Speak(Lang.커버업대기상태가아닙니다);
|
||||
// }
|
||||
// else if (PUB.sm.RunStep == StateMachine.ERunStep.GODOWN)
|
||||
// {
|
||||
// //이미 하차진행중에 누른 경우이다
|
||||
// PUB.Result.NextPos = ePosition.QA;
|
||||
// PUB.Result.TargetPos = ePosition.QA;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// PUB.log.Add($"QA이동 버튼은 상/하차에서만 사용 가능합니다");
|
||||
// PUB.Speak(Lang.하차상태에서만사용가능합니다);
|
||||
// }
|
||||
// }
|
||||
// else PUB.Speak(Lang.자동운전상태가아닙니다);
|
||||
|
||||
//PUB.PLC.ZMot(FakePLC.ZMotDirection.Down);
|
||||
}
|
||||
}
|
||||
else if (diName == arDev.FakePLC.DIName.PINI_BTN_4) //z-up
|
||||
{
|
||||
if (e.NewValue == true)
|
||||
{
|
||||
//Z-up기능으로 업데이트 230119
|
||||
PUB.log.Add($"버튼({diName}) 눌림");
|
||||
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP);
|
||||
}
|
||||
}
|
||||
else if (diName == arDev.FakePLC.DIName.PINI_EMG)
|
||||
{
|
||||
if (e.NewValue == true)
|
||||
{
|
||||
PUB.log.Add($"버튼({diName}) 눌림");
|
||||
PUB.Speak(Lang.비상정지);
|
||||
}
|
||||
//else Pub.Speak("비상 정지 해제");
|
||||
}
|
||||
else if (diName == arDev.FakePLC.DIName.PINI_OVERLOADL)
|
||||
{
|
||||
if (e.NewValue == true)
|
||||
{
|
||||
PUB.log.Add($"버튼({diName}) 눌림");
|
||||
PUB.Speak(Lang.오버로드감지);
|
||||
}
|
||||
VAR.BOOL[eVarBool.OVERLOADL] = e.NewValue;
|
||||
}
|
||||
else if (diName == arDev.FakePLC.DIName.PINI_OVERLOADR)
|
||||
{
|
||||
if (e.NewValue == true)
|
||||
{
|
||||
PUB.log.Add($"버튼({diName}) 눌림");
|
||||
PUB.Speak(Lang.오버로드감지);
|
||||
}
|
||||
VAR.BOOL[eVarBool.OVERLOADR] = e.NewValue;
|
||||
}
|
||||
//else if (diName == FakePLC.DIName.PINI_LIMIT_LU)
|
||||
//{
|
||||
// PUB.flag.set(EFlag.FLAG_LIMITHIGHL, e.NewValue);
|
||||
//}
|
||||
//else if (diName == FakePLC.DIName.PINI_LIMIT_RU)
|
||||
//{
|
||||
// PUB.flag.set(EFlag.FLAG_LIMITHIGHR, e.NewValue);
|
||||
//}
|
||||
//else if (diName == FakePLC.DIName.PINI_LIMIT_LD)
|
||||
//{
|
||||
// PUB.flag.set(EFlag.FLAG_LIMITLOWL, e.NewValue);
|
||||
//}
|
||||
//else if (diName == FakePLC.DIName.PINI_LIMIT_RD)
|
||||
//{
|
||||
// PUB.flag.set(EFlag.FLAG_LIMITLOWR, e.NewValue);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// //처리하지 않음
|
||||
//}
|
||||
//PUB.flag.set(EFlag.FLAG_LIMITHIGH, (PUB.flag.get(EFlag.FLAG_LIMITHIGHL) && PUB.flag.get(EFlag.FLAG_LIMITHIGHR)));
|
||||
//PUB.flag.set(EFlag.FLAG_LIMITLOW, (PUB.flag.get(EFlag.FLAG_LIMITLOWL) && PUB.flag.get(EFlag.FLAG_LIMITLOWR)));
|
||||
VAR.BOOL[eVarBool.FLAG_LIMITHIGH] = false;// PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) || PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU);
|
||||
VAR.BOOL[eVarBool.FLAG_LIMITLOW] = false;//PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LD) || PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RD);
|
||||
VAR.BOOL[eVarBool.OVERLOAD] = (VAR.BOOL[eVarBool.OVERLOADL] || VAR.BOOL[eVarBool.OVERLOADR]);
|
||||
}
|
||||
else
|
||||
{
|
||||
//출력포트값 변경
|
||||
var doName = (arDev.FakePLC.DOName)e.ArrIDX;
|
||||
PUB.logplc.Add($"출력({doName}) {(e.NewValue ? "O" : "X")}");
|
||||
}
|
||||
}
|
||||
// //PUB.PLC.ZMot(FakePLC.ZMotDirection.Down);
|
||||
// }
|
||||
// }
|
||||
// else if (diName == arDev.FakePLC.DIName.PINI_BTN_4) //z-up
|
||||
// {
|
||||
// if (e.NewValue == true)
|
||||
// {
|
||||
// //Z-up기능으로 업데이트 230119
|
||||
// PUB.log.Add($"버튼({diName}) 눌림");
|
||||
// PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP);
|
||||
// }
|
||||
// }
|
||||
// else if (diName == arDev.FakePLC.DIName.PINI_EMG)
|
||||
// {
|
||||
// if (e.NewValue == true)
|
||||
// {
|
||||
// PUB.log.Add($"버튼({diName}) 눌림");
|
||||
// PUB.Speak(Lang.비상정지);
|
||||
// }
|
||||
// //else Pub.Speak("비상 정지 해제");
|
||||
// }
|
||||
// else if (diName == arDev.FakePLC.DIName.PINI_OVERLOADL)
|
||||
// {
|
||||
// if (e.NewValue == true)
|
||||
// {
|
||||
// PUB.log.Add($"버튼({diName}) 눌림");
|
||||
// PUB.Speak(Lang.오버로드감지);
|
||||
// }
|
||||
// VAR.BOOL[eVarBool.OVERLOADL] = e.NewValue;
|
||||
// }
|
||||
// else if (diName == arDev.FakePLC.DIName.PINI_OVERLOADR)
|
||||
// {
|
||||
// if (e.NewValue == true)
|
||||
// {
|
||||
// PUB.log.Add($"버튼({diName}) 눌림");
|
||||
// PUB.Speak(Lang.오버로드감지);
|
||||
// }
|
||||
// VAR.BOOL[eVarBool.OVERLOADR] = e.NewValue;
|
||||
// }
|
||||
// //else if (diName == FakePLC.DIName.PINI_LIMIT_LU)
|
||||
// //{
|
||||
// // PUB.flag.set(EFlag.FLAG_LIMITHIGHL, e.NewValue);
|
||||
// //}
|
||||
// //else if (diName == FakePLC.DIName.PINI_LIMIT_RU)
|
||||
// //{
|
||||
// // PUB.flag.set(EFlag.FLAG_LIMITHIGHR, e.NewValue);
|
||||
// //}
|
||||
// //else if (diName == FakePLC.DIName.PINI_LIMIT_LD)
|
||||
// //{
|
||||
// // PUB.flag.set(EFlag.FLAG_LIMITLOWL, e.NewValue);
|
||||
// //}
|
||||
// //else if (diName == FakePLC.DIName.PINI_LIMIT_RD)
|
||||
// //{
|
||||
// // PUB.flag.set(EFlag.FLAG_LIMITLOWR, e.NewValue);
|
||||
// //}
|
||||
// //else
|
||||
// //{
|
||||
// // //처리하지 않음
|
||||
// //}
|
||||
// //PUB.flag.set(EFlag.FLAG_LIMITHIGH, (PUB.flag.get(EFlag.FLAG_LIMITHIGHL) && PUB.flag.get(EFlag.FLAG_LIMITHIGHR)));
|
||||
// //PUB.flag.set(EFlag.FLAG_LIMITLOW, (PUB.flag.get(EFlag.FLAG_LIMITLOWL) && PUB.flag.get(EFlag.FLAG_LIMITLOWR)));
|
||||
// VAR.BOOL[eVarBool.FLAG_LIMITHIGH] = false;// PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) || PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU);
|
||||
// VAR.BOOL[eVarBool.FLAG_LIMITLOW] = false;//PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LD) || PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RD);
|
||||
// VAR.BOOL[eVarBool.OVERLOAD] = (VAR.BOOL[eVarBool.OVERLOADL] || VAR.BOOL[eVarBool.OVERLOADR]);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //출력포트값 변경
|
||||
// var doName = (arDev.FakePLC.DOName)e.ArrIDX;
|
||||
// PUB.logplc.Add($"출력({doName}) {(e.NewValue ? "O" : "X")}");
|
||||
// }
|
||||
//}
|
||||
|
||||
//string oldflagmessage = string.Empty;
|
||||
string lastplclogmessage = "";
|
||||
DateTime lastplclogtime = DateTime.Now;
|
||||
string logmessage = "";
|
||||
bool logerror = false;
|
||||
|
||||
// 사용하지 않는 필드들 제거
|
||||
// private string logmessage;
|
||||
// private string lastplclogmessage;
|
||||
// private string logerror;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,11 +98,11 @@ namespace Project
|
||||
|
||||
}
|
||||
|
||||
void PLC_FlagChanged(object sender, arDev.Arduino.DIO.FlagValueEventArgs e)
|
||||
{
|
||||
//플래그 상태표시는 메인의 타이머를 이용한다
|
||||
// var flag = (arDev.FakePLC.PLCFlag)e.ArrIDX;
|
||||
PUB.log.Add($"PLC Flag Changed {e.ArrIDX} : {e.NewValue}");
|
||||
}
|
||||
//void PLC_FlagChanged(object sender, arDev.Arduino.DIO.FlagValueEventArgs e)
|
||||
//{
|
||||
// //플래그 상태표시는 메인의 타이머를 이용한다
|
||||
// // var flag = (arDev.FakePLC.PLCFlag)e.ArrIDX;
|
||||
// PUB.log.Add($"PLC Flag Changed {e.ArrIDX} : {e.NewValue}");
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using arCtl;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using System.Windows.Forms;
|
||||
using Project.ViewForm;
|
||||
@@ -77,7 +77,7 @@ namespace Project
|
||||
}
|
||||
|
||||
|
||||
void sm_Running(object sender, StateMachine.RunningEventArgs e)
|
||||
void sm_Running(object sender, StateMachine.StateMachine.RunningEventArgs e)
|
||||
{
|
||||
|
||||
//창을 닫아야하는 상황에는 처리하지 않는다.
|
||||
@@ -352,7 +352,7 @@ namespace Project
|
||||
}
|
||||
}
|
||||
|
||||
void sm_Message(object sender, StateMachine.StateMachineMessageEventArgs e)
|
||||
void sm_Message(object sender, StateMachine.StateMachine.StateMachineMessageEventArgs e)
|
||||
{
|
||||
//상태머신에서 발생한 메세지
|
||||
if (e.Header != "SM-STEP")
|
||||
@@ -360,7 +360,7 @@ namespace Project
|
||||
}
|
||||
|
||||
|
||||
void sm_StepChanged(object sender, StateMachine.StepChangeEventArgs e)
|
||||
void sm_StepChanged(object sender, StateMachine.StateMachine.StepChangeEventArgs e)
|
||||
{
|
||||
//상태머신의 스텝이 변경될때 발생함
|
||||
//Pub.log.Add(string.Format("SM:Step Changed {0} to {1}",e.Old,e.New));
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Text;
|
||||
using AR;
|
||||
using arCtl;
|
||||
using COMM;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using COMM;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using static Project.StateMachine;
|
||||
using Project.StateMachine;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
@@ -421,8 +421,8 @@ namespace Project
|
||||
/// </summary>
|
||||
void Update_Music()
|
||||
{
|
||||
|
||||
if (PUB.mplayer != null && PUB.mplayer.HasAudio && PUB.bPlayMusic)
|
||||
if (PUB.mplayer == null) return;
|
||||
if (PUB.mplayer != null && !string.IsNullOrEmpty(PUB.mplayer.SoundLocation) && PUB.bPlayMusic)
|
||||
{
|
||||
if (PUB.AGV.system1.agv_run == false)
|
||||
{
|
||||
@@ -434,7 +434,7 @@ namespace Project
|
||||
|
||||
}
|
||||
}
|
||||
else if (PUB.setting.Enable_Music && PUB.mplayer != null && PUB.mplayer.HasAudio)
|
||||
else if (PUB.setting.Enable_Music && PUB.mplayer != null && !string.IsNullOrEmpty(PUB.mplayer.SoundLocation))
|
||||
{
|
||||
if (PUB.AGV.system1.agv_run == true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user