Error on using structured variable in a Method of an Interface – Support Elsist https://support.elsist.biz/forums/topic/error-on-using-structured-variable-in-a-method-of-an-interface/feed/ Fri, 30 Oct 2026 08:12:41 +0000 https://bbpress.org/?v=2.6.20 it-IT https://support.elsist.biz/forums/topic/error-on-using-structured-variable-in-a-method-of-an-interface/#post-81769 Error on using structured variable in a Method of an Interface https://support.elsist.biz/forums/topic/error-on-using-structured-variable-in-a-method-of-an-interface/#post-81769 Tue, 29 Apr 2025 14:02:14 +0000 George I have another question about using structure type variable in a Method of an Interface, when I use object-oriented features I get

IDev.open.cfg – error A4109:  cfg => Invalid base object type

METHOD open: BOOL

VAR_INPUT
cfg : sDevCfg;
END_VAR

The strange behavior is that in some cases the structure type variable in Method prototype specification in an Interface. Adding in a Function Block a Method with VAR_INPUT structure type variable  is accepted without errors.

The problem is in interface definition.

]]>
https://support.elsist.biz/forums/topic/error-on-using-structured-variable-in-a-method-of-an-interface/#post-81774 Rispondi a: Error on using structured variable in a Method of an Interface https://support.elsist.biz/forums/topic/error-on-using-structured-variable-in-a-method-of-an-interface/#post-81774 Tue, 29 Apr 2025 14:05:43 +0000 Sergio Bertana Hi George I’ve tried to recreate the same behaviour you report in the TestInterface program (Download).

In the screenshot you can see the program structure.

Can you verify if the program I made recreate exactly your situation?

]]>
https://support.elsist.biz/forums/topic/error-on-using-structured-variable-in-a-method-of-an-interface/#post-81777 Rispondi a: Error on using structured variable in a Method of an Interface https://support.elsist.biz/forums/topic/error-on-using-structured-variable-in-a-method-of-an-interface/#post-81777 Tue, 29 Apr 2025 15:03:58 +0000 George Yes I tested your program and compiles correctly.

Now I gonna test this function in my program.

]]>