读取M点

dep_deliver
我叫锄头 12 months ago
parent 1f5bb30a38
commit 33efbf0661

@ -79,6 +79,9 @@ namespace Mesnac.Action.ChemicalWeighing.Test
private void MCButton_Click(object sender, EventArgs e) private void MCButton_Click(object sender, EventArgs e)
{ {
var list= MReadHelp.Read();
DB120WriteHelp.AddABCDEF(new Uhd() DB120WriteHelp.AddABCDEF(new Uhd()
{ {
A = 60, A = 60,

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataBlockHelper.DBHelpers
{
public class MReadHelp
{
public static List<bool> Read()
{
var p= PlcConnect.Instance;
string m = "M1003.4";
List<bool> result = new List<bool>();
result.Add(p.ReadBool("M1003.4").Content);
result.Add(p.ReadBool("M1004.4").Content);
result.Add(p.ReadBool("M1006.4").Content);
result.Add(p.ReadBool("M1007.4").Content);
result.Add(p.ReadBool("M1009.4").Content);
result.Add(p.ReadBool("M1010.4").Content);
return result;
}
}
}

@ -72,6 +72,7 @@
<Compile Include="DBHelpers\DB92Help.cs" /> <Compile Include="DBHelpers\DB92Help.cs" />
<Compile Include="DBHelpers\DB92WriterHelp.cs" /> <Compile Include="DBHelpers\DB92WriterHelp.cs" />
<Compile Include="DBHelpers\DBHelper.cs" /> <Compile Include="DBHelpers\DBHelper.cs" />
<Compile Include="DBHelpers\MReadHelp.cs" />
<Compile Include="DbWrite\PlcWriteUtil.cs" /> <Compile Include="DbWrite\PlcWriteUtil.cs" />
<Compile Include="Entity\ClickEntity.cs" /> <Compile Include="Entity\ClickEntity.cs" />
<Compile Include="Entity\DB1Entity\ForAnaLogIn.cs" /> <Compile Include="Entity\DB1Entity\ForAnaLogIn.cs" />

Loading…
Cancel
Save