Run Script Locally

In this example, the script uses MDM, print, and SER interfaces:

Fig. 5: My_First_Py script with print, MDM, SER interfaces

In accordance with MDM interface functionality, the module must be powered on, and connected to the computer as shown in Fig. 6.

      MDM interface must be connected to an AT parser, accordingly Python script must be connected to a module through an available COM port chosen by the user.

      print interface is automatically connected to the AppZone Python Console.

      SER interface can be connected to a User Device through a COM port chosen by the user.

 

Fig. 6: Python script (MDM, print, SER interfaces) running on PC

The My_First_Py script uses the files stored in the lib_py directory of the project.

To configure AppZone Python to run the example in Fig. 6:

1.  Click Connect COM Port () to search the available COM ports. In this PC configuration they are COM1, and COM2.

2.  Click Set Ports Simulation () and select COM1 for MDM interface and COM2 for SER interface.

3.  Right-click the script name and then select Run As > Python Run or Debug As > Python Run.

See the outputs of the script on the AppZone Python Console. The script uses the print interface

SER interface sends the message "HELLO SER" to the User Device by means of the COM2 port; refer to the script code in Fig. 5, and the basic architecture in Fig. 6.