Citect 5.5 to 7.3 Upgrade - Cicode Compile Error

mmx4000

Member
Join Date
Jun 2008
Location
Ontario
Posts
11
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 errors involving the cicode files.

Here's what the error states:
"Incorrect number of arguments for function"
This occurs for MANY of the instances where TagWrite was used, here's an example:
TagWrite("Lft_Calculation"+IntToStr(count));

According to the help files, TagWrite wants these parameters:
TagWrite(STRING sTag, STRING sValue [, INT nOffset] [, INT bSynch] [, STRING ClusterName])

And an example of a proper TagWrite is:
TagWrite("PLC_VAR1", 123);

So it seems that leaving out the second parameter was okay back in Citect 5.5, but 7.3 is being fussy with it. My question would be, what parameter should be added to TagWrite in version 7.3 in order to have the same behavior that omitting the parameter in 5.5 would have?

There's a ton of TagWrite spread across many Cicode files. The Cicode is quite messy as well, so getting the same behavior is critical. Any help is greatly appreciated!
 
Hi,
Not sure about your specific question but just be aware (as I wasn't) that when you upgrade you'll need to buy a new license as well.

I went from 6.0 to 6.1 (after the PC died) thinking it would just be the same but they wanted a LOT of money for a new license (around £3,000!!!).

I ended up re-formatting the new PC and putting version 6.0 back on so that my old dongle would work...

Just some info that I thought might be useful.

;-)
 
V0N_hydro, that's what I'm thinking as well. I just don't have the means or the time to test it just quite yet. I couldn't imagine it being anything else, but I've been surprised before.

uptown47, thanks for the heads up. We did purchase the new license for 7.3. The 5.5 is running on an old Windows NT machine, and since those are hard to come by these days, we decided to upgrade to something that can run on a modern OS and machine.

If anyone else has any insight into this, it would be greatly appreciated.
 
In 7.3 there is a good search function available so it should be relatively easy to find all the tagwrite calls and add the missing parameter (empty string "")
You could even do a search and replace, and replace all the tagwrite calls with your own function that has the second argument as optional(with an empty string as the optional value) and then in your new function then call tagwrite. I would not do it this way (just saying you could)
 
There have been changes in the way the TagWrite function works between V5.5 to V7.3. It is to do with the introduction of Clustering in Citect. You have to add the missing parameters as GeoffC mentioned by adding empty strings and integers.

So in your case use the following: TagWrite("Lft_Calculation",IntToStr(Lft_Calculation + count),0,0,"");
 
So in your case use the following: TagWrite("Lft_Calculation",IntToStr(Lft_Calculatio n + count),0,0,"");
Don't think that is quite true - you only need two parameters for the function - the tag name, and the value. All the other parameters are optional. The change in later versions of citect made the value a required parameter (would default to "" in v5.5)
 
OK, you could leave out the optional parameters. But I had an instance recently where I had to add all of the optional parameters. The reason for this was because it was a clustered system.

I reckon that the issue with compile is that there is a comma missing between "Lft_Calculation" and +IntToStr(count)). I think that the instruction should be corrected to "TagWrite("Lft_Calculation",IntToStr(Lft_Calculation + Count)).

But I could be wrong.
 
From what I can tell, the compiler is quite alright with just adding the "" for the second parameter. Leaving the other parameters blank seems to work just fine. There also doesn't seem to be a major issue when dealing with the '+' in the example command I gave:

TagWrite("Lft_Calculation"+IntToStr(count));

I modified that particular string to:
TagWrite("Lft_Calculation"+IntToStr(count),"");

Compiler was happy enough with the addition of the blank parameter. I will keep an eye out on the behaviour of the code once I finish the migration process, and might have to change it like andybutcher said in the previous post. I'll keep the thread updated with my results as I go along.

Thanks for the help thus far! :D
 
For the sake of completion, that was the only major issue we had in converting 5.5 code to 7.3.

The only other issue we encountered was a script that would parse a text file for recipe data. The existing code would incorrectly display the last values of each line of the text file. Minor adjustments were made, and the rest of the code worked as intended.

Thanks again for all the help!
 

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,309
hello everybody. i have a system Scada use by Citect 6.1. Now, I want to upgrade soft to version latest 7.2. So, I need to support from you. my...
Replies
18
Views
13,312
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,467
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,120
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