|
|
@ -66,7 +66,7 @@ namespace Aucma.Core.DoorFoam.Business
|
|
|
|
// ReadModeType(obj, "DB4.942", BoxTypeList);
|
|
|
|
// ReadModeType(obj, "DB4.942", BoxTypeList);
|
|
|
|
// ReadModeType(obj, "DB4.1142", BoxTypeList);
|
|
|
|
// ReadModeType(obj, "DB4.1142", BoxTypeList);
|
|
|
|
// 31-34
|
|
|
|
// 31-34
|
|
|
|
// ReadModeTypeLast(obj, "DB4.1342", BoxTypeList);
|
|
|
|
ReadModeTypeLast(obj, "DB4.1342", BoxTypeList);
|
|
|
|
|
|
|
|
|
|
|
|
// ReadModeProduct(obj, "DB4.1542", BoxTypeList);
|
|
|
|
// ReadModeProduct(obj, "DB4.1542", BoxTypeList);
|
|
|
|
// ReadModeProduct(obj, "DB4.1702", BoxTypeList);
|
|
|
|
// ReadModeProduct(obj, "DB4.1702", BoxTypeList);
|
|
|
@ -193,30 +193,30 @@ namespace Aucma.Core.DoorFoam.Business
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (obj.plc.IsConnected)
|
|
|
|
if (obj.plc.IsConnected)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
byte[] info = obj.plc.Read(startStr, 200);
|
|
|
|
byte[] info = obj.plc.Read(startStr, 202);
|
|
|
|
if (info == null) return;
|
|
|
|
if (info == null) return;
|
|
|
|
//1#台车1#枪A门,1#台车1#枪B门,1#台车2#枪A门,1#台车2#枪B门
|
|
|
|
//1#台车1#枪A门,1#台车1#枪B门,1#台车2#枪A门,1#台车2#枪B门
|
|
|
|
|
|
|
|
|
|
|
|
string temp1 = asciiEncoding.GetString(info.Skip(0).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp1 = asciiEncoding.GetString(info.Skip(2).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp2 = asciiEncoding.GetString(info.Skip(10).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp2 = asciiEncoding.GetString(info.Skip(12).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp3 = asciiEncoding.GetString(info.Skip(20).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp3 = asciiEncoding.GetString(info.Skip(22).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp4 = asciiEncoding.GetString(info.Skip(30).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp4 = asciiEncoding.GetString(info.Skip(32).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp5 = asciiEncoding.GetString(info.Skip(40).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp5 = asciiEncoding.GetString(info.Skip(42).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp6 = asciiEncoding.GetString(info.Skip(50).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp6 = asciiEncoding.GetString(info.Skip(52).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp7 = asciiEncoding.GetString(info.Skip(60).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp7 = asciiEncoding.GetString(info.Skip(62).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp8 = asciiEncoding.GetString(info.Skip(70).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp8 = asciiEncoding.GetString(info.Skip(72).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp9 = asciiEncoding.GetString(info.Skip(80).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp9 = asciiEncoding.GetString(info.Skip(82).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp10 = asciiEncoding.GetString(info.Skip(90).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp10 = asciiEncoding.GetString(info.Skip(92).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp11 = asciiEncoding.GetString(info.Skip(100).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp11 = asciiEncoding.GetString(info.Skip(102).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp12 = asciiEncoding.GetString(info.Skip(110).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp12 = asciiEncoding.GetString(info.Skip(112).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp13 = asciiEncoding.GetString(info.Skip(120).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp13 = asciiEncoding.GetString(info.Skip(122).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp14 = asciiEncoding.GetString(info.Skip(130).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp14 = asciiEncoding.GetString(info.Skip(132).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp15 = asciiEncoding.GetString(info.Skip(140).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp15 = asciiEncoding.GetString(info.Skip(142).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp16 = asciiEncoding.GetString(info.Skip(150).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp16 = asciiEncoding.GetString(info.Skip(152).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp17 = asciiEncoding.GetString(info.Skip(160).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp17 = asciiEncoding.GetString(info.Skip(162).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp18 = asciiEncoding.GetString(info.Skip(170).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp18 = asciiEncoding.GetString(info.Skip(172).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp19 = asciiEncoding.GetString(info.Skip(180).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp19 = asciiEncoding.GetString(info.Skip(182).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp20 = asciiEncoding.GetString(info.Skip(190).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp20 = asciiEncoding.GetString(info.Skip(192).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
Console.WriteLine(temp20);
|
|
|
|
Console.WriteLine(temp20);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -232,26 +232,26 @@ namespace Aucma.Core.DoorFoam.Business
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (obj.plc.IsConnected)
|
|
|
|
if (obj.plc.IsConnected)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
byte[] info = obj.plc.Read(startStr, 160);
|
|
|
|
byte[] info = obj.plc.Read(startStr, 162);
|
|
|
|
if (info == null) return;
|
|
|
|
if (info == null) return;
|
|
|
|
//1#台车1#枪A门,1#台车1#枪B门,1#台车2#枪A门,1#台车2#枪B门
|
|
|
|
//1#台车1#枪A门,1#台车1#枪B门,1#台车2#枪A门,1#台车2#枪B门
|
|
|
|
|
|
|
|
|
|
|
|
string temp1 = asciiEncoding.GetString(info.Skip(0).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp1 = asciiEncoding.GetString(info.Skip(2).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp2 = asciiEncoding.GetString(info.Skip(10).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp2 = asciiEncoding.GetString(info.Skip(12).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp3 = asciiEncoding.GetString(info.Skip(20).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp3 = asciiEncoding.GetString(info.Skip(22).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp4 = asciiEncoding.GetString(info.Skip(30).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp4 = asciiEncoding.GetString(info.Skip(32).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp5 = asciiEncoding.GetString(info.Skip(40).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp5 = asciiEncoding.GetString(info.Skip(42).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp6 = asciiEncoding.GetString(info.Skip(50).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp6 = asciiEncoding.GetString(info.Skip(52).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp7 = asciiEncoding.GetString(info.Skip(60).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp7 = asciiEncoding.GetString(info.Skip(62).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp8 = asciiEncoding.GetString(info.Skip(70).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp8 = asciiEncoding.GetString(info.Skip(72).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp9 = asciiEncoding.GetString(info.Skip(80).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp9 = asciiEncoding.GetString(info.Skip(82).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp10 = asciiEncoding.GetString(info.Skip(90).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp10 = asciiEncoding.GetString(info.Skip(92).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp11 = asciiEncoding.GetString(info.Skip(100).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp11 = asciiEncoding.GetString(info.Skip(102).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp12 = asciiEncoding.GetString(info.Skip(110).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp12 = asciiEncoding.GetString(info.Skip(112).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp13 = asciiEncoding.GetString(info.Skip(120).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp13 = asciiEncoding.GetString(info.Skip(122).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp14 = asciiEncoding.GetString(info.Skip(130).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp14 = asciiEncoding.GetString(info.Skip(132).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp15 = asciiEncoding.GetString(info.Skip(140).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp15 = asciiEncoding.GetString(info.Skip(142).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
string temp16 = asciiEncoding.GetString(info.Skip(150).Take(10).ToArray()).Trim('\n');
|
|
|
|
string temp16 = asciiEncoding.GetString(info.Skip(152).Take(10).ToArray()).Trim('\n').Trim('\0');
|
|
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(temp16);
|
|
|
|
Console.WriteLine(temp16);
|
|
|
|
|
|
|
|
|
|
|
|