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
b357e430
Commit
b357e430
authored
Dec 20, 2019
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PLC 写入 记录 添加 对象名称
parent
92ca049e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
PLCProxySystem.cs
....FLY.OBJComponents/OBJComponents/Server/PLCProxySystem.cs
+7
-1
No files found.
Project.FLY.OBJComponents/OBJComponents/Server/PLCProxySystem.cs
View file @
b357e430
...
...
@@ -109,7 +109,13 @@ namespace FLY.OBJComponents.Server
//PLC地址
string
plcAddr
=
$"
{(
dr
.
dataArea
==
PLCAddressArea
.
Coil
?
"M"
:
"D"
)}{
dr
.
addr
}
"
;
logger
.
Info
(
$"
{
e
.
PropertyName
}
[
{
desp
}
] [
{
plcAddr
}
] (
{
old_value
}
)->(
{
new_value
}
)"
);
//对象名称
string
objName
=
""
;
var
names
=
from
kv
in
ObjNames
where
kv
.
Value
==
sender
select
kv
.
Key
;
if
(
names
.
Count
()>
0
)
objName
=
names
.
First
();
logger
.
Info
(
$"
{
objName
}
.
{
e
.
PropertyName
}
[
{
desp
}
] [
{
plcAddr
}
] (
{
old_value
}
)->(
{
new_value
}
)"
);
}
//向PLC写入数据,mRegs每次只能写入一个,它有列表保存功能。
...
...
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