Citect Substitution Syntax question

EICS

Member
Join Date
Dec 2008
Location
Melbourne, Australia
Posts
323
I have another Citect Substitution Syntax question
for a function below.

FUNCTION
TEST(STRING sTagbase)

// Digital Variable tags in database are FM_D1FIB1_TRIGGER, FM_D1FIB2_TRIGGER, FM_D1FIB3_TRIGGER etc

// STRING sTagbase is passed from another function as a String ! the prefix of tags for 9 devices e.g. FM_D1FIB1 or
// FM_D1FIB2 or FM_D1FIB3 etc

INT = bTagSub; ! Boolean substitution i want to use to replace tags

// i need to do a substitution below for the following example'FM_D1FIB1_TRIGGER' Digital tag
// something like sTagbase+"TRIGGER" = 1; but i cannot get the syntax correct
// the code below works but its specific to one device only

IF FM_D1FIB1_TRIGGER = 1 THEN ! Tag here needs to be substituted for sTagbase+"TRIGGER"

Do some code here .......

END

END
 
Last edited:
Since you need the value of the tag and you are constructing it dynamically you need to do a TagRead.

INT bTagSub = TagRead(sTagbase+"TRIGGER")
 

Similar Topics

I have created a project in Citect SCADA using a number of genies, however the order that the substitution parameters are listed when implementing...
Replies
1
Views
3,697
Hello, I have a running project on Citect v5.42 and simatic net v6.4 I have created a new spare PC and loaded all software like Citect, station...
Replies
0
Views
64
Hello everyone, In a factory where we installed Citect 7.20 the computer began to show the first signs of end of life. They never considered...
Replies
0
Views
71
I have a running backup of Citect and plc and I want to make a spare PC station so I have installed the win XP and somatic net v6.0 and import the...
Replies
3
Views
118
I am trying to display a variable within a cicode function onto a graphics page. This function queries a SQL database. I can get the value onto a...
Replies
3
Views
272
Back
Top Bottom