Applies To:
  • CitectSCADA 7.0r1

Summary:
The infoform() function no longer shows the variable tag address in CitectSCADA v7. How can I display the Variable Tag address?  

Solution:
The infoform()  function has been changed in  v7 and no longer shows the variable tag address by design (this maybe changed in later releases of Citect). As a work around apply the TagInformationForm() function below. This function displays a form with all the tag information including the variable tag address. The limitation of the work around is that it does not have the 'write' feature which was previously available in the v6.10 Infoform() function.

FUNCTION TagInformationForm ()
INT hInfo;
STRING sTag;
INT x,y;
STRING sVal; 
     
    
DspGetMouse (x, y );
    hInfo = DspInfoNew(DspGetNearestAn (x, y))
    IF hInfo > -1 THEN
        
FormNew("Tag Info", 40, 15, 2
);
        
sTag = DspInfo (hInfo,
3, 0);
         FormPrompt (0, 0
, sTag);
        
ErrSet (1);
         sVal = TagGetProperty(sTag, "Address");  // Subscribe tag
        
ErrSet (0); 
         SleepMS (500);
         FormPrompt (0, 0, "TAG NAME : " + DspInfoField(hInfo,
sTag,
"Name"));
         FormPrompt (0, 1, "CLUSTER NAME: " + DspInfoField(hInfo, sTag, "Cluster"));
         FormPrompt (0, 2, "IODEVICE NAME: " + DspInfoField(hInfo, sTag, "Unit"));
         FormPrompt (0, 3, "TAG ADRESS: " + TagGetProperty(sTag,"Address"));
         FormPrompt (0, 4, "TAG VALUE: " + TagRead (sTag));
         FormPrompt (0, 5, "DATA TYPE: " + DspInfoField(hInfo, sTag, "TYPE" ));
         FormPrompt (0, 6, "RAW ZERO: " + DspInfoField(hInfo, sTag, "RAW_ZERO" ));
         FormPrompt (0, 7, "RAW FULL: " + DspInfoField(hInfo, sTag, "RAW_FULL" )) ;
         FormPrompt (0, 8, "ENG ZERO: " + DspInfoField(hInfo, sTag, "ENG_UNITS" )) ;
         FormPrompt (0, 9, "ENG FULL: " + DspInfoField(hInfo, sTag, "ENG_ZERO" ));
         FormPrompt (0, 10, "ENG UNITS: " + DspInfoField(hInfo, sTag, "ENG_FULL" )) ;
         FormPrompt (0, 11, "COMMENT: " + DspInfoField(hInfo, sTag, "COMMENT" ));
         FormRead (0);
         DspInfoDestroy (hInfo) ;
     END
END
 
Attached to this article is a screenshot of the form and test project created in v7.0r1 which demonstrates this code. We recommend that the Cicode and test project be tested before applying to a 'real time' environment.

Keywords: