L2L Connect for Ignition is a gateway module that provides Ignition python scripting functionality for many of the standard CloudDISPATCH APIs. L2L Connect standardized your L2L connectivity for all of your Ignition projects. It provides centralized credential management and enhanced logging capabilities. This is the best solution for a standardized enterprise approach to L2L CloudDISPATCH integration.
To download L2L Connect for Ignition, please click here.
L2L Connect for Ignition details:
- Supports Ignition 8.1+ (Although earlier versions, while untested, may work.)
- Comes in a .modl file that is uploaded via the Gateway modules config screen.
- Provides easy-to-use scripting functions for the common L2L / Ignition API use cases through the system.L2L namespace.
- Get Sites, Areas, Lines, Machines from L2L
- Set / Increment Machine Cycle Counts in L2L
- Record production pitch actuals/scrap in L2L
- Open Dispatches in L2L
- Provides users an easier way to deploy and standardize L2L functionality across their Ignition server with centralized credentials.
Table of Contents
Integrating with Ignition
For more information on the use cases and best practices for integrating with Ignition, please refer to the following support articles:
Supported Versions Details
We support all versions of Ignition 8.1 and above. The current version is 8.1.11. Previous versions of Ignition may work with several of the methods described below, but we recommend upgrading to the latest version to take advantage of the latest features, security enhancements, and performance benefits.
Installation
The following installation documentation was adapted from the official Ignition documentation. For the latest information on installing Ignition modules, please see:
Download
To download the L2L Connect for Ignition module, please click here.
Module Configuration
Module configuration is done from Gateway Webpage in the Config > Modules section. This is where you can add, remove, and restart modules. Modules integrate their settings into the Gateway configuration menu on the left side of the screen.
Install or Update a Module
-
On the Gateway Webpage, select Config > Modules to open the Module Configuration page.
-
Scroll to the bottom of the list, find the blue arrow, and click the Install or Upgrade a Module link.
-
Click Choose File, select a
.modl
file that you have previously downloaded.
- During the Beta, this module may be self-signed. Just click the checkbox that you understand the risk and want to install this module. Then click the "Add Certificate and Install Module" button (Or Click the Install button if available). When the page reloads you can now see the module you installed in the list of modules.)
Uninstall a Module
- On the Gateway Webpage, select Config > Modules to open the Module Configuration page.
- Scroll to the module you want to uninstall.
- To the right of the module name, click the More button and select uninstall. A confirmation message appears.
- Click Confirm. The module is no longer installed and is removed from the list.
Modules are hot-swappable, which means these actions can be performed while the system is running. The isolated nature of modules ensures that performing one of these actions only affects that particular module and any modules which depend on it. For example, uninstalling the L2L Connect for Ignition module will not affect any running Vision module clients.
Restart a Module
Because of the isolated nature of modules, the other modules are not affected by the restart (unless they depend on that particular module).
- On the Gateway Webpage, select Config > Modules to open the Module Configuration page.
- Scroll to the module you want to restart.
- To the right of the module name, click the restart button.
- Click Confirm at the confirmation message.
Ignition will give you a confirmation message when the module has restarted.
Module Status
The installed module list on the Module Configuration page also provides some basic information about the State of the module. The Version, License, and State columns are all displayed in the list. Module licensing is performed centrally in System > Licensing, so the values here are only for information purposes.
The module State can be either Running or Loaded:
- Running indicates the module programs are actively performing tasks, for example, the Alarm Notification module shows as Running because it is continually checking for condition changes that need to set the alarm on or off.
- Loaded indicates the module program or resources are available but nothing is running, for example, the Symbol Factory module makes all the symbol images available for your use.
Setup
Once you have installed the L2L Connect for Ignition module, you'll need to configure it by adding your credentials. In the Gateway web interface, go to Config, then L2L Connect Settings.
You'll need to add your Server Name, Site Number, API Auth Key, and provide the user name the API Auth Key is associated with. Then click Save Changes.
Licensing and Activation
How L2L Connect for Ignition Licensing Works
L2L Connect for Ignition is a subscription-based service that is priced by the site. To get a quote, please contact your sales or support account rep. We can provide the ability for you to try this service, please contact your support rep to enable this service for your site.
Ignition Trial Period
New to ignition? Ignition is licensed by the server, not the client. You only need one license for your server; any clients are automatically included. If you want to test the L2L Connect for Ignition module, you don't need to do anything extra because of the built-in Trial mode. All unlicensed modules can be reset in 2 hour trial mode. If you don't have a licensed Ignition server you can download from their webpage, install it, and start using it for 2 hours at a time. At the end of the 2 hour time period, the modules will stop running, but don't panic, you can reset the timer to run for another 2 hours. You can reset the timer as many times as you want, so go for it! The Gateway Webpage and the Designer are not affected by this trial, so you can develop for as long as you want without interruption. If you do have a license, any unlicensed modules will run in this Trial mode, but licensed modules will never timeout.
You can re-start the Trial period by logging into the Gateway, and clicking Reset Trial to enable another 2 hours of execution. The Trial Timer may be restarted any number of times.
In the Gateway, the Trial Time banner is displayed near the top of the screen. To reset the trial timer, click the Reset Trial button:
For more information about licensing your Ignition Installation, please see;
Troubleshooting / Debugging
Unlicensed API error
If you are using a trial version of Ignition which has expired, you may get a response from the L2L Connect for Ignition module with success set to false and an error message of "L2L Connect for Ignition is unlicensed". Please reset your trial through the Ignition gateway web interface.
Disabled for this site error
You may get a response from the L2L Connect for Ignition module with success set to false and an error message of "L2L Connect for Ignition is disabled for this site." The L2L Connect for Ignition functionality must be enabled for each site. Please contact for support rep for details on enabling it as a trial, or contact your sales rep for a quote to add this functionality to your subscription.
Connection failed error
You may get a response from the L2L Connect for Ignition module with success set to false and an error message of "L2L Connect for Ignition connection failed." In this case, go to the gateway web interface, select config, then L2L Connect Settings to verify your credential.
Diagnostics - Gateway Logs
One of the most important troubleshooting tools of the Gateway Webpage is the Logs page. This console shows errors caused by Gateway events including things like Database or Device connections, Authentication profiles, Alarm Journals and Pipelines, and anything else that is Gateway scoped. You can find logs in the Status tab of the Gateway Webpage under Diagnostics > Logs.
- You can filter the logging to only show L2L messages to help you narrow down what you are looking for.
- You may also find it useful to change the Min. Level field to debug to show more information.
Add a log filter for L2L Connect by clicking on "Add Mapped Diagnostics Context Filter":
Configure the filter with a key called "module-name" and a value called "L2L Connect for Ignition". It will appear in the drop down list for the value input box. Click "Add Filter".
For more information, please see the Ignition documentation:
Debugging via the Designer Script and Output Console
The Script Console is a live Python terminal that is only accessible in the Designer. It is a great way to very quickly test a script as it does not rest on a scripting event or specific component. The Script Console can be opened via the Tools > Script Console menu. It consists of two parts: a Multiline Buffer, and an Interactive Interpreter. Code can be typed into both sides.
The Script Console can call the L2L Connect for Ignition, Project and Shared scripts. If a Project or Shared script was recently added, then the console will need to be reset before it can be called. This can be accomplished by clicking on the Reset icon in the upper right.
Interactive Interpreter
The Interactive Interpreter is located on the right side of the Script Console, and allows you to run a single line of code at a time. Code is executed from the Interactive Interpreter by pressing the Enter key. Print statements from both sides of the Script Console will appear in the Interactive Interpreter.
The Autocompletion window, available in the Interactive Interpreter, has access to the current working environment so items such as Project and Shared scripts will automatically appear. They can also be typed in manually. The keyboard shortcut Ctrl + Space will display the Autocompletion window if any functions can be inferred from what has been typed.
For more information, please see the Ignition documentation:
Output Console
The Output Console is the script-writer's best friend. It is a dockable panel, and can be opened via the Tools > Console menu or the Ctrl-Shift-C keyboard shortcut.
The Console is a dockable panel that you can open via Tools menu or the Ctrl-Shift-C keyboard shortcut. The Console prints system messages that are coming from the Designer. This can vary from simple info messages that show when things are loaded, to error messages when something goes wrong. The Console is also frequently used to test and debug Python scripts, as print statements on components that are run in the designer are printed here.
For example, by using the print function in your script, you can observe the inner workings of your script as it executes. If you executed the following script:
|
Gateway scoped information will not appear in either the Output Console or Script Console. Instead, the output will be sent to the wrapper.log file. Alternatively, system.util.getLogger() will send messages to the Gateway Console, and is a preferred method of troubleshooting Gateway scoped scripts.
The Output Console is most frequently used to test and debug Python scripts on components in Ignition. By using the print keyword in your script, you can observe the inner workings of your script as it executes. For example, if you executed the following script:
# A function that intercepts tag writes, printing out the previous value first def writeToTag(path, value): prevValue = system.tag.getTagValue(path) print "Writing value '%s' to %s, was previously '%s'" % (value, path, prevValue) system.tag.writeToTag(path, value) writeToTag( "Compressor/HOA" , 2 ) |
It would print the following to the console:
Writing value '2' to Compressor/HOA, was previously '0'
The Output Console is also available in the Vision Client from Help > Diagnostics and selecting the Console tab.
For more information, please see the Ignition documentation: