1

So I have a library project where I defined a couple of functionblocks and interfaces. Now I want to use this library in a plc project (in the same twincat solution). So I do the whole save all, rebuild, save and install as a library spiel. If I try to declare a VAR in my MAIN it will result in unknown type errors. I have fiddled around a bit, and when I declare an interface withouth any properties or methods (in the lib) then I it does show up and can be used in the MAIN. But as soon as I add a property or method the class/FB/POU dissapears in the eyes of my MAIN...

I feel like I'm overlooking some option / atribute to help the PLC project to use the lib properly... What am I missing here? EDIT: as you can see in the images, empty blocks are found, adding anything magically makes it dissapear error available classes

EDIT 2: I solved my problem by copying the lib to a new solution. Something in the original project made it be broken. Why it did that is still a mystery...

Daanvl
  • 598
  • 1
  • 8
  • 24

1 Answers1

0

Try following steps:

  • clean the solution where you programmed the library.
  • right click on the project and click check all objects

if this is successfull, install the library again, remove it from the reference section and re-add it. Then clean again and build all.

Filippo Boido
  • 950
  • 5
  • 11
  • I did, thats how I can see that if I remove all properties and methods from an interface or block that I can use it. Although it is useless in that way :( – Daanvl Oct 29 '19 at 08:57
  • Post some images so it is easier to understand where the problem is. – Filippo Boido Oct 29 '19 at 10:59
  • Open the reference section and click on your AutomaticProbeExchangeLib. Post a picture of the window pls where the content of the library is shown. – Filippo Boido Oct 29 '19 at 14:47
  • I just created a similar setup as yours and had no problems.. – Filippo Boido Oct 29 '19 at 14:48
  • okay, So I exported the library and tried it in a different solution. Works with no problems. I have no Idea why I broke it in the origional solution... – Daanvl Oct 30 '19 at 08:21