Applies To:
  • CitectSCADA 5.xx

I've been writing some applications using ctAPI functions, but I am having a problem in that I am getting an assertion fault every time I do a ctListAdd to a new list.  The first tag added is ok, but the rest of the added tags reports an assertion error (popup message):

Assertion failed !


File: N:\SOURCE\api\ipc\CTAPI_L.C

Line: 659

Expression: dw_Status == ERROR_NOT_SAME_DEVICE

What is causing this problem?


I suspect this error may be caused by your particular protocol driver.  You could verify that is the problem by running the EXAMPLE project on your system and see if your CTAPI code works.

If you are using a non-standard protocol driver then please check the PROTDIR.DBF file.  If you have edited the PROTDIR.DBF file in the \CITECT\BIN directory then you must also copy this file to the CITECT\USER\INCLUDE directory. The CTAPI interface uses the PROTDIR.DBF file from the \CITECT\USER\INCLUDE directory and if it is different to the \CITECT\BIN version, then you may get some problems.  See KB Q2546 for details on this.