beckhoff TwinCAT 2 PLC Control — 9.7.5 Scan of mouse-clicks and dynamic texts

Visualization Case D: Deactivate task generation is activated: Use VISU_INPUT_TASK is switched off: Only the implicitly available program POU MAINTARGET VISU_PAINT_CODE can be used, but in this case it will additionally include the functionality of MAINTARGET VISU _INPUT_CODE. This POU can be called in the application program resp. can be appended to any task. 4. Load the project into the controller ('Online' 'Login'). 9.7.4 Starting the Target Visualization Start the loaded project on the PLC. Hereupon the visualization will start with the TC_VISU object resp.

– if no TC_VISU is available – with that visualization object which is the first one in the list of visualization objects in the Object Organizer. 9.7.5 Scan of mouse-clicks and dynamic texts The library SysLibTargetVisu.lib, which gets included automatically as soon as target setting 'Target- Visualization' is activated, offers the following functions for scanning user resp. entries of the dynamic textlist currently used for language dependent text display in the visualization. Function GetText : BOOL This function provides a language depending text from the currently used dynamic textlist. Parameters: Return value: FALSE – No text matching „stPrefix“ and „dwID“ was found.

TRUE - A text matching „stPrefix“ and „dwID“ was found. Function GetTextByStringId: BOOL TwinCAT 2 PLC Control 259 Version: 1.0 stResult: STRING(256); Serves as an IN OUT parameter and gets assigned _ the text found by prefix string „stPrefix“ and ID „dwID“. nResultLength:INT; Define here the maximum length of the string „stResult“, if this is stPrefix: STRING; Prefix of the text entry in the currently used dynamic textlist. dwID: DWORD; ID of the text entry in the currently used dynamic textlist.