Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
GC_Branch
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
周磊
GC_Branch
Commits
cef76502
Commit
cef76502
authored
May 11, 2018
by
wangjunqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改modbus 组分输出
parent
db9764e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
GCModbusSlave.cs
GcDevicePc/Common/GCModbusSlave.cs
+2
-2
GCModbusSlave485.cs
GcDevicePc/Common/GCModbusSlave485.cs
+2
-2
No files found.
GcDevicePc/Common/GCModbusSlave.cs
View file @
cef76502
...
...
@@ -86,7 +86,7 @@ namespace GcDevicePc.Common
ushort
value
=
0
;
ushort
baseaddress
=
20
;
address
=
(
ushort
)(
address
-
1
);
int
listnum
=
CKVocAnalyzer
.
GlobalCKV
.
valueparamlist
.
Count
;
int
listnum
=
SharedSpace
.
Data
.
listValue
.
Count
;
int
readnum
=
(
address
-
baseaddress
)/
2
;
if
(
readnum
<=
listnum
-
1
&&
listnum
>
0
&&
address
>=
20
)
...
...
@@ -98,7 +98,7 @@ namespace GcDevicePc.Common
ushort
[]
s
=
new
ushort
[
2
];
float
[]
f
=
new
float
[
2
];
{
f
[
0
]
=
float
.
Parse
(
CKVocAnalyzer
.
GlobalCKV
.
valueparamlist
[(
ushort
)
readnum
]
.
ToString
());
f
[
0
]
=
float
.
Parse
(
SharedSpace
.
Data
.
listValue
[
readnum
].
vale
.
ToString
());
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
}
...
...
GcDevicePc/Common/GCModbusSlave485.cs
View file @
cef76502
...
...
@@ -82,7 +82,7 @@ namespace GcDevicePc.Common
ushort
value
=
0
;
ushort
baseaddress
=
20
;
address
=
(
ushort
)(
address
-
1
);
int
listnum
=
CKVocAnalyzer
.
GlobalCKV
.
valueparamlist
.
Count
;
int
listnum
=
SharedSpace
.
Data
.
listValue
.
Count
;
int
readnum
=
(
address
-
baseaddress
)
/
2
;
if
(
readnum
<=
listnum
-
1
&&
listnum
>
0
&&
address
>=
20
)
...
...
@@ -92,7 +92,7 @@ namespace GcDevicePc.Common
ushort
[]
s
=
new
ushort
[
2
];
float
[]
f
=
new
float
[
2
];
{
f
[
0
]
=
float
.
Parse
(
CKVocAnalyzer
.
GlobalCKV
.
valueparamlist
[(
ushort
)
readnum
]
.
ToString
());
f
[
0
]
=
float
.
Parse
(
SharedSpace
.
Data
.
listValue
[
readnum
].
vale
.
ToString
());
Buffer
.
BlockCopy
(
f
,
2
,
s
,
0
,
2
);
Buffer
.
BlockCopy
(
f
,
0
,
s
,
2
,
2
);
}
...
...
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