Comments (8)
This error corresponds to the enum for BadTypeMismatch. Might need unsigned int, long, a float or a double depending on the type of the node. Check the data type for the node on the server.
Closing, not a library issue.
from libua.
I have created another node of type int and just to assigning value 6, but still not writing value to node, where as when tried with OPC UA client then it is writing the value
This is the code snippet
uint[] respStatuses;
//client.SetPublishingMode(true);
client.Write(new WriteValue[]
{
new WriteValue(
new NodeId(2, "SiemensPLCs.PLC1500.HMI.Station_Status[2]"), NodeAttribute.Value,
null, new DataValue(6, StatusCode.GoodClamped, DateTime.Now))
}, out respStatuses);
Now status code is "2155020288"
Screenshot of OPC UA client
from libua.
This error corresponds to the enum for BadTypeMismatch. Might need unsigned int, long, a float or a double depending on the type of the node. Check the data type for the node on the server.
Closing, not a library issue.
Hello Nauful, thank you for the response.
I have double verified the data type and value assigned but still facing issue. please check my comment with more details
from libua.
The UA data type is Word
, which in C# is ushort
. Sending 6 as a constant is an int
(Int32
for UA) Try declaring a variable with that type specified:
ushort value = 6u;
... new DataValue(value, ...)
from libua.
I have tried with suggested code, still not changing the value, please refer the below screenshot
I'm able to change the value through OPC quick client but not with code. I have tried various types and values but "write" method is not working at all
from libua.
Try StatusCode.Good
instead of StatusCode.GoodClamped
. If that doesn't work, I need more info:
With an unencrypted connection (security None
or Sign
but not SignAndEncrypt
), can you take a Wireshark capture of writing the value from your OPC client, then of writing your value from this test app?
from libua.
Finally it worked with below code snippet
ushort val = (ushort)6u;
uint[] respStatuses;
client.Write(new WriteValue[]
{
new WriteValue(
new NodeId(2, "SiemensPLCs.PLC1500.HMI.Station_Status[2]"), NodeAttribute.Value,
null, new DataValue(val))
}, out respStatuses);
Declare the variable and then pass that variable to DataValue object.
Note:- Just pass that value only and don't pass other parameters to DataValue object,
from libua.
Sounds good. Your server may have been rejecting the additional parameters.
from libua.
Related Issues (20)
- Calling an opc method which takes a complex server type as a parameter HOT 1
- Error with ExpandedNodeId HOT 3
- Issue HOT 7
- Read Datatype return NodeId intead of Datatype HOT 1
- No event notifications HOT 3
- Ability to delete Nodes from Address Space at runtime HOT 1
- Write and read non-ascii value HOT 3
- Question about usage Server HOT 4
- Subfolders HOT 1
- Error monitoring HOT 19
- Improve library NodiId.TryParse HOT 1
- OPC UA PubSub via UDP HOT 1
- Unable to pass "null" as filter in MonitoredItemCreateRequest HOT 2
- Problem with freeOPAUA HOT 16
- Can not write value to my variable HOT 7
- How to create an ExtensionObject? HOT 1
- UaClient error to read a matrix HOT 7
- How to read an ExtensionObject? HOT 6
- Error DefaultAddressSpace HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libua.