<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to InOut Parameter issue</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4daf7f8c6e/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4daf7f8c6e/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/4daf7f8c6e/</id><updated>2023-07-04T02:30:57.797000Z</updated><subtitle>Recent posts to InOut Parameter issue</subtitle><entry><title>InOut Parameter issue</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4daf7f8c6e/?limit=25#1e74" rel="alternate"/><published>2023-07-04T02:30:57.797000Z</published><updated>2023-07-04T02:30:57.797000Z</updated><author><name>ben1</name><uri>https://forge.codesys.com/u/ben1/</uri></author><id>https://forge.codesys.com1cd1a0aacde3a1159f39ddcb841bb6c70810b4ce</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;No problem.&lt;/p&gt;
&lt;p&gt;I had a quick look at one of my programs and there are some actions inherent to some code I have brought in for email etc.&lt;/p&gt;
&lt;p&gt;It appears to me they are all called from within the FB or POU that they are used in, not outside as you have displayed in your snip.&lt;/p&gt;
&lt;p&gt;I see you have called it directly after the FB, so can you not call it directly at the bottom from within the FB instead?&lt;/p&gt;
&lt;p&gt;I believe usually you could call the action from somewhere else, but as you mentioned yourself it does not pass any information, so perhaps the in_out var is causing it some confusion.&lt;/p&gt;
&lt;p&gt;A good test might be to try removing the in out parameter.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>InOut Parameter issue</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4daf7f8c6e/?limit=25#a917/c34f" rel="alternate"/><published>2023-07-03T12:08:05.596000Z</published><updated>2023-07-03T12:08:05.596000Z</updated><author><name>cullenary767</name><uri>https://forge.codesys.com/u/cullenary767/</uri></author><id>https://forge.codesys.com7b93d790cc11b7b25f083bdc5a62b52c9d80d221</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you Ben for your reply!&lt;br/&gt;
I initially wanted to use actions because i dont been to pass information in and out of the block. I believe this would have been "neater" but then i encountered this issue. &lt;/p&gt;
&lt;p&gt;I did try the assignment as you suggested "fbHomeSystems.ACTInit(stKineDataRef:=stKineDataRef)" however this did not work either. I have reverted back to using methods and it does seem to work fine barring afew warnings about externaly accessing an internal In_out parameter from an external method call.&lt;/p&gt;
&lt;p&gt;I just thought this was quite odd that codesys would have an issue like this in regards to actions but not methods.Wouldnt the assignment such as fbHomeSystems(stKineDataRef:=stKineDataRef);&lt;br/&gt;
be carried out throughout the objects life during execution ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>InOut Parameter issue</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4daf7f8c6e/?limit=25#a917" rel="alternate"/><published>2023-07-01T08:19:58.522000Z</published><updated>2023-07-01T08:19:58.522000Z</updated><author><name>ben1</name><uri>https://forge.codesys.com/u/ben1/</uri></author><id>https://forge.codesys.com027824a68cf6509991d113844ee46204571cd0fb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey pal,&lt;/p&gt;
&lt;p&gt;Any reason you choose an action &amp;amp; not a method?&lt;br/&gt;
I have not used actions myself, but if it handle like an FB I believe it wants the IN_OUT to be nested in the calls brackets. (  EG. fbHomeSystems.ACTInit(stKineDataRef:=stKineDataRef);  )&lt;/p&gt;
&lt;p&gt;You could try doubling up (being an in_out, I think it won't matter), or you could try only referencing it in the direct action rather than the call above, unless of course it is needed elsewhere in the FB.&lt;/p&gt;
&lt;p&gt;Let us know how that pans out.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br/&gt;
Ben&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>InOut Parameter issue</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4daf7f8c6e/?limit=25#3b66" rel="alternate"/><published>2023-06-27T09:19:53.647000Z</published><updated>2023-06-27T09:19:53.647000Z</updated><author><name>cullenary767</name><uri>https://forge.codesys.com/u/cullenary767/</uri></author><id>https://forge.codesys.comebad5e7d35604ed312404377b8bbb614254ba676</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Good Day&lt;/p&gt;
&lt;p&gt;Im having an issue that im hoping someone could help me with.&lt;br/&gt;
I have created a function that uses an in_out variable. The function also contains actions.&lt;/p&gt;
&lt;p&gt;I then created an object from the function and assigned the in_Out variable before using the objects actions. However, when i try to call the objects actions it returns a "VAR_IN_OUT must be assigned when calling function". This is odd because is have already assigned the in_out parameter to the object before I used the object action.&lt;/p&gt;
&lt;p&gt;Im using codesys v3.5 sp19 &lt;/p&gt;
&lt;p&gt;any help would be very appreciated &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>