<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Stack overflow with really simple function</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/77f576c331/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/77f576c331/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/77f576c331/</id><updated>2024-09-23T09:57:33.244000Z</updated><subtitle>Recent posts to Stack overflow with really simple function</subtitle><entry><title>Stack overflow with really simple function</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/77f576c331/?limit=25#59cc" rel="alternate"/><published>2024-09-23T09:57:33.244000Z</published><updated>2024-09-23T09:57:33.244000Z</updated><author><name>opineiro</name><uri>https://forge.codesys.com/u/opineiro/</uri></author><id>https://forge.codesys.com062204ba6931d90f14bf77002e6852987a614d8c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks, I'm going to rework everything with this in mind.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Stack overflow with really simple function</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/77f576c331/?limit=25#358f" rel="alternate"/><published>2024-09-20T07:57:16.362000Z</published><updated>2024-09-20T07:57:16.362000Z</updated><author><name>TimvH</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com6aabad71dabc65f7d579ac1a80bdb8fa48fb9ae7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You have declared the function block in a function and call the instance also from a function. This is not correct, because a function is initialised with every call.&lt;/p&gt;
&lt;p&gt;The http client function block should be declared as Global Variable if you want to cal it from a Function, but probably it is better to declare it in a Program and also call the instance of the http function block from the same Program.... The variables of a Program are not initialised with each call.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Stack overflow with really simple function</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/77f576c331/?limit=25#bb21" rel="alternate"/><published>2024-09-19T12:28:00.294000Z</published><updated>2024-09-19T12:28:00.294000Z</updated><author><name>opineiro</name><uri>https://forge.codesys.com/u/opineiro/</uri></author><id>https://forge.codesys.combc587e0f0e536edb0229f948818b7be8306fa98a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi and thanks for your reply.&lt;br/&gt;
Could you explain a little bit more what you mean? &lt;br/&gt;
I think I'm not following you&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Stack overflow with really simple function</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/77f576c331/?limit=25#9283" rel="alternate"/><published>2024-09-19T12:27:55.565000Z</published><updated>2024-09-19T12:27:55.565000Z</updated><author><name>opineiro</name><uri>https://forge.codesys.com/u/opineiro/</uri></author><id>https://forge.codesys.com33c93e1c12489b09b2f337ce9d59cd887afd6f9a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi and thanks for your reply.&lt;br/&gt;
Could you explain a little bit more what you mean? &lt;br/&gt;
I think I'm not following you&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Stack overflow with really simple function</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/77f576c331/?limit=25#beaa" rel="alternate"/><published>2024-09-17T14:47:29.461000Z</published><updated>2024-09-17T14:47:29.461000Z</updated><author><name>ph0010421</name><uri>https://forge.codesys.com/u/ph0010421/</uri></author><id>https://forge.codesys.coma9219b2bad3a08c944c5a2f8f90e662c8cbf907b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello&lt;br/&gt;
I wouldn't call an FB from inside a FUN; it feels wrong to me.&lt;br/&gt;
I have had something &lt;em&gt;similar&lt;/em&gt;. Try declaring the FB instances as GlobaVars rather than the instance memory.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Stack overflow with really simple function</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/77f576c331/?limit=25#20c3" rel="alternate"/><published>2024-09-16T09:27:45.691000Z</published><updated>2024-09-16T09:27:45.691000Z</updated><author><name>opineiro</name><uri>https://forge.codesys.com/u/opineiro/</uri></author><id>https://forge.codesys.com5a8fbdf88a1e8ab6288e2e48f08073e4cc23f3cb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, I have an issue with a function which sends a message through API Rest. I'm using a function from httpCLient library.&lt;/p&gt;
&lt;p&gt;I have tested this function inside a program and it works fine. But when I want to use it inside a function (so I can call it simultaneously from 2 different points on the main program) it gives a stack overflow error.&lt;br/&gt;
In detail it says: "&lt;em&gt;C0297 Stack Overflow on Main Task. Stack sizes... Call hierarchy:&lt;/em&gt;"&lt;/p&gt;
&lt;p&gt;I have simplified as much as I can the function, but I'm hitting a wall with this. Anybody has an idea of what's wrong?&lt;br/&gt;
Thanks!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>