<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Activity for robertklonek</title><link href="https://forge.codesys.com/u/robertklonek/activity/" rel="alternate"/><id>https://forge.codesys.com/u/robertklonek/activity/</id><updated>2020-04-24T22:18:33.798000Z</updated><subtitle>Recent activity for robertklonek</subtitle><entry><title>robertklonek modified a comment on discussion Engineering</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/dbf5a245f1/?limit=25#a886" rel="alternate"/><published>2020-04-24T22:18:33.798000Z</published><updated>2020-04-24T22:18:33.798000Z</updated><author><name>robertklonek</name><uri>https://forge.codesys.com/u/robertklonek/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Engineering/thread/dbf5a245f1/?limit=25#a886</id><summary type="html">Hello, I was looking for this :-). Unfortunately, your yannickasselin1 method didn't work for me. I came up with a workaround - instead of FB_INIT I created a normal method: INIT (with the same implementation as FB_INIT). But since it's not called before running, I call them separately inside the FB_INIT method in another FB. For Example: MyObject METHOD init VAR_IN_OUT ptrCF : ptrCF; END_VAR HelpObject METHOD FB_INIT FOR i := 0 TO 3 DO MyObjectArray[i].init(ptrCF[i]); END_FOR GLOBAL_VAR MyObjectArray:...</summary></entry><entry><title>robertklonek posted a comment on discussion Engineering</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/dbf5a245f1/?limit=25#a886" rel="alternate"/><published>2020-04-24T22:17:08.036000Z</published><updated>2020-04-24T22:17:08.036000Z</updated><author><name>robertklonek</name><uri>https://forge.codesys.com/u/robertklonek/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Engineering/thread/dbf5a245f1/?limit=25#a886</id><summary type="html">Hello, I was interested. Unfortunately, your yannickasselin1 method didn't work for me. I came up with a workaround - instead of FB_INIT I created a normal method: INIT (with the same implementation as FB_INIT). But since it's not called before running, I call them separately inside the FB_INIT method in another FB. For Example: MyObject METHOD init VAR_IN_OUT ptrCF : ptrCF; END_VAR HelpObject METHOD FB_INIT FOR i := 0 TO 3 DO MyObjectArray[i].init(ptrCF[i]); END_FOR GLOBAL_VAR MyObjectArray: ARRAY[0..3]...</summary></entry><entry><title>robertklonek posted a comment on discussion Engineering</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/97ee57f7e2/?limit=25#91a1" rel="alternate"/><published>2020-04-15T17:08:14.673000Z</published><updated>2020-04-15T17:08:14.673000Z</updated><author><name>robertklonek</name><uri>https://forge.codesys.com/u/robertklonek/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Engineering/thread/97ee57f7e2/?limit=25#91a1</id><summary type="html">There is a way around to to that - instead of returning generic variable, writing result value to the given pointer: FUNCTION EXT_LIMIT VAR_INPUT anyValue : ANY_BIT; result : POINTER TO BYTE; END_VAR VAR lwValue : LWORD; END_VAR SysMemCpy(ADR(lwValue), anyValue.pValue, TO_DWORD(anyValue.diSize)); lwValue := LIMIT(0, lwValue, 10); SysMemCpy(result, ADR(lwValue), TO_DWORD(anyValue.diSize)); The function call is not beautiful, but it works ;-) EXT_LIMIT(BYTEValue, ADR(BYTEResult)); EXT_LIMIT(WORDValue,...</summary></entry></feed>