opcua | Native Go OPC-UA library | Networking library
kandi X-RAY | opcua Summary
kandi X-RAY | opcua Summary
Artwork by Ashley McNamara Inspired by Renee French Taken from by Mat Ryer.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of opcua
opcua Key Features
opcua Examples and Code Snippets
Community Discussions
Trending Discussions on opcua
QUESTION
I have created a node application that is for subscribing to an OPC-UA server and storing the data on our s3 bucket. I am using the node-opcua module for that purpose.
I am working on a Windows server via RDP and the node-opcua
module creates some files under %LOCALAPPDATA%\Temp
as part of the process and uses it. I am using pm2
to run the application and it is getting the path of those files via TMP
and TEMP
environment variables which are dynamically generated by the process itself.
When the Windows server restarts it delete those files and the location updates of the new file. I already have run pm2 save
and put the pm2 resurrect
command in the Batch file which has a shortcut in the windows startup to make sure the process automatically gets started.
The issue was that the pm2 process was resurrected but still throwing the error %LOCALAPPDATA%\Temp\{some_path} file not found
by the node-opcua
process which was running through pm2. I ran pm2 restart
manually but still didn't work out.
ANSWER
Answered 2022-Mar-30 at 11:00First I was thinking of it from the problem with the node-opcua module and thought about how can make it use the new system variables, but that was not in had as the process keeps making and deleting temporary files, so I need the pm2 to use the new system variable which has the updated path after system reboot and was not updating even after pm2 restart
.
So, for updating the variables I figured out two solutions:
- Either delete the old process and initiate a new pm2 process to run that application and put it in the batch file which is being called at server reboot
- Adds
pm2 restart {name} --update-variable
afterpm2 resurrect
and the system variables will be updated.
QUESTION
I'm running the qtopcuaviewer
example following these instructions to create the client certificate:
ANSWER
Answered 2022-Jan-18 at 16:12You have to deploy the TLS plugin found under:
QUESTION
I'm looking for a way to read the values from multiple nodes at once instead of using a loop.
I created a list with the node objects from a CSV file.
...ANSWER
Answered 2022-Jan-06 at 12:19You can use read_values from client to read all values in one network request.
Example:
QUESTION
This is my code in python:
...ANSWER
Answered 2021-Nov-12 at 04:07It looks like when you call modify_monitored_item
and don't specify the new_queuesize
it defaults to 0, which tells the server to set it to "default" queue size, which is 1 according to the spec.
QUESTION
I am trying to set up a system to save historic data with the flow like this: Prosys OPC-UA Server Simulation -> OPC-UA FIWARE IoT Agent -> Orion Context Broker -> FIWARE Cygnus Connector -> PostgreSQL database.
Here is the document I used to compose the docker-compose
file:
Here is the docker-compose
and .env
file I used
docker-compose.yml
ANSWER
Answered 2021-Sep-01 at 10:31You have a complex scenario here, composed of an end-to-end chain of 5 components:
- Prosys OPC-UA Server Simulation
- OPC-UA FIWARE IoT Agent
- Orion Context Broker
- FIWARE Cygnus Connector
- PostgreSQL database
My recomendation here would be to check every step in the chain (looking in logs, etc.) to ensure everything is correct before of checking the next step.
QUESTION
I have trouble with include uaplatformlayer.h in example from OPCUA client example. I found this example in SDK. I tried to do own makefile, to build example client lesson01. I use Visual Studio Code. It can't find this .h file.
...ANSWER
Answered 2021-Sep-23 at 17:45You need to add "includes" to the recipe for the .o files:
QUESTION
here's what I have in mind: I have data (numbers) in an OPC server, which I want to retrieve via a GUI. This data should be updated every 5 seconds and therefore also be displayed in the GUI. I had tried this via a while loop, which also works as print output, but then no window is displayed to me anymore.
Would there perhaps someone an idea how I can implement this?
...ANSWER
Answered 2021-Aug-21 at 11:16Using while True
is not good idea in any GUI. It blocks mainloop
which gets key/mouse event from system, sends them to widgets, runs functions assigned to button and other widgets, (re)draw window and widgets.
You may need to run while True
in separated thread - but thread can't update widgets and it would have to send result to main thread - and this makes other problems.
Or you should check if you can use "timer"
instead of while
to run code periodically.
All GUIs have some "timer"
for this.
And tkinter
has master.after(milliseconds, function_name)
I couldn't test it but it could looks like this.
QUESTION
I'm quite new in the opcua's world and I'm trying to monitor a server variable with a client in C++.
I'm on the 1.2.2 version of opcua
I have a boolean variable in the server at the node (1,6070) and when I run the following code I receive the LOG :
[2021-08-03 15:27:47.442 (UTC+0200)] info/session Connection 5 | SecureChannel 2 | Session ns=1;g=913a21de-f467-5bc9-ed9e-29b27b470490 | Subscription 2 | Created the Subscription with a publishing interval of 500.00 ms
But I've never reach the function 'handler_events_datachange' in which I only put an output for now. (I'm sure that the value in the node 6070 changed btw)
Thanks for helping!
...ANSWER
Answered 2021-Aug-06 at 09:26I finally found the error !
The problem comme from the fact no means of handling asynchronous events automatically is provided. However, some synchronous function calls will trigger handling, but to ensure this happens a client should periodically call UA_Client_run_iterate explicitly.
So the solution is to add UA_Client_run_iterate(client,100) in the while().
I didn't fully understand what the timeout was about but I'll complete this answer if I can
QUESTION
I have a data source delivering values that I want to expose through an OPCUA server. The data source is event-driven and can deliver multiples values for one variable in a single notification. I want to configure an OPCUA client to receive all values regardless of the period (just no losses).
What I tried:
Simulation
I have variable who ramps from 1 to 10 every 100ms. The data source emits n events containing m values changes. When the server receives events, he writes the corresponding OPCUA node with all the changes.
Client configuration
The client has a subcription with a publishInterval of 1000 ms, a monitored item with a queue size of 100 and a samplingInterval of 0 ms. The server is sending back a revisedSamplingInterval of 50ms.
Expected results
I want to receive all data change from 1 to 10.
Results
I'm missing some values. I think it's because I write the OPCUA node with all value when I receive them and the server can't sample it but I'm not sure.
Questions
It is possible to achieve this with opcua ? Do I need a special treatment on the server ? Is it normalized or is it implementation details ? Do I need other settings for the client ?
...ANSWER
Answered 2021-Aug-02 at 15:53You’re doing the right thing in the client by creating a MonitoredItem with a larger queue size but unfortunately whether or not the the rest of this works is going to be an implementation detail of the server and how it implements sampling and subscriptions.
QUESTION
I'm working with asyncio and asyncua libraries in python 3.8.7 and I want to use asyncio.Queue to pass the data from the async function into the main thread.
However, the issue I encountered is that my queue does not get any messages after the first await
.
Here's my example:
...ANSWER
Answered 2021-Jul-31 at 04:36This is a bit of a guess on my part, but I think you have a race condition. Here is the while loop in the main thread:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install opcua
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page