New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offer an example of using the library to get tag data #4821
Comments
193 authors and none will answer? |
Why can't I compile this example? After all, this is the example that lies in the repository. There is no description of which flags to use. Why are data types not recognized? Where can I read about what is needed and where to replace it?
|
+up |
So, I rebuilt the branch library 1.2. The build was successful:
After installing the library, I tried to build my code again. This time a completely different error popped up:
Here is the code itself that I am trying to compile:
|
You have to enable historical access in the build settings when the library is generated. |
Yes, I added a compilation parameter, but with it another error is obtained
|
It is strange that the documentation does not specify the constant UA_ENABLE_HISTORIZING, which implies automatic inclusion when building this library. Because of this, there was ambiguity. Is it possible to update the documentation? Since implicit moments are misleading and generate issues. After the compilation parameter was added during the build, the function for reading historical data works correctly
|
This solution worked for me! Thank you very much!
|
I installed the library and built a client application based on the tutorial. It started and, as can be seen from the result, the connection was successfully received and the program was executed without errors.
I have an existing server with data that I need to read over a time interval (for example, an hour) for a specific tag. The structure of the server is as follows:
And I need to read the data on the specified tag - TNPZ.P_NEFT.R1.M.
If I view the data through the native client going with the server, then I see this data, they exist. It is possible to see the dynamics on the chart and upload data in the form of a table.
The question is:
I need to get the same table, only using the library. I don't even know where to try to start, since I've never worked with OPC. I have difficulties understanding English, so I translated the specifications the OPC Foundation through a translator, but I absolutely did not understand the principle of operation.
From the attached code as an example for reading historical data, it is also not entirely clear how to use it, because it does not even compile for me:
Is there an example for connecting to a similar server to read such data? Where can I even start to try to read data from the server or get the server structure? Are there any use cases?
The text was updated successfully, but these errors were encountered: