Write and Read OPC_UA Variables in the same server [message #1783555] |
Wed, 14 March 2018 02:39  |
Eclipse User |
|
|
|
In the examples of how to use opc_ua I saw that is possible access in the server some methods and variables using client or subscribe function blocks.
Accessing variables or methods by this way will create more trheads to implement the client function block to access the opc_ua node using an TCP connection? (as reference see the last example OPC UA Client in the documentation)
Is there another way to to do it? like the simple example in the open62541 repo
Att.
Felipe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Write and Read OPC_UA Variables in the same server [message #1784213 is a reply to message #1784203] |
Fri, 23 March 2018 10:31   |
Eclipse User |
|
|
|
Oh I see what you're doing now. With the WRITE_INCREMENT you are accesing the absolut path of the variable from SUBSCRIBE_1. I'm not sure about this, but when you use a publish in your local server, it creates or tries to get the variables from the localserver using the ID plus the name and data input/output of the connected FB, like SUBSCRIBE_1 (which uses increment/IN). But if you specify an endpoint (like you did in localhost:4840) it doesn't try to create the variables but only to get them, in your case, it works, since it retrieves the varaible from the server at localhost:4840 (the forte server).
Now, if you don't use localhost:4840, as said it will try to get or create the variable. In your case it looks for Objects/incrementer/IN/NumToIncrement/OUT (since it uses the connected FB). I think the problems lies here because Objects/incrementer/IN is already a variable and it will try to create another variable in it.
I'd say to use the localhost:4840 trick for now, but also suggest to specify in the ID of the opc_ua somehow to specify that the parameter is a absolut path and don't use the connected FB (maybe just for the type but not for the name). This will need some opinion from Stepahn
|
|
|
|
|
|
|
|
|
|
Re: Write and Read OPC_UA Variables in the same server [message #1793952 is a reply to message #1785674] |
Tue, 21 August 2018 01:18  |
Eclipse User |
|
|
|
Hi there.
I am trying create a OPCUA_Var block to allow the forte application write on a OPC UA variable internally, but actually forte create variables (PUBLISh and SUBCRIBE FB) using the numeric ID and is not possible to know what numeric ID will be attributed to the variable a priori. just after using uaexpert.
Is there any way to force a numeric ID when using SUBSCRIBE or PUBLISH Function Blocks, this would make it easier to configure the OPCUA_Var block with the numeric ID defined in the PUBLISH or SUBSCRIBE Blocks.
|
|
|
Powered by
FUDForum. Page generated in 0.07878 seconds