Applies To:
  • CitectSCADA 7.0
  • CitectHMI 7.0

Summary:

I have just upgraded my project to Citect v7.0 and I am getting the following error message when compiling:

I was able to compile my project successfully in previous version of Citect. 


Solution:

The first argument of the StrGetChar() function must be a cicode variable (STRING). In order to be able to compile the project, a work-around could be to stock the value of the variable tag in a cicode variable and then use the cicode variable in the StrGetChar() function. See example below:

DOES NOT COMPILE IN V7.0:

 

CTAG_NO is a variable tag defined in the project.

 

STRING Variable;

FUNCTION support()

    Variable = StrGetChar(CTAG_NO,2);

END

 

 

DOES COMPILE AND DOES WORK IN V7.0:

 

STRING Variable;

STRING Temp_CTAG_NO;

 

FUNCTION support()

    Temp_CTAG_NO = CTAG_NO;

    Variable = StrGetChar(Temp_CTAG_NO,2);

END

Also see KB Q5045.


Keywords:
 

Attachments