Richiamare il seguente Cicode all'avvio abiliterà questa funzionalità in modo che ogni volta che il mouse passa sopra un tag digitale, il commento del tag verrà visualizzato nella descrizione comando.
****************************
ATTENZIONE cambiando sTagType = "0" è possibile farlo apparire per altre tipologie di dati(vedi funzione TAGINFO->RAWTYPE)
******************************
FUNCTION ToolTip()
INT ix
INT iy
INT iAN
STRING sTagType
STRING hInfo
STRING sTagname
WHILE 1 DO
DspGetMouse(ix,iy); // find the location of the mouse and set the x and y coordinated into ix and iy.
iAN = DspGetNearestAn(ix,iy); // store the AN number into a cicode variable
hInfo = DspInfoNew(iAN); // Creates an object information block
sTagname = DspInfo(hInfo,3,0); // reads the variable tag name of the current AN
sTagType = TagInfo(sTagname,10); // is DIGITAL?
IF sTagType = "0" THEN
DspSetTip(iAN, TagInfo(sTagname, 16)); // sets the new tool tip
ELSE
END
DspInfoDestroy(hInfo); // Destroy's the object information block
SleepMS(40); // So not to max out CPU
END
END
Questa funzione può essere facilmente adattata per fare lo stesso per tutti i tag
Pubblicato per: Schneider Electric Italy

