Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL MANUAL VERSIONS

Ignition 8
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata


Retargeting is a special form of navigation which involves navigating to an entirely different project. Retargeting is accomplished through scripting, usually as a response to a button press or other component event. The system.util.retarget() function allows you to 'retarget' the Client to a different project. You can have it switch to another project on the same Gateway, or another Gateway entirely, even across a WAN. This feature makes the vision of a seamless, enterprise-wide SCADA application a reality.

The retarget feature will attempt to transfer the current user credentials over to the new project / Gateway. If the credentials fail on that project, the user will be prompted for a valid username and password. Once valid authentication has been achieved, the currently running project is shut down, and the new project is loaded.

You can pass any information to the other project through the parameters dictionary. All entries in this dictionary will be set in the global scripting namespace in the other project. Even if you don't specify any parameters, the system will set the variable _RETARGET_FROM_PROJECT to the name of the current project and _RETARGET_FROM_Gateway to the address of the current Gateway.

Retargeting can be as simple as 1 line of code, just make sure you are using the project name (no spaces allowed), and not the title. See the retarget function in the appendix for more information.

A typical retargeting strategy actually combines this strategy with one or more other navigation strategies. A simple landing project could be made that all users would have access to, which would allow users to do some basic user management functions, as well as a screen with a button that retargets out to other projects, with each project having a specific purpose, or targeting a specific area of operations. The buttons that retarget to these projects can be hidden or shown based on the user, allowing you to build in an extra layer of security to your projects. Additionally, each of the other projects would utilize navigation strategies that best suit those areas.

On this page ...



Retargeting



In this example, we have two projects that we will setup to retarget to each other. 

  1. On a blank window, add a Button component, and either change the button text or add a label that informs the user that the button retargets to a new project.
  2. Right click on the Button and select the Scripting option. On the actionPerformed event, add this script to the script builder, and click OK

    Python - Retargeting to Another Project
    # Retarget to another project on the same gateway.
    # This script can be run from any button in a project.
    system.util.retarget("My_Other_Project")


    The script below was added to the button in the Tank project. A similar script was also added to the Motor project. 

  3. This can be repeated with more buttons and scripts that lead to other projects. Save your projects.

  4. Open the Client, and use the retargeting feature to navigate between two different projects. Press the Retarget buttons to navigate between the Tank project and Motor project. 





  • No labels