I have an issue where I have extended a function block from a library, but when I try to use it with the library defined interfaces I get the attached error.
[ERROR] PRS Alternator Test: gAlarmManager(Line 5): C0032: Cannot convert type 'PceAlarms.IAlarmManager(pcealarms, 0.0.0.1 (powercore engineering))' to type 'IAlarmManager'
FUNCTION_BLOCK AlarmElement IMPLEMENTS IAlarmElement, PCI2.IBasicLogger
FUNCTION_BLOCK PceAlarm EXTENDS PceAlarms.AlarmElement
fbManager : PceAlarms.AlarmManager;
Manager : PceAlarms.IAlarmManager := fbManager;
ae000 : PceAlarm(AlarmManager:=Manager, alarm:=gAlarm.xwNULL, ....
How is the interface different when imported from a library vs being used inside the library? Am I doing something wrong? Should I organize the code a different way? Interfaces in their own library?
Send us a .projectarchive so we can check.
Log in to post a comment.