www.beck-ipc.comwww.beck-ipc.com  | ImprintImprint
FAQFAQ  | SearchSearch  |

Function from EXT LIB returns a structure

Questions and discussions about the CoDeSys editor V2.3.

I have a question regarding functions that return structures and that are located in external library which is part of RTS.

Let's say that I have a function named Dummy that's part of the RTS and looks like this:

Code: Select all
StructureType*   Dummy ( StructureType*  DataToBeLoaded){

// code, code, code, loading, loading loading the structure

return DataToBeLoaded;


I defined an external library in CoDeSys like this:

Code: Select all
FUNCTION Dummy: POINTER TO ARRAY[1..ArrayLength] OF StructureType


   DataToBeLoaded:    POINTER TO ARRAY[1..ArrayLength] OF StructureType;


The main task of this function is to take structure from CoDeSys and load it with data from file. I'm using C lib, because it is easier to manipulate complex text file, like the one I'm dealing with.

Problem is that DataToBeLoaded is not loaded with any data.

At the same time I see that function is being exectued and the structure inside of the function is being filled properly (I see it over Telnet).

Does anyone have some idea how to handle this?

Return to CoDeSys Editor V2.3

Who is online

Users browsing this forum: No registered users and 0 guests