Forum Replies Created
As I understand, OPC UA doesn’t use COM objects, so thread mode is not a problem here. Is it true or not?
I got the following error : “ActiveX control ‘8856f961-340a-11d0-a96b-00c04fd705a2’ cannot be instantiated because the current thread is not in a s single-threaded apartment” by using 2 functions from Opc.Ua and Opc.Ua.Configuration DLL. The strange thing is it’s working well on another GUI project, but for the DLL it doesn’t looks like good. I Verified and you correctly used [STAThread] before the Main of ScadaCommCtrl, so normally the DLL would also be on STA mode anyway. But no.
I hope Assembly.LoadFile & (KPView)Activator.CreateInstance are heriting correctly the STA mode. (I tried to modify it in the DLL, but impossible, and also make these 2 functions in another thread, in STA mode, but it’s freezing or something like this).
Do you know how to debug DLLs and set breakpoints? If not, I will give you a clue. It will help to understand. Also use WriteToLog method.
Yeah I almost understood all of the logic. Tricky but clever.
And currently I’m stuck because a OPC UA function cannot be used because the DLL is called with MTA Thread mode, and it would be on STA..
If you have a solution, don’t hesitate to share it to me.
Exactly, I based my work on your KpOpc projet to make KpOpcUA Demo DLL.
Now I’m working on KpLogic (the result of FrmConfig is on the screen). The best thing would be a graph to understand which function are called by KP when it’s try to load DLLs (I just understood that there is a part for configuration, and a part for communication with web server directly without form).
I try to understand how you link OPC Tags because in :
KpOPC.xml : you only got dataitem name, no unique identifier.
OpcDemo.tbl : name of tag & cnlNum
inputChannel in dataBase : nb like cnlNum, tagname and a signal number
Why don’t associate directly Tag path (ex: Group1.group2.item1.item2.Int8) with an unique identifier for web server ? I saw that it’s managed by subjective index in the sorted order… And i don’t want to change KP project.
I just saw Kp…Logic.cs looks like that I searched
For the number 1, I think it’s because the Github version and the last Release are not the same. But if you say that you download on both system with the same way, I don’t know, maybe RapidScada try to use some Windows DLL but when it doesn’t find them it goes over.
Anyway I’ll try it later, I’m on windows for now, but thank you.
Ok I made something cool to grab values
Now, I would like to understand how do you manage to associate these values (in KpOpcUA_061.xml) to server (to display it on web interface ofc) ?
I already created all needed stuff on ScadaAdmin (like DeviceType, Device etc…) but I don’t know how the server works to grabs values added by the admin. I think it loads DLL and try to read specific function ?
After I have to manage the DLL for KpOpcUA_061.xml specs (like serverpath).
Seems interesting, but how, in Linux environment, the DLL system can work ?
Thank you very much, I understood the “discovery” of DLLs.
I would like to implement RapidScada web server on a Linux environment. We’re agree that DLL import functionalities is not working ?! Then OPC (DA) is not working on Linux, Mono ?
I can dev an OPC UA dll (for windows) but my main goal is to integrate all this stuff on Linux (and so have OPC UA, because DA is only on windows).
I’m looking for updated KpOpc.dll sources if possible.
Why don’t you put them on Github ?
My goal is to implement OPC UA in RapidScada.