TestAction

master
nodyang 1 year ago
parent 7cd2db0e45
commit e068ae7bb0

@ -3116,5 +3116,10 @@ namespace Mesnac.Action.ChemicalWeighing
public DataKeyValue test { get; set; }
public DataKeyValue tst0 { get; set; }
public DataKeyValue tst1 { get; set; }
public DataKeyValue tst2 { get; set; }
}
}

@ -52,8 +52,52 @@ namespace Mesnac.Action.ChemicalWeighing.Test
// var read = BasePlcHelper.Instance.PlcRead(instanceRecipeName0, out int[] ss);
// var firstWordNowValue = BasePlcHelper.Instance.FirstWord.NowValue.ToInt();
var plcRead = BasePlcHelper.Instance.PlcRead("ParametersWithPc", "1165", 0, 1, out short[] ssss);
//192.168.153.100
var firstWordNowValue = BasePlcHelper.Instance.test;
var a = BasePlcHelper.Instance.tst0;
var b = BasePlcHelper.Instance.tst1;
var bs = BasePlcHelper.Instance.tst2;
var bo = BasePlcHelper.Instance.PlcRead("ParametersWithPc", "3", 0, 1, out short[] aaaaa);
var aa = Mesnac.Basic.DataProcessor.Swap(aaaaa[0]); //注意西门子PLC需要高低位转换
var qq = Convert.ToBoolean(aa);
//
//
//
//
// var aa = Mesnac.Basic.DataProcessor.Swap(aaaaa[0]); //注意西门子PLC需要高低位转换
//
// var bytesa = BitConverter.GetBytes(aa);
//
// bool[] bitsa = new bool[8];
//
// for (int i = 0; i < 8; i++)
// {
// bitsa[i] = (bytesa[0] & (1 << i)) != 0;
// }
var plcReadds = BasePlcHelper.Instance.PlcRead("ParametersWithPc", "3", 1, 1, out short[] bbbb);
var bSwap = Mesnac.Basic.DataProcessor.Swap(bbbb[0]); //注意西门子PLC需要高低位转换
var bytesa = BitConverter.GetBytes(bSwap);
bool[] bits = new bool[8];
for (int i = 0; i <8; i++)
{
bits[i] = (bytesa[0] & (1 << i)) != 0;
}
bool[] bits2 = new bool[8];
for (int i = 0; i <8; i++)
{
bits2[i] = (bytesa[1] & (1 << i)) != 0;
}
var ss = "asdf";
//
// short test = ssss[0];
// var bytes = BitConverter.GetBytes(test);
@ -63,8 +107,9 @@ namespace Mesnac.Action.ChemicalWeighing.Test
// DataKeyValue dataKeyRecipePause = new DataKeyValue("RecipePause");
//
// bool Save3thActs = BasePlcHelper.Instance.PlcRead(dataKeyRecipePause, out int[] ghPcSave3ThActs);
// var swap = DataProcessor.Swap(ghPcSave3ThActs[0]);
// DataProcessor.ParseBinaryValue()
// var recipePause = BasePlcHelper.Instance.RecipePause.NowValue.ToInt();
@ -85,11 +130,11 @@ namespace Mesnac.Action.ChemicalWeighing.Test
//256 default-bit(11
DbMCControl binGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "MCLabel153").FirstOrDefault();
var comboBox1 = base.GetControlById("MCButton1") as System.Windows.Forms.Button;
var comboBox1s = base.GetControlById("MCButton1") as Mesnac.Controls.Default.Button;
// DbMCControl binGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "MCLabel153").FirstOrDefault();
//
//
// var comboBox1 = base.GetControlById("MCButton1") as System.Windows.Forms.Button;
// var comboBox1s = base.GetControlById("MCButton1") as Mesnac.Controls.Default.Button;
// List<DbMCControl> mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件
// IBaseControl startdate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "startdate").FirstOrDefault().BaseControl;
@ -105,7 +150,7 @@ namespace Mesnac.Action.ChemicalWeighing.Test
ShowMsg("小料Action事件测试", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
ShowMsg("小料Action1事件测试", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

File diff suppressed because it is too large Load Diff

@ -15,6 +15,10 @@
<Property name="Size">56, 26</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.ThreeWayValve, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="ThreeWayValve2" children="Controls">
<Property name="ZLTName" />
<Property name="ZLDName" />
<Property name="ALMTName" />
<Property name="ALMDName" />
<Property name="Location">419, 617</Property>
<Property name="Name">ThreeWayValve2</Property>
<Property name="Size">101, 51</Property>
@ -48,6 +52,10 @@
<Property name="Size">13, 13</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.ThreeWayValve, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="ThreeWayValve1" children="Controls">
<Property name="ZLTName" />
<Property name="ZLDName" />
<Property name="ALMTName" />
<Property name="ALMDName" />
<Property name="Location">211, 599</Property>
<Property name="Name">ThreeWayValve1</Property>
<Property name="Size">56, 60</Property>
@ -633,7 +641,7 @@
</Object>
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCButton1" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nR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-652,7 +660,7 @@
<Property name="Text">MCButton1</Property>
<Property name="Location">505, 364</Property>
<Property name="Name">MCButton1</Property>
<Property name="Size">75, 23</Property>
<Property name="Size">161, 178</Property>
<Property name="TabIndex">66</Property>
</Object>
<Object type="System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="Panel2" children="Controls">

Loading…
Cancel
Save