Comments (6)
In general, to collect data from real world equipment you need some kind of interface to access data from the device and provide it to the opc ua server application.
Typically this are some vendor specific protocols and then are mapped to opc ua servers.
hopefully this helps you.
from opcua-smart.
If you want to have a quick gander on some sample servers, e.g. an opcua server for a universal robot 10e, you can join me on discord https://discord.gg/u8Pe49. I will be online until 20:00 Porto Alegre time.
from opcua-smart.
I released (and pushed to git) a version that does it correctly. the return keyword signifies the datatype for the return. Only one return is supported at the moment. As customary in ruby, the last line in the block is the return value, no need to use the return keyword.
##Server
t.add_method :MethodX,
inputarg1: OPCUA::TYPES::INT32,
return: OPCUA::TYPES::INT32 do |node, inputarg1|
p "Argument: #{inputarg1}"
inputarg1 + 1
end
##Client
p node.call 1
Discussion: i personally am not a friend of using return values in methods, OPCUA is messy enough as it is. I typically create very simple methods with no return value, and write potential return values into variables in the same folder. This forces me to think more about a good structure. Also it never use long running methods, but instead always rely on conveying method state through some variable in the same folder. But you can of course do whatever you want :-) OPCUA is after all a beloved bloody mess of a thing, that tries to be everything for everybody.
from opcua-smart.
Well, I'm one dummy/beginner with OPC-UA.
I didn’t understand very well how the server collects data from the given equipment, as we don’t have a PLC yet. I am studying the protocol for future deployment of a server in the company. Would you have an example of how this works? this work with folder? how?
very thnks for the push! very useful dude!
from opcua-smart.
@fpauker
Thanks for reply. what are the main protocols?
from opcua-smart.
@etm
I will do my best to be able to participate. Thanks.
from opcua-smart.
Related Issues (10)
- Read OPC UA arrays
- fatal error: 'open62541.h' file not found HOT 3
- Smashing compile error HOT 1
- How to get integer value from node
- Supporting OPC UA methods HOT 1
- NodeIds in Types HOT 1
- Wrong instantiation of Types
- Delete nodes in address space
- Problem (cannot load such file 'lib/opcua/client.so') HOT 2
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 opcua-smart.