upgrade Citect 6.1 to Citect latest version

Thanks for the PM but it don't reply direct to messages, haven't got time.

As has been pointed out above all these errors are to do with clustering and some deprecated functions, you will need to create a cluster and point your I/O server and in turn I/O devices to it.

You will then need to go through the other errors and decide if they were there before the upgrade or if they are indeed caused by deprecated functions, if they are you will need to recode them or delete if they are unused, for instance some may be in an older include project and unused.
 
Thanks for the PM but it don't reply direct to messages, haven't got time.

As has been pointed out above all these errors are to do with clustering and some deprecated functions, you will need to create a cluster and point your I/O server and in turn I/O devices to it.

You will then need to go through the other errors and decide if they were there before the upgrade or if they are indeed caused by deprecated functions, if they are you will need to recode them or delete if they are unused, for instance some may be in an older include project and unused.

Hi Thanks for reply me, :)

TQVM for your advise, i managed to solve most of the error. But, i still have some obsolete cicode like AlarmSetQuery(iAN, "", ""); i don't know how to fix it, i try to search google to solve this problem, what i can get is using alarmfilterFunction to do the conversion & i no idea on that. Attach is the CVS_Alarm Cicode that have error. Hoping can get some advise from you.🤞🏻

cicode_1.jpg cicode_2.jpg
 

Attachments

  • CSV_Alarms.zip
    16.8 KB · Views: 3
Its all detailed in the help files:

Converting Legacy AlarmSetQuery() Functions

With the release of CitectSCADA 7.30, the AlarmSetQuery() and Query() Cicode functions were replaced with a set of alarm filter functions. If your project uses AlarmSetQuery(), you will need to review and manually replace each instance with the alarm filter edit functions (see Implementing Queries that Use Custom Alarm Filters).

Below are examples of v7.20 Cicode and what the v7.30 Cicode may look like with the new alarm filter edit functions.

Conversion examples from v7.20 to v7.30:

v7.20 code:


….
INT resultAlarmSetQuery=0;
// e.g. fieldName = Category, fieldValue = 10
// or fieldName = Tag, fieldValue = DigitalAlarm1
resultAlarmSetQuery =
AlarmSetQuery(21,"AlarmFilter","^""+fieldName+"^",^""+filterValue+"^"");//Obsolete in v7.30
…….
PUBLIC
INT
FUNCTION AlarmFilter
(INT iRecId,
INT iInst,
STRING fieldName,
STRING filterValue)

INT resultFilter=0;
STRING getValue="";

getValue = AlarmGetFieldRec(iRecId, fieldName, iInst);

IF filterValue = getValue THEN
resultFilter = TRUE;
ELSE
// when "*" entered -> all values are accepted
IF filterValue = "*" THEN
resultFilter = TRUE;
ELSE
resultFilter = FALSE;
END
END;

RETURN resultFilter;

END


v7.30 code:

….
INT resultAlarmSetQuery=0;

//AlarmSetQuery(21,"AlarmFilter30","^""+fieldName+"^",^""+filterValue+"^"");Obsolete in 7.30

//replace the above by direct call
resultAlarmSetQuery = AlarmFilter730(fieldName,filterValue);

....

PUBLIC
INT
FUNCTION AlarmFilter730

(STRING fieldName,
STRING filterValue)

INT hndl=-1, resultFilter=-1;
TRING sFilter="";

sFilter = fieldName + "=" + filterValue;
hndl= AlarmFilterEditOpen(21);
IF hndl <> -1 THEN
resultFilter = AlarmFilterEditSet(hndl,sFilter)
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditCommit(hndl)
END
AlarmFilterEditClose(hndl)
END

RETURN resultFilter;

END



Another example of how this function could be returned:



PUBLIC
INT
FUNCTION AlarmFilter730
(STRING fieldName,
STRING filterValue)

INT hndl;
INT resultFilter=-1;

hndl = AlarmFilterEditOpen(21);
IF hndl <> -1 THEN
resultFilter = AlarmFilterEditSet(hndl, fieldName)
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditAppend(hndl, "=^"")
END
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditAppend(hndl, filterValue)
END
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditAppend(hndl, "^"")
END
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditCommit(hndl)
END
AlarmFilterEditClose(hndl)
END

RETURN resultFilter;

END
 
Its all detailed in the help files:

Converting Legacy AlarmSetQuery() Functions

With the release of CitectSCADA 7.30, the AlarmSetQuery() and Query() Cicode functions were replaced with a set of alarm filter functions. If your project uses AlarmSetQuery(), you will need to review and manually replace each instance with the alarm filter edit functions (see Implementing Queries that Use Custom Alarm Filters).

Below are examples of v7.20 Cicode and what the v7.30 Cicode may look like with the new alarm filter edit functions.

Conversion examples from v7.20 to v7.30:

v7.20 code:


….
INT resultAlarmSetQuery=0;
// e.g. fieldName = Category, fieldValue = 10
// or fieldName = Tag, fieldValue = DigitalAlarm1
resultAlarmSetQuery =
AlarmSetQuery(21,"AlarmFilter","^""+fieldName+"^",^""+filterValue+"^"");//Obsolete in v7.30
…….
PUBLIC
INT
FUNCTION AlarmFilter
(INT iRecId,
INT iInst,
STRING fieldName,
STRING filterValue)

INT resultFilter=0;
STRING getValue="";

getValue = AlarmGetFieldRec(iRecId, fieldName, iInst);

IF filterValue = getValue THEN
resultFilter = TRUE;
ELSE
// when "*" entered -> all values are accepted
IF filterValue = "*" THEN
resultFilter = TRUE;
ELSE
resultFilter = FALSE;
END
END;

RETURN resultFilter;

END


v7.30 code:

….
INT resultAlarmSetQuery=0;

//AlarmSetQuery(21,"AlarmFilter30","^""+fieldName+"^",^""+filterValue+"^"");Obsolete in 7.30

//replace the above by direct call
resultAlarmSetQuery = AlarmFilter730(fieldName,filterValue);

....

PUBLIC
INT
FUNCTION AlarmFilter730

(STRING fieldName,
STRING filterValue)

INT hndl=-1, resultFilter=-1;
TRING sFilter="";

sFilter = fieldName + "=" + filterValue;
hndl= AlarmFilterEditOpen(21);
IF hndl <> -1 THEN
resultFilter = AlarmFilterEditSet(hndl,sFilter)
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditCommit(hndl)
END
AlarmFilterEditClose(hndl)
END

RETURN resultFilter;

END



Another example of how this function could be returned:



PUBLIC
INT
FUNCTION AlarmFilter730
(STRING fieldName,
STRING filterValue)

INT hndl;
INT resultFilter=-1;

hndl = AlarmFilterEditOpen(21);
IF hndl <> -1 THEN
resultFilter = AlarmFilterEditSet(hndl, fieldName)
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditAppend(hndl, "=^"")
END
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditAppend(hndl, filterValue)
END
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditAppend(hndl, "^"")
END
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditCommit(hndl)
END
AlarmFilterEditClose(hndl)
END

RETURN resultFilter;

END


Ya, i seen this one, but i don't understand it. :cry:
 

Similar Topics

I have upgraded Citect from 5.4 to 7.4 following the upgrade path, the program compiles and runs fine but a super genie that displays 3 trends...
Replies
7
Views
7,305
I'm currently trying to upgrade a Citect 5.5 project to 7.3. The conversion process seems to work just fine, but I'm getting a few compiling...
Replies
9
Views
7,357
I have 2 servers and need to provide a redundancy system. Pc1 is the old one, running on windows xp sp3, citect 7.1. Pc2 is the new one, running...
Replies
8
Views
9,464
Hi folk, I have allen bradley plc 5/30 and citect version 3.4, recently i want to upgrade it (citect) to newer version7 ( the allen bradley...
Replies
2
Views
3,118
G
Hi Folks, When i upgrade the Citect V5.21 SPack G from Windows NT to Windows 2000 Professional , i have this message "Cannot find "siemen"...
Replies
2
Views
4,639
Back
Top Bottom