change - ForTest

CFXTest
SoulStar 3 months ago
parent b340b4c216
commit e966f2b130

@ -23,29 +23,29 @@ namespace Sln.Iot.CFX.CFXBusiness
/// <returns></returns>
public CommonProcessData ProcessDataGet1(UnitsProcess1Entity entity)
{
//entity = new UnitsProcess1Entity()
//{
// GlueAmountSetValue1 = 123.4f,
// GluePushSpeedSetValue1 = 10.1f,
// BarrelA1TempActValue1 = 60,
// BarrelA2TempActValue1 = 60,
// BarrelB1TempActValue1 = 60,
// BarrelB2TempActValue1 = 60,
// PumpAPressureActValue1 = 3.5f,
// PumpBPressureActValue1 = 3.2f,
// VacuumDegreeActValue1 = 3000.4f,
// PressureHoldTimeSetValue1 = 100,
// GlueAmountSetValue2 = 123.4f,
// GluePushSpeedSetValue2 = 10.1f,
// BarrelA1TempActValue2 = 60,
// BarrelA2TempActValue2 = 60,
// BarrelB1TempActValue2 = 60,
// BarrelB2TempActValue2 = 60,
// PumpAPressureActValue2 = 3.5f,
// PumpBPressureActValue2 = 3.2f,
// VacuumDegreeActValue2 = 3000.4f,
// PressureHoldTimeSetValue2 = 100,
//};
entity = new UnitsProcess1Entity()
{
GlueAmountSetValue1 = 123.4f,
GluePushSpeedSetValue1 = 10.1f,
BarrelA1TempActValue1 = 60,
BarrelA2TempActValue1 = 60,
BarrelB1TempActValue1 = 60,
BarrelB2TempActValue1 = 60,
PumpAPressureActValue1 = 3.5f,
PumpBPressureActValue1 = 3.2f,
VacuumDegreeActValue1 = 3000.4f,
PressureHoldTimeSetValue1 = 100,
GlueAmountSetValue2 = 123.4f,
GluePushSpeedSetValue2 = 10.1f,
BarrelA1TempActValue2 = 60,
BarrelA2TempActValue2 = 60,
BarrelB1TempActValue2 = 60,
BarrelB2TempActValue2 = 60,
PumpAPressureActValue2 = 3.5f,
PumpBPressureActValue2 = 3.2f,
VacuumDegreeActValue2 = 3000.4f,
PressureHoldTimeSetValue2 = 100,
};
CommonProcessData processData = new CommonProcessData()
{
@ -230,18 +230,18 @@ namespace Sln.Iot.CFX.CFXBusiness
/// <returns></returns>
public CommonProcessData ProcessDataGet3(UnitsProcess3Entity entity)
{
//entity = new UnitsProcess3Entity()
//{
// PreheatOvenTempActValue = 800,
// PreCureOven1TempActValue = 800,
// PreCureOven2TempActValue = 800,
// PreCureOven3TempActValue = 800,
// PreCureOven4TempActValue = 800,
// CureOven1TempActValue = 800,
// CureOven2TempActValue = 800,
// CureOven3TempActValue = 800,
// CureOven4TempActValue = 800,
//};
entity = new UnitsProcess3Entity()
{
PreheatOvenTempActValue = 800,
PreCureOven1TempActValue = 800,
PreCureOven2TempActValue = 800,
PreCureOven3TempActValue = 800,
PreCureOven4TempActValue = 800,
CureOven1TempActValue = 800,
CureOven2TempActValue = 800,
CureOven3TempActValue = 800,
CureOven4TempActValue = 800,
};
CommonProcessData processData = new CommonProcessData()
{

@ -48,27 +48,27 @@ public class GetActiveFaultsRequestReceived1 : BaseGetActiveFaultsRequestReceive
public override CFXMessage SubHandle(GetActiveFaultsRequest request)
{
// 获取现在所有的错误
var errorList1 = errorService.GetV1List().ToList();
var errorList2 = errorService.GetV2List().ToList();
//var errorList1 = errorService.GetV1List().ToList();
//var errorList2 = errorService.GetV2List().ToList();
List<Fault> faults = new List<Fault>();
//List<Fault> faults = new List<Fault>();
foreach (var fault in errorList1)
{
faults.Add(new Fault()
{
Description = fault.ErrorName,
FaultCode = fault.ErrorCode,
});
}
foreach (var fault in errorList2)
{
faults.Add(new Fault()
{
Description = fault.ErrorName,
FaultCode = fault.ErrorCode,
});
}
//foreach (var fault in errorList1)
//{
// faults.Add(new Fault()
// {
// Description = fault.ErrorName,
// FaultCode = fault.ErrorCode,
// });
//}
//foreach (var fault in errorList2)
//{
// faults.Add(new Fault()
// {
// Description = fault.ErrorName,
// FaultCode = fault.ErrorCode,
// });
//}
CFXMessage response = new GetActiveFaultsResponse()
{

@ -48,18 +48,18 @@ public class GetActiveFaultsRequestReceived2 : BaseGetActiveFaultsRequestReceive
public override CFXMessage SubHandle(GetActiveFaultsRequest request)
{
// 获取现在所有的错误
var errorList = errorService.GetLiftList().ToList();
//var errorList = errorService.GetLiftList().ToList();
List<Fault> faults = new List<Fault>();
//List<Fault> faults = new List<Fault>();
foreach (var fault in errorList)
{
faults.Add(new Fault()
{
Description = fault.ErrorName,
FaultCode = fault.ErrorCode,
});
}
//foreach (var fault in errorList)
//{
// faults.Add(new Fault()
// {
// Description = fault.ErrorName,
// FaultCode = fault.ErrorCode,
// });
//}
CFXMessage response = new GetActiveFaultsResponse()
{

@ -50,16 +50,16 @@ public class GetActiveFaultsRequestReceived3 : BaseGetActiveFaultsRequestReceive
// 获取现在所有的错误
var errorList = errorService.GetOvenList().ToList();
List<Fault> faults = new List<Fault>();
//List<Fault> faults = new List<Fault>();
foreach (var fault in errorList)
{
faults.Add(new Fault()
{
Description = fault.ErrorName,
FaultCode = fault.ErrorCode,
});
}
//foreach (var fault in errorList)
//{
// faults.Add(new Fault()
// {
// Description = fault.ErrorName,
// FaultCode = fault.ErrorCode,
// });
//}
CFXMessage response = new GetActiveFaultsResponse()
{

@ -54,18 +54,18 @@ public class GetActiveRecipeRequestReceived1 : BaseGetActiveRecipeRequestReceive
string restr1 = string.Empty;
string restr2 = string.Empty;
//获取现在激活的配方
var res1 = _plc.ReadBytes(_plc.DeltaInstance1, "D600", 10);
var res2 = _plc.ReadBytes(_plc.DeltaInstance2, "D600", 10);
////获取现在激活的配方
//var res1 = _plc.ReadBytes(_plc.DeltaInstance1, "D600", 10);
//var res2 = _plc.ReadBytes(_plc.DeltaInstance2, "D600", 10);
if (res1.IsSuccess)
{
restr1 = Encoding.ASCII.GetString(res1.Content);
}
if (res2.IsSuccess)
{
restr2 = Encoding.ASCII.GetString(res2.Content);
}
//if (res1.IsSuccess)
//{
// restr1 = Encoding.ASCII.GetString(res1.Content);
//}
//if (res2.IsSuccess)
//{
// restr2 = Encoding.ASCII.GetString(res2.Content);
//}
CFXMessage response = new GetActiveRecipeResponse()
{

@ -61,21 +61,21 @@ namespace Sln.Iot
//配置文件加载
var appConfig = AppConfigSetting.Load();
//PLC连接初始化
PLCConnect.Instance.InitConnect();
//PLCConnect.Instance.InitConnect();
//CFX接口启动
//真空注胶机
CFXConnect1.Instance.Init("CFX.A00.SDSH000001",
new Uri("amqp://127.0.0.1:1235"),
new Uri("amqp://127.0.0.1:30031"));
//升降回流
CFXConnect2.Instance.Init("CFX.A00.SDSH000002",
new Uri("amqp://127.0.0.1:1236"),
new Uri("amqp://127.0.0.1:30031"));
//隧道烤箱
CFXConnect3.Instance.Init("CFX.A00.SDSH000003",
new Uri("amqp://127.0.0.1:1237"),
new Uri("amqp://127.0.0.1:30031"));
////CFX接口启动
////真空注胶机
//CFXConnect1.Instance.Init("CFX.A00.SDSH000001",
// new Uri("amqp://127.0.0.1:1235"),
// new Uri("amqp://127.0.0.1:30031"));
////升降回流
//CFXConnect2.Instance.Init("CFX.A00.SDSH000002",
// new Uri("amqp://127.0.0.1:1236"),
// new Uri("amqp://127.0.0.1:30031"));
////隧道烤箱
//CFXConnect3.Instance.Init("CFX.A00.SDSH000003",
// new Uri("amqp://127.0.0.1:1237"),
// new Uri("amqp://127.0.0.1:30031"));
////CFX接口启动
@ -94,12 +94,14 @@ namespace Sln.Iot
//业务类启动
BusinessStart business = new BusinessStart();
//BusinessStart business = new BusinessStart();
log.Info($"系统启动成功,日志存放位置:{appConfig.logPath}");
//CFXTest cFXTest = new CFXTest();
//cFXTest.Test1();
CFXTest cFXTest = new CFXTest();
cFXTest.Test1();
cFXTest.Test2();
cFXTest.Test3();
//TestBusiness test = new TestBusiness();

Loading…
Cancel
Save