Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
IonicContaminationTest
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ea9a9c14
由
刘韬
编写于
2025-07-03 09:20:24 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
清洗流程加上try等待反馈未知错误
1 个父辈
25d5a1d2
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
27 行增加
和
4 行删除
App/NewCode/FrmTestManage2.cs
App/Properties/AssemblyInfo.cs
MachineDll/MachineControllor.cs
MachineDll/TheMachine.cs
App/NewCode/FrmTestManage2.cs
查看文件 @
ea9a9c1
此文件类型无法预览
App/Properties/AssemblyInfo.cs
查看文件 @
ea9a9c1
...
...
@@ -30,6 +30,6 @@ using log4net.Config;
// 内部版本号
// 修订号
//
[assembly: AssemblyVersion("3.3.
6
.0")]
[assembly: AssemblyFileVersion("3.3.
6
.0")]
[assembly: AssemblyVersion("3.3.
7
.0")]
[assembly: AssemblyFileVersion("3.3.
7
.0")]
[assembly: log4net.Config.DOMConfigurator(ConfigFileExtension = "config", Watch = true)]
MachineDll/MachineControllor.cs
查看文件 @
ea9a9c1
...
...
@@ -3,6 +3,7 @@ using System.Threading;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
log4net.Repository.Hierarchy
;
namespace
MachineDll
{
...
...
@@ -108,7 +109,9 @@ namespace MachineDll
}
double
data
=
_ItsSerialPort
.
ReadAIString
(
"01 03 02 58 00 08 C4 67"
);
return
data
;
var
cdata
=
SerialPortSetting
.
CurrentConversion
(
data
);
SerialPortSetting
.
LOGGER
.
Debug
(
$
"IO Return: data:{data}, cov:{cdata}"
);
return
cdata
;
}
public
bool
ReadX0
()
...
...
@@ -125,6 +128,20 @@ namespace MachineDll
_ItsSerialPort
.
SendString
(
s
);
}
public
double
GetOHREC10_Value
()
{
//读AI数据
if
(
IsDebug
)
{
simulate_data_Enumerator
.
MoveNext
();
return
simulate_data_Enumerator
.
Current
;
}
double
data
=
_ItsSerialPort
.
ReadAIString
(
"02 03 00 80 00 02 C5 E3"
,
100
,
SerialPortSetting
.
ByteType
.
Double_32Bit_Little_endian_ByteSwap
);
double
temp
=
_ItsSerialPort
.
ReadAIString
(
"02 03 00 05 00 01 94 0B"
,
10
,
SerialPortSetting
.
ByteType
.
Int16
);
SerialPortSetting
.
LOGGER
.
Debug
(
$
"IO2 Return: data:{data}, temp:{temp}"
);
return
data
;
}
#
endregion
}
...
...
MachineDll/TheMachine.cs
查看文件 @
ea9a9c1
...
...
@@ -9,7 +9,7 @@ namespace MachineDll
public
class
TheMachine
{
enum
MachineType
{
IO
,
PLC
IO
,
PLC
,
IO2
}
//接受到的数据
private
int
_ReadCount
;
...
...
@@ -31,6 +31,10 @@ namespace MachineDll
{
machineType
=
MachineType
.
PLC
;
}
else
if
((
"IO2"
).
Equals
(
type
))
{
machineType
=
MachineType
.
IO2
;
}
LOGGER
.
Info
(
$
"port={port},machineType={machineType}"
);
SerialPortSetting
.
PortName
=
port
;
}
...
...
@@ -340,6 +344,8 @@ namespace MachineDll
}
LOGGER
.
Debug
(
$
"IO Return: {returnValue}"
);
return
returnValue
;
}
else
if
(
machineType
==
MachineType
.
IO2
)
{
return
_ItsControllor
.
GetOHREC10_Value
();
}
else
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论