Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
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:
1.PNG
2.PNG
if it is not present the plc does not expose the custom types... that would be awfull! then you need to make like a craller which browses/explores the custom type node and make a structured list of node obejcets (NodeId, Typedefinition, Value) to write them in one ua call!
Simon Bowen
@simonbowen
image.png
Hi @AndreasHeine I can definitely browse them in UAExpert.
image.png
Andreas Heine
@AndreasHeine
so you can finde your custom plc datatypes in the Strucutres folder?
3.PNG
Andreas Heine
@AndreasHeine
i actually tested a little and indeed there must be an issue!
Andreas Heine
@AndreasHeine
@erossignon from opc ua v1.03 to v1.04 was a change in protocol! it might explain too, some of the stuff i wrote you via mail!?
Simon Bowen
@simonbowen
Hi @AndreasHeine, are you suggesting that there is an issue with OPC itself between the versions?