# Conflicts:
#	DataBlockHelper/PlcConnect.cs
dep
wangsr 12 months ago
commit dfe11b1a2a

@ -296,10 +296,11 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
ControlsHelper.SetMCLabel(LabelE.LineKind8, dict[8]);
}
ReadFlag += 1;
if(ReadFlag >= 10)
if(ReadFlag >= 30)
{
ReadFlag = 0;
ReportReadDb.ReadFeededDry();
}
var reachSingle = RgvPlcUtil.GetRGVAllError();

@ -35,7 +35,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report
/// </summary>
public static void ReadFeededDry()
{
LoggingService<ReportReadDb>.Debug("读取加料信息" + DateTime.Now.ToString());
DB2105Helper dB2105Helper = new DB2105Helper();
List<bool> list = dB2105Helper.FeededDryList();
@ -58,7 +58,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report
public static void ReadReport()
{
LoggingService<ReportReadDb>.InfoFormatted("开始读取报表");
DB2107Helper dB2107Helper = new DB2107Helper();
NormalStatusEntity normal = dB2107Helper.NormalStatus;
if (normal.RdyRpt_D1)

@ -670,7 +670,6 @@ namespace DataBlockHelper.DBHelpers
/// true 状态是停止
/// </summary>
/// <returns></returns>
public static List<bool> GetWaterStatus()
{
var siemensS7Net = PlcConnect.Instance;

@ -12,6 +12,11 @@ namespace DataBlockHelper.Entity.DB2119Entity
{
// OperateResult<byte[]> read = PlcConnect.Instance.Read("DB2102." + startSet + ".0", 2);
if(null== bytes)
{
return;
}
byte[] content = bytes.Skip(startSet).Take(22).ToArray();
Value_Set = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);

@ -12,6 +12,10 @@ namespace DataBlockHelper.Entity.DB2119Entity
{
// OperateResult<byte[]> read = PlcConnect.Instance.Read("DB2102." + startSet + ".0", 2);
if(null == bytes)
{
return;
}
byte[] content = bytes.Skip(startSet).Take(10).ToArray();
Value_Set = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);

@ -27,8 +27,9 @@ namespace DataBlockHelper
SiemensPLCS siemensPLCS = SiemensPLCS.S1500;
SiemensS7Net s7 = new SiemensS7Net(siemensPLCS);
s7.SetPersistentConnection();
//s7.IpAddress = "172.18.4.100";
s7.IpAddress = "192.168.4.100";
s7.IpAddress = "172.18.4.100";
//s7.IpAddress = "192.168.1.110";
s7.Port = 102;
var su = s7.ConnectServer();

Loading…
Cancel
Save