EICS
Member
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
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: