![Digi XGI-20CZ7-E00-W0 User Manual Download Page 83](http://html1.mh-extra.com/html/digi/xgi-20cz7-e00-w0/xgi-20cz7-e00-w0_user-manual_2496341083.webp)
Program XBee Industrial Gateway using Python
Configuring a Python application in the web interface
Digi XBee Industrial Gateway
83
Configuring a Python application in the web interface
The web interface of the XBee Industrial Gateway device includes a section that allows you to
configure and manage the Python processes or applications running in the device.
Before you configure a Python application, the Python application must be loaded on the XBee
Industrial Gateway device. See
for more information on loading files on an XBee
Industrial Gateway device.
To configure a Python application for an XBee Industrial Gateway device:
1. Log in to the web interface for the XBee Industrial Gateway device.
2. Under
Configuration
, click
Python
. The Python Configuration page appears and displays the
list of Python processes or applications that are currently configured in XBee Industrial
Gateway as well as their status and the action that will be executed when the applications exit.
Note that the first time you load this page, the list will be empty.
3. Select the
Enable
check box associated with the Python application. When enabled, the Python
application starts immediately after your changes are saved. By selecting the
Enable
check
box, the Python application also automatically starts after a system starts up.
A green
icon will appear in the Active column when a Python application is running. Note
that you can stop a configured Python application immediately by clearing the
Enable
check
box and clicking
Apply
.
4. Click
Apply
to save your changes.
Digi ESP for Python
Digi ESP for Python supports XBee Industrial Gateway. Digi ESP is an IDE featuring device detection,
debugging, compiling, and downloading of Device Integration Application (DIA)/Python code to Digi
gateways. Digi ESP includes example applications that can demonstrate the use of some of Digi’s
proprietary Python extensions, serving as templates for applications seeking to incorporate common
functionality.
n
For examples of how to use Digi ESP for Python with XBee Industrial Gateway, see
.
n
For Digi ESP for Python installation instructions, see
Install the Digi ESP for Python
Access the program samples in Digi ESP
Digi ESP for Python provides samples to use as a base for programming XBee Industrial Gateway,
including specific examples for exercising specific interfaces available on XBee Industrial Gateway. You
can access these program samples from the Python or DIA samples wizard.
To access the program samples in Digi ESP:
1. From Digi ESP, go to
File
>
New
>
Digi Python Application Sample Project
or
File
>
New
>
DIA Sample Project
. The sample wizard for Python or DIA appears.
2. Select the
Show only samples compatible with platform
check box and then select
XBee
Gateway
from the combo box. The compatible samples appear in the
Sample projects
list.
3. Select the samples you want to display or click
Select All
to select all of the samples.