<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to OPC UA Method - How to wait for result?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b2f94e013f/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b2f94e013f/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/b2f94e013f/</id><updated>2025-04-02T15:09:34.275000Z</updated><subtitle>Recent posts to OPC UA Method - How to wait for result?</subtitle><entry><title>OPC UA Method - How to wait for result?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b2f94e013f/?limit=25#c647" rel="alternate"/><published>2025-04-02T15:09:34.275000Z</published><updated>2025-04-02T15:09:34.275000Z</updated><author><name>benemenn</name><uri>https://forge.codesys.com/u/benemenn/</uri></author><id>https://forge.codesys.comfd30855087ba8aa4bac9f1e2f43a34cb8030ec11</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;so from what i've learned. Codesys OPCUA Server can only provide OPC UA Methods, when they are created in an XML Model beforehand. So you have to create the XML Model with OPC UA Methods. Then load that model into codesys and create the IEC Blocks. This is automated Code and will create all the variables and Methods from your XML Model. Then they will be displayed on discovery with an OPC UA Client. &lt;/p&gt;
&lt;p&gt;As far as I understood. There is no way for Methods to be shown in OPC UA when not using an external XML Informationmodel. Codesys can not yet create the informationmodel on itself.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OPC UA Method - How to wait for result?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b2f94e013f/?limit=25#4f13" rel="alternate"/><published>2025-04-02T15:09:19.799000Z</published><updated>2025-04-02T15:09:19.799000Z</updated><author><name>benemenn</name><uri>https://forge.codesys.com/u/benemenn/</uri></author><id>https://forge.codesys.com67c8d2ea7cbdc2d412c437fc91dfe6e77e717eab</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;so from what i've learned. Codesys OPCUA Server can only provide OPC UA Methods, when they are created in an XML Model beforehand. So you have to create the XML Model with OPC UA Methods. Then load that model into codesys and create the IEC Blocks. This is automated Code and will create all the variables and Methods from your XML Model. Then they will be displayed on discovery with an OPC UA Client. &lt;/p&gt;
&lt;p&gt;As far as I understood. There is no way for Methods to be shown in OPC UA when not using an external XML Informationmodel. Codesys can not yet create the informationmodel on itself.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OPC UA Method - How to wait for result?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b2f94e013f/?limit=25#26c3" rel="alternate"/><published>2025-03-28T11:40:43.892000Z</published><updated>2025-03-28T11:40:43.892000Z</updated><author><name>dat422</name><uri>https://forge.codesys.com/u/dat422/</uri></author><id>https://forge.codesys.combac8bcf94e13686fe58611ced8d4f38b40a01e51</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, I am also interested to know on how to use the Codesys OPCUA Client to call methods from e.g. a python opcua server.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OPC UA Method - How to wait for result?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b2f94e013f/?limit=25#2eec" rel="alternate"/><published>2025-03-26T15:08:30.861000Z</published><updated>2025-03-26T15:08:30.861000Z</updated><author><name>benemenn</name><uri>https://forge.codesys.com/u/benemenn/</uri></author><id>https://forge.codesys.come3e3bf8f46f16c2851433747b97a2ed9276c55d9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, just being curious. Are you providing opc ua methods or calling them? &lt;br/&gt;
Either way, how did you implement this? &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OPC UA Method - How to wait for result?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b2f94e013f/?limit=25#70b0" rel="alternate"/><published>2025-01-13T13:10:59.231000Z</published><updated>2025-01-13T13:10:59.231000Z</updated><author><name>climblinne</name><uri>https://forge.codesys.com/u/climblinne/</uri></author><id>https://forge.codesys.comd386e028eca7bc9d63aaf2b097c0da1ff96cf9ab</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am already able to run an OPC UA method in Codesys. Now my question, how can I interact with other tasks (e.g. read an SDO from EtherCAT and return it by the function)?&lt;/p&gt;
&lt;p&gt;The OPC UA method seems to be called only once (I tried to return BOOL or UINT values).&lt;/p&gt;
&lt;p&gt;Up to now I only found to do a while loop to wait for the result of the other task.&lt;/p&gt;
&lt;p&gt;Is there a better way to do it? &lt;br/&gt;
Is this the way OPC UA functions should be used (for "not too long" function calls) or should I use antother mechanism (method: Start, event: Finish, method: getResult)?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>