Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
Thick-Common
Commits
7ebc388c
Commit
7ebc388c
authored
Oct 09, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ModbusMapper Coil 数据读取不会更新
parent
556f69da
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
ModbusMapper.cs
Project.FLY.ModbusMapper/FLY.ModbusMapper/ModbusMapper.cs
+5
-0
PropertiesManager.cs
...Y.OBJComponents/OBJComponents/Common/PropertiesManager.cs
+5
-0
No files found.
Project.FLY.ModbusMapper/FLY.ModbusMapper/ModbusMapper.cs
View file @
7ebc388c
...
@@ -238,6 +238,11 @@ namespace FLY.Modbus
...
@@ -238,6 +238,11 @@ namespace FLY.Modbus
if
((
bool
)
dr
.
plcValue
!=
vals
.
ElementAt
(
idx2
))
if
((
bool
)
dr
.
plcValue
!=
vals
.
ElementAt
(
idx2
))
{
{
dr
.
plcValue
=
vals
.
ElementAt
(
idx2
);
dr
.
plcValue
=
vals
.
ElementAt
(
idx2
);
dr
.
isPlcValueChanged
=
true
;
}
//isPlcValueChanged 可能是上面值不一样 被设为true, 也可能是 客户端 发送数据到 PLC ,所以被强制设置为 true
if
(
dr
.
isPlcValueChanged
)
{
dr
.
ToPropertyObj
();
dr
.
ToPropertyObj
();
//触发事件
//触发事件
NotifyNameDataChanged
(
dr
);
NotifyNameDataChanged
(
dr
);
...
...
Project.FLY.OBJComponents/OBJComponents/Common/PropertiesManager.cs
View file @
7ebc388c
...
@@ -25,6 +25,11 @@ namespace FLY.OBJComponents.Common
...
@@ -25,6 +25,11 @@ namespace FLY.OBJComponents.Common
{
{
throw
new
Exception
(
"PropertiesManager_JSON 类型="
+
obj
.
GetType
().
ToString
()+
" 不能找到 属性名="
+
propertyName
,
e
);
throw
new
Exception
(
"PropertiesManager_JSON 类型="
+
obj
.
GetType
().
ToString
()+
" 不能找到 属性名="
+
propertyName
,
e
);
}
}
if
(
property
==
null
)
{
throw
new
Exception
(
"PropertiesManager_JSON 类型="
+
obj
.
GetType
().
ToString
()
+
" 不能找到 属性名="
+
propertyName
);
}
if
(!
property
.
CanWrite
)
{
if
(!
property
.
CanWrite
)
{
throw
new
Exception
(
"PropertiesManager_JSON 类型="
+
obj
.
GetType
().
ToString
()
+
" 属性名="
+
propertyName
+
" 不能set"
);
throw
new
Exception
(
"PropertiesManager_JSON 类型="
+
obj
.
GetType
().
ToString
()
+
" 属性名="
+
propertyName
+
" 不能set"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment