Writing to PLC #728
Unanswered
JasonDevloo
asked this question in
Q&A
Replies: 0 comments
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.
-
If I am reading from a opcua server:
go run .\read\read.go -endpoint opc.tcp://localhost:4840 -node 'ns=4;s=|var|NX3005.Application.O99.O22_LB20.GT21.MV'
And I get:
&ua.DataValue{EncodingMask:0xd, Value:(*ua.Variant)(0xc0000646c0), Status:0x0, SourceTimestamp:time.Date(2024, time.May, 29, 9, 51, 38, 273000000, time.UTC), SourcePicoseconds:0x0, ServerTimestamp:time.Date(2024, time.May, 29, 9, 51, 38, 272000000, time.UTC), ServerPicoseconds:0x0}
Or browse:
go run .\browse\browse.go -endpoint opc.tcp://localhost:4840 -node 'ns=4;s=|var|NX3005.Application.O99.O22_LB20.GT41.MV'
Name;Type;Addr;Unit (SI);Scale;Min;Max;Writable;Description
MV;float32;"ns=4;s=|var|NX3005.Application.O83.O25_LB20.GT41.MV";;;;;false;
How would I write to that same endpoint? What should be my value? When I try:
go run .\write\write.go -endpoint opc.tcp://localhost:4840 -node 'ns=4;s=|var|NX3005.Application.O99.O22_LB20.GT21.MV' -value 42
I get:
The value supplied for the attribute is not of the same type as the attribute's value. StatusBadTypeMismatch (0x80740000)
Beta Was this translation helpful? Give feedback.
All reactions