I made a custom function block which uses FB_XmlSrvRead
and FB_XmlSrvWrite
from the Tc2_TcXmlDataSrv library, to read and write an xml file. The functionality of the custom function blocks are tested with the TcUnit library. After moving the unit tests to a new project, only the tests which used the either a xml read or write failed, but other unit tests in the new project still worked.
The xml function blocks reported the following error:
Error code | Name | Description |
---|---|---|
1808 | ADSERR_DEVICE_SYMBOLNOTFOUND | Symbol not found. |
I tried to write different symbols, but each time it failed. I'm quite sure the symbols exist.
It turned out that I had added {attribute 'hide'}
above the program which I used to execute the unit tests. Somehow this caused only the unit tests which needed to read or write an xml file to fail. Other unit tests were not affected.