OPC UA

More
30 Oct 2023 11:41 #284118 by TheRoslyak
Replied by TheRoslyak on topic OPC UA
For now, you can try it out. To use it, you need to install the open62541 library.
git clone github.com/open62541/open62541.git
cd open62541
mkdir build && cd build
cmake ..
make
sudo make install

Download the project from here. github.com/TheRoslyak/OpcUaHalServer
sudo make
If everything goes without errors, launch linuxcnc or another hal application. Check the IP address. Enter 'opcuaserver' in the terminal. Then, you can access it either from the same computer or from another computer or phone. You can try the UaExpert client or Prosys (mobile). Currently, there are some issues. Not all variables are working for some unknown reasons, such as iocontrol.0.user-enable-out and others. I'll figure out why later. In the future, it will be necessary to create folders for Pins, Signals, Parameters. Everything should be organized into trees like in halshow. And the write function needs to be completed. For now, leave comments and suggestions on what else can be added to this utility."
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
30 Oct 2023 11:50 #284119 by bkt
Replied by bkt on topic OPC UA

I don't quite understand the point of this lecture. I've made it based on the open62541 library, and it seems that the licensing is all in order. I already have a working version. I'm currently refactoring the code and will release it soon for beta testing :)
 

for those who are not clear about the potential of opcua, certainly not for you and your work which I find very interesting (I correct my previous .... ).

Please Log in or Create an account to join the conversation.

More
30 Oct 2023 13:59 - 30 Oct 2023 14:32 #284128 by TheRoslyak
Replied by TheRoslyak on topic OPC UA
Well, yes, there is such a point. It's strange that I need to inform Linuxcnc users. Opc ua is an even more widespread term than linuxcnc :). For an overview, you can check out this guy:
www.youtube.com/playlist?list=PLIrJJXPVF...sA9tta8yULOB8nPUO_G7
I haven't even mentioned that there's also Opc UA TSN (FX). I uploaded a new version and fixed the bug with iocontrol.0.user-enable-out.
UPD.Perfect!!! Now the variable write function is working there too.
Last edit: 30 Oct 2023 14:32 by TheRoslyak.
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
31 Oct 2023 12:48 #284181 by TheRoslyak
Replied by TheRoslyak on topic OPC UA
Overall, work is completed. The server works perfectly. In Prosys, you can build graphs with a frequency of 100ms. UaExpert at a frequency of 50ms. If you create the client yourself, then I think it will work at the speeds of the HAL environment.
You can change variables that aren't available in halmeter.
And those variables that can't be changed - they log that everything is fine, but the variable doesn't actually change. Perhaps in the future, it will be possible to create a tree structure like in halshow. Or add some logs. Anyway, check it out. It might be useful for someone.
The following user(s) said Thank You: Mecanix

Please Log in or Create an account to join the conversation.

More
01 Nov 2023 14:46 - 01 Nov 2023 14:47 #284263 by Mecanix
Replied by Mecanix on topic OPC UA
Worth a look. We used to run offsite mechatronic hardware hosted by a PLC and an OPC server, that was in NX MCD (Siemens). Also widely used for virtualization and commissioning. That was like a decade+ ago however very much being developed and still in use today.

Reason I'm saying this is, I see endless potential.
Last edit: 01 Nov 2023 14:47 by Mecanix.

Please Log in or Create an account to join the conversation.

More
01 Nov 2023 17:34 #284268 by poesel
Replied by poesel on topic OPC UA
I use OPC UA on the job more or less daily. So I know what it is and what it does.
But I don't understand what the point is to have an OPC server with linuxcnc?
What do you do with it? Monitor? Control?

Please don't get me wrong. I find this interesting, but I just don't get the purpose.

Please Log in or Create an account to join the conversation.

More
01 Nov 2023 17:58 #284272 by Mecanix
Replied by Mecanix on topic OPC UA
The exposure this project bring to lcnc is positive. Purposes are unlimited; resiliency, scalability, data integrity and/or security, etc etc. Perhaps not well adapted for e.g. a home R&D (like mine) however more so in an industrial/scalable setting.

Please Log in or Create an account to join the conversation.

More
01 Nov 2023 22:15 #284290 by TheRoslyak
Replied by TheRoslyak on topic OPC UA
The thing is, I'm developing my own application similar to Codesys and Twincat using the HAL environment. Specifically, this utility is a universal solution that is also suitable for Linuxcnc. With its help, you can monitor the status of a machine (robot) while sitting in the restroom or while moving in the subway.:-) But it also allows you to change the value of variables on the fly, which halmeter does not allow.

Please Log in or Create an account to join the conversation.

More
19 Nov 2023 17:58 #285928 by bkt
Replied by bkt on topic OPC UA
Hey ...I integrate with succes opcua server to my qt c++ code .... and linuxcnc and opcua server start at same time ... like classicladder do ..... not so difficult you can integrate qtopcuaserver.h / .cpp to the code .... I suspect was quite easy to do with python or qtvcp too .... plus you can chose what pin can shared over opcua and what not. That is more safe than shared complete pin of lcnc to lan over opcua.

Please Log in or Create an account to join the conversation.

More
20 Nov 2023 19:08 - 20 Nov 2023 19:08 #286082 by TheRoslyak
Replied by TheRoslyak on topic OPC UA
I don't quite understand what is ultimately needed. And where to find qtopcuaserver.h. If the goal is to reduce the number of variables in the OPC UA server, I had an option. Output only Signals. (There are fewer of them, and you write the name yourself). I thought this could be done with some argument when launching opcuaserver, but it's easier to just comment out the lines.
/*   UA_NodeId pinsFolderId = createFolder("Pins");
    hal_pin_t *currentPin;
          for (currentPin = SHMPTR(hal_data->pin_list_ptr);
               currentPin;
               currentPin = SHMPTR(currentPin->next_ptr)) {
        addVariableWithDataSource(currentPin->name,
                                  currentPin->type,
                                  currentPin->signal ? static_cast<void*>;(SHMPTR(SHMPTR(currentPin->signal)->data_ptr))
                                                     : static_cast<void*>;(&;(currentPin->dummysig)),
                                  pinsFolderId);
    }*/

    UA_NodeId signalsFolderId = createFolder("Signals");
    hal_sig_t *currentSig;
          for (currentSig = SHMPTR(hal_data->sig_list_ptr);
               currentSig; currentSig = SHMPTR(currentSig->next_ptr)) {
    addVariableWithDataSource(currentSig->name,
                              currentSig->type,
                       SHMPTR(currentSig->data_ptr),
                              signalsFolderId);
    }

   /* UA_NodeId parametersFolderId = createFolder("Parameters");
    hal_param_t *currentParam;
            for (currentParam = SHMPTR(hal_data->param_list_ptr);
                 currentParam;
                 currentParam = SHMPTR(currentParam->next_ptr)) {
     addVariableWithDataSource(currentParam->name,
                               currentParam->type,
                        SHMPTR(currentParam->data_ptr),
                               parametersFolderId);
    }*/
Last edit: 20 Nov 2023 19:08 by TheRoslyak.

Please Log in or Create an account to join the conversation.

Time to create page: 0.099 seconds
Powered by Kunena Forum