How write bytes in PLC #1372
sergeishugaev
started this conversation in
General
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I try to write some variables to PLC use Milo 0.6.14, but not all variables are written.
In example below I write 4 variable: boolean control, byte index, byte output, int weight.
In PLC, these variables have the type: BOOL, BYTE, BYTE, DINT
boolean and int variable are being written successfully, but byte variables aren't.
I try changed type of variable in java to short, int, but it didn't help.
In PCL BYTE (0...255), in java byte (-128...127).
What am I doing wrong?
How do I write byte variables?
I'll notice, the reading byte variables was successful.
Please help me.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment · 1 reply
Uh oh!
There was an error while loading. Please reload this page.
-
"Byte" in OPC UA is an unsigned byte.
Try using the
UByte
type provided by Milo.Beta Was this translation helpful? Give feedback.
All reactions
Uh oh!
There was an error while loading. Please reload this page.
-
Thank you very much!
I didn't know that Milo had corresponding data types.
Beta Was this translation helpful? Give feedback.
All reactions