Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Matthias Max
@bitflower
I think I found the issue why I was getting an initial changed event. My code immediately registered the .on() after creating the monitoredItem. It now looks like this and doesn't emit an inital event anymore:
image.png
Is this the right way to do it? Or should the monitored item not emit initially when there wasn't a change? We are talking about a bale press here. Like a change every 10-30 minutes.
Matthias Max
@bitflower
I have created a small demo server this morning to simulate my client's setup. Went smooth. Thanks for this great library.
Mariusz
@mpostol

Hi All, sorry for interrupting you.

I try to find common rules related to the syntax and semantics of the Browse name as a contribution to further development of the MIT licensed open source Address Space Prototyping Tool (asp.exe). Hopefully I will be able to implement semantic diff, validation, and conversion of UANodeSet and ModelDesign files - any other formats? The specification doesn't help therefore I try to define common rules applied by independent vendors. I am concluding my research in the document OPC UA Object Model Working Notes.

So my first question is:

  • Do you know if someone has defined already regex for NodeId, QualifiedName, etc?

Still, I am bothering with the BrowseName namespaceIndex default value. So my second question is

  • Are you removing 0 in your code from the BrowseName by default - there must be a parser in your code?

Thanks,

Mariusz

Andreas Heine
@AndreasHeine
Are you removing 0 in your code from the BrowseName by default --> (https://reference.opcfoundation.org/v104/Core/docs/Part3/5.2.4/) Subclause 8.3 defines the structure of the BrowseName. It contains a namespace and a string. The namespace is provided to make the BrowseName unique in some cases in the context of a Node (e.g. Properties of a Node) although not unique in the context of the Server. If different organizations define BrowseNames for Properties, the namespace of the BrowseName provided by the organization makes the BrowseName unique, although different organizations may use the same string having a slightly different meaning.
Mariusz
@mpostol

@AndreasHeine Thanks for the feedback and advice. I always start reading the specification at the very beginning. More is in the document I have pointed out in my post. BTW It contains a namespace and a string should be `This structure contains a namespaceIndex and name fields" - but ok it could be recognized as a typo.

For example, consider "Name" BrowseName - how to discover the correct namespace? In many UANodeSet files, I am analyzing, assuming that "Name" == "0:Name" (are equal) a lot of errors are a result if "Name" comes from the inheritance chain, i.e. are a member of a type defined in namespace 1, 2, .....

For example, look at the snippet that comes from a generated UANodeSet file I am using for testing purpose:

https://github.com/mpostol/OPC-UA-OOI/issues/538#issuecomment-785031783

I have got it from one of the contributors to my project. The question is if it compliant with the specification or not? If yes it means that "Name" in a derived instance is defined by OPC UA standard (is in the default namespace), if no thousands of errors like this will be reported.

Andreas Heine
@AndreasHeine
the nodeset files will recv they true ns-index after importing them to the server! it depends on the server which is the next free slot in ns-array
if you instantiat a node from a nodeset the new node will recv the nsidx from the namespace its got added to
Andreas Heine
@AndreasHeine
the simple reason why they use the idx instead of the ns-name (http://mynamespace/UA) because it could be a long string and would be inefficient to use
Mariusz
@mpostol

@AndreasHeine my goal is to make sure that the nodeset files will recv they true ns-index after importing them to the server! for all the servers is really true. How to prove that the behavior of servers will be similar or the same. To promote the reusability of the models we must be sure how to deal with that.

@AndreasHeine What x must be in x:Name in a derived instance say defined in the namespace of index 2? I expect ` ,0,1,2`.

Andreas Heine
@AndreasHeine
... you cant ensure that the same model has always the same ns-idx on every server only (on identical servers)! if one server has lets say another nodeset imported as well or in a different order the idx then can be different. in thos cases you need to read the servers namespace array and get your idx dynamically for the setting up the browsename
if i have a nodeset importet (the first in the server) it has idx 1 -> then i make a new ns for my modelling/data (idx 2) -> if i instantiate from idx 1 a defined objecttype to my idx 2 namespace it will have 2:Name
Andreas Heine
@AndreasHeine
opc.tcp://opcua.machinetool.app:4840 this is the uri to a online machine tool opc ua server check with UaExpert the NS-Array under the Server object an then look at some tools wich have a none standard TypeDefinition like /Objects/Machines/BasicMachineTool
Mariusz
@mpostol
  1. My BrowseName Parse methods (after the OPCF stack) removes 0 always by default, so adding 0 to XML doesn't make any changes.
  2. In my example assuming "1:Name" ( I agree it is not compliant) causes fewer errors in models I am testing
  3. I will be back with a more completed (including reference to EngineeringUnits) example that I will add to my Unit Tests
  4. I assume that our common goal is to improve "Naming Conventions for Nodes" rules to promote design-time interoperability.
I know you are very busy but hopefully, see you soon.
Andreas Heine
@AndreasHeine
0 is reserved for the opc foundation standard nodes so you should avoid using 0
typically these kind of standardisations and conventions come from "opc foundation joint working groups and companion specifications"
to get a real convention within opc ua its needed to get accepted by the opc foundation
Mariusz
@mpostol
@AndreasHeine Today paper-driven standards must compete with community-driven standards. I am consulting with 3 vendors to conclude in a few weeks, not in a few years. But thanks for the advice.
Andreas Heine
@AndreasHeine
its already part of the spec. https://reference.opcfoundation.org/v104/Core/docs/Part3/5.2.4/ so it takes 0 time 😉 but do what you want do to, opc ua has all capabilities to deal with changing nsidx in model instances (i know it as member of three JWGs)
David Lane
@davidlane-iteratec
Hi all: we are experiencing problems with the connectivity in real-world operation connected to a S7. If the machine including Plc is turned off the normal lifeycle events (connection_lost, start_reconnection are not triggered) but instead timeouts start to happen:
ClientSessionKeepAliveManager#ping_server Transaction has timed out ( timeout = 60000 ms)
Strangely enough the timed_out_request event also does not fire.
On restart the node program never seems to recover adequately and then we are getting things like
ClientSessionKeepAliveManager#ping_server Invalid Channel BadConnectionClosed
Error: Invalid Channel BadConnectionClosed
And eventually just responds with
Error: Cannot recreate session
recreate_session_and_reperform_transaction -> Already in Progress
quangvo1302
@quangvo1302
Hi all, I created OPC UA server and it worked but It only alive in 10mins. So my question is " How i can keep server alive or restart it after sercurity token had expired with full old configuration". thank you so much.
mrtnzagustin
@mrtnzagustin
Hello there to everyone. I hava a basic question, sorry for mi basic knowledge. Which protocol are the communications between node opc-ua client an node opc-ua server using? is TCP-UA or is SOAP?
Andreas Heine
@AndreasHeine
mostly tcp binary
mrtnzagustin
@mrtnzagustin
great, why mostly? what do u mean o where i can read about it?
Andreas Heine
@AndreasHeine
in spec. there is a soap version but actually i dont know any product using the soap version... opcua is more of a heavy protocol (overhead) so anyone uses the most efficient binary version https://reference.opcfoundation.org/v104/ opc ua has a layered architecture so the transport is only the base layer and can be switched or expanded in the future but for now binary is the most present version on the market
mrtnzagustin
@mrtnzagustin
Thank you @AndreasHeine
Simon Bowen
@simonbowen

I am hoping someone can help me, I've donated and bought the book so fully invested in node-opcua thus far.

I have a PLC that I am connected to and can browse, I am trying to read a specific node but I get this message back, could anyone help me and point me in the right direction?

DataValue {
  value: Variant { dataType: 0, arrayType: 0, value: null, dimensions: null },
  statusCode: ConstantStatusCode {
    _value: 2151481344,
    _description: 'The requested operation is not supported.',
    _name: 'BadNotSupported'
  },
  sourceTimestamp: 2021-04-08T15:45:31.842Z {
    high_low: [ 30878862, 890726848 ],
    picoseconds: 400000000
  },
  sourcePicoseconds: 400000000,
  serverTimestamp: 2021-04-08T15:45:31.823Z {
    high_low: [ 30878862, 890534848 ],
    picoseconds: 200000000
  },
  serverPicoseconds: 200000000
}

Here is my code https://gist.github.com/simonbowen/033e600832a27664cdb8d6225ef5ef5b

A screenshot of UAExpert and the node I am trying to read.

Etienne
@erossignon

Hi Simon, thank you for your support and appreciation of node-opcua.
I have commented the gist to improve it slightly ( by closing the session and disconnecting after the read is done, so we free up some server resources at the end).
You can also use the .toString() to output the node-opcua DataValue object in a prettier way.

This being said, it looks like both node-opcua nd UAExpert agreed to say that the PLC variable doesn't contain a valid value here.
THere must be something on the PLC side that prevent the varaible to be properly initiliazed.

Does this happen with other variables too ? or just this one ?

Simon Bowen
@simonbowen
Hi @erossignon, I can read and write to other values without a problem, these seem to be standard dataTypes though. I updated the code as suggested and this is what the output now looks like.
```
{ /* DataValue */
   value: Variant(Scalar<Null>, value: <null>)
   statusCode:      BadNotSupported (0x803d0000)
   serverTimestamp: 2021-04-09T09:45:01.808Z $ 800.000.000
   sourceTimestamp: 2021-04-09T09:45:01.827Z $ 200.000.000
}
Heres a video from UAExpert with me tranversing this particular node, this might give some more information on what the issue is? It appears that you can updated arrays from within UAExpert and it doesn't work either. https://imgur.com/3l8MNW8
Simon Bowen
@simonbowen
Just realised that screen recording link doesn't work, here's a GDrive link. https://drive.google.com/file/d/17ROXyxkM_766x2t1cLeOR7vvf6YTLq0D/view?usp=sharing
Etienne
@erossignon
@simonbowen the video is a little bit blur
image.png
Etienne
@erossignon
it's getting sharper now.
The variable contains a array of 15000 extension objects (structures). This is wierd, I would expect the PLC to expose which type of ExtensionObject is contained in the dataValue.
CAn you set the environnement variable NODEOPCUADEBUG to "CLIENT{TRACE-RESPONSE-REQUEST}" and rerun the small client script ? It will generate a large output in the console. Can you send it to me privately for investigation ?
Are you controlling the PLC as well ? can you program it ?
Mohamed Dhaker Abdeljawed
@Mdhaker
Hello, we have a client using a PLC which cannot resolve the hostname, is it possible to have an endpoint with only ipaddress,Sorry If the question is duplicated or already answered in github, could you please send me the answer
Andreas Heine
@AndreasHeine
grafik.png
Mohamed Dhaker Abdeljawed
@Mdhaker
I will test this, thank you
Simon Bowen
@simonbowen
image.png

@erossignon Sorry for the delay in getting back. Some progress has been made and I can now read from the Array as discussed last week. I had to change something on the PLC to do this (I am not a PLC developer so a lot of trial and error).

I can write to Array indexes individually using their NodeID (ns=6;s=::CuttingLab:DataExchange.Cfg.Cutting.Pitch[0].Speed) for example, is it possible to write to this array in one go? There are 15000 indexes I need to populate.

Andreas Heine
@AndreasHeine
plc's use structures (extensionobjects) to represent there userdefined datatypes (UDT's) so you actually need to write the right value structure with the right typedefiniton in oder to set it all in one call -> its well described in etienne's book ;) or check the doc's: https://node-opcua.github.io/api_doc/2.32.0/interfaces/node_opcua.clientsession.html#constructextensionobject
it's pretty straightforward (thanks Etienne!)
Simon Bowen
@simonbowen
@AndreasHeine Thanks for replying, I have actually bought the book but I am still struggling, I am very new to OPCUA and still getting my head around the concepts. I'll take a look at the extension object section in the book, I suspect I need to read up more on OPCUA extension objects in general though.
"it's pretty straightforward (thanks Etienne!)" It's pretty straight forward when you know how!
Simon Bowen
@simonbowen
@erossignon @AndreasHeine After referring to the book, it says that I should be able to read the value "Your node-opcua client will be able to seamlessly operate with extension ob- jects that are defined on the server-side." However I still get a BadNotSupported error, can someone confirm that this is the PLC preventing me from doing this? https://gist.github.com/simonbowen/c8a5f141a68c184df35223313873a205
Andreas Heine
@AndreasHeine
could you provide the plc model? and check with UaExpert -> Types/DataTypes/Structure/... if there is the datatype/UDT-Name that the variable you want to write is present in that folder? or make screenshot and post them! like: