Citect Cicode Programming

G

Thread Starter

ghate Vinod

Hello Friends;

I'm trying following in citect 7.1 But unable to do can you pl. help me?

1. In my project i have all analog indications (press. flow etc.) I have prepared a common genie. Now i want to display the Variable tag comment as mouse rollover the particular tag in run time. I found some code in help (Knowledge base article 5732) but it is mainly for Digital tag & secondly i don't know how to make it work.

2. I want to set a rectangular window (which is already included in genie) to flash on some condition (Let say IF PI101_PV >100 THEN the rectangular Window should flash in RED & BLACK Color). Now if operator acknowledges this by mouse click or by some key board command the window flashing will become stable in red color as the condition still exists. & after PI101<100 the window will become normal black. Pl guide me to achieve both the functions. Thanks in advance.
 
Hi ghate Vinod,

For tool tip at runtime you follow below mention steps.

Step 1:- first use "DspGetMouse" find the location of the mouse and set the x and y coordinated into x and y variable.

Setp 2:- After getting x & Y position Store the AN number into a cicode variable with help of “DspGetaN" function.

Step 3:- USING "Dspinfo & tagInfo" function reads the variable tag name of the current AN and comment of tag display tag.

Step 4:-using "DspSetTip" function Sets the tool tip of current AN

For Second Query
In Symbol Set Properties - Appearance General (Multi-state)
The conditions you enter here will occur together in different ways, at different times. You can use each different combination to determine which symbol will display

Best Of Luck

jimmi
 
G
jimmi;

Thanks for the reply.

1.I had got a article in knowledge base which gives the code for doing the same. but it wont work. It has used the Commands that you have mentioned.

2. I already have tried the multistate function. This only starts the blinking but does not stable it as i'm unable to define the operator access to make it stable.
 
Hi,
i know u have a article but i already used those command which i mention you and its work. for your information i used same cicode for more than 500 Analog tags. and its display the comments.

Thanks & Regards,
Jimmi
 
G
Dear Jimmi;

Can you Pl. give me the Cicode file. & the format in which it has to write. How to call this file in run time?

I'd really thankful to you.
 
Hi,
please go thorugh code...<pre>
FUNCTION runtimetip_address()
WHILE 1 DO
DspGetMouse(ix,iy);
iAN = DspGetNearestAn(ix,iy);
hInfo = DspInfoNew(iAN);
sTagname = DspInfo(hInfo,3,0);
sTagRead = TagInfo("sTagname",20);
sTip = DspGetTip(iAN,0);
iStrLength = StrLength(sTip);
iTipdone = StrSearch(0,sTip,":");
SleepMS(60);

IF iStrSearch <> -1 AND iTipdone <> -1 THEN
iTagReadLength = StrLength(sTagRead)
iTotalChar = iStrLength - 15 - iTagReadLength;
sRefreshTip = StrLeft(sTip,iTotalChar);
DspSetTip(iAN, sRefreshTip + " Address:" + sTagRead);
ELSE
SleepMS(10);
END
END
END </pre>
Thanks & Best Regards,
Jimmi Shah
 
G
Hello All;

I want to compare the current time with a fixed time in cicode to capture the runtime variable data at that time. i'm unable to compare it. does anybody have any idea?

e.g. at 6:00:00 am Steam totalizer (FZMST: variable tag); value to be stored in another variable (lets say FZNST1: variable tag).
 
Top