Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction to Edge Gateway for Cisco Routers

This document contains information about the EdgeGateway application for Cisco Routers, designed to read data from a Rockwell ControlLogix PLC and publish it to a MQTT Broker using SparkPlugB specification.

The application, however, can do much more than that, due to the complete Linux distribution of FrameworX being deployed to the Router.

MQTT: a lightweight, publish-subscribe network protocol that transports messages between devices. The SparkPlugB has additional control and standards allowing to know about birth, death and a better data exchange control. For more information on the SparkplugB specification, please refer to the SparkPlugB specification at eclipse.org.


On this page:

Table of Contents
maxLevel3


System Requirements

To use this feature, the following system requirements need to be met.

  • Cisco Router, model IR1101.
  • *.tar file, containing the docker image with the application to be installed.
    • iox-edge-gateway-Arm64.tar, if your Router's processor is ARM.
    • iox-edge-gateway-X86.tar, if your Router's processor is x86.
  • Allen-Bradley/Rockwell - ControlLogix PLC / Micro800.
  • MQTT Broker with support to SparkPlugB specification.
  • Windows computer with installation files for FrameworX.

Functionality Overview

The EdgeGateway application consists of a docker image with a program that handles all communication exchange. The programs were written in Python they manage two independent connections, one with the Rockwell ControlLogix PLC and the one with the MQTT Broker.

  • ControlLogix PLC Client: Client implementation over TCP/IP running on an independent thread. Reads real-time data from the ControlLogix PLC and forwards it to the main program, so it can be published to an MQTT Broker.
  • MQTTspB Client: Client implementation for MQTTspB protocol, running on an independent thread. Receives data from the ControlLogix Client (through the main program) and publishes to the MQTT Broker.

that contains a ProjectServer application, which is a server that allows your FrameworX Designer on Windows to connect to it and deploy the necessary files to run any project in Linux (or Cisco in this scenario).

By having the full FrameworX capabilities running inside your Cisco Router, you will have access to many Communication Protocols (e.g.: MQTTspB, ControlLogix, Modbus, etc) as well as scripting (to make calculations based on the data being exchanged through your devices).

One example of a This program behavior is illustrated as per image below.

EdgeGateway on Cisco Routers, getting data from ControlLogix, publishing to MQTT
Image Modified

Despite being deployed in a docker container, known to have volatile memory (that is not retained), this EdgeGateway application makes use of a retentive memory area inside the Router to store the installation and Project Files.


Installing and Deploying Apps

The first step is to make sure you have downloaded the *.tar with support to your Router's processor. Then, choose one of the following ways to install the application.

Using Cisco Local Manager

Cisco Local Manager is a platform-specific application that is installed on a host system as part of the installation of the Cisco IOx framework on that device. It provides a web-based user interface that you can use to manage, administer, monitor, and troubleshoot apps on the host system, and to perform various related activities.
For more information about it, please refer to the Cisco official documentation. To install and deploy your application, follow the procedure below.

  • Go to Applications Tab in the Menu Bar.

Image Modified

  • Click Add New.

Image Modified

  • Select the *.tar file and enter a friendly name to the Application. It will be used as an Identifier.

Image Modified

  • Click Activate to activate the app.

Image Modified

Image Modified

  • From inside your App's configuration display, go to the App-Config tab. Customize the parameters if necessary. More information available in section 5.

Image Removed     

Below you will find some definitions for terms frequently used when dealing with applications in Cisco Environment:

  • Deployed: Means the Application has been imported.
  • Activate: Reserves host system resources that the app requires to run, designates the network from which the app obtains its IP address, and assigns host system serial ports for use by the app, if requested.
  • Start: Starts the app container for the app on the host system. CPU and memory (RAM) resources that were reserved for the app become in use.

Using Cisco IOx Client

For this procedure, you must have IOx Client installed on your environment.
The official installation guide and documentation for IOx Client is available here.

  • Launch the IOxClient.exe in your OS command line terminal. It is easier if you add it to PATH and run the terminal from the same folder as your *.tar file.
  • If your IOxClient does not have a profile connected to the Router already, do as follows:
Code Block
languagetext
themeConfluence
firstline1
linenumberstrue
ioxclient profiles create
// here you will connect to the Router
// values inside brackets will be used by default if empty

Your / your organization's name : <OrganizationName>
Your / your organization's URL : <OrganizationUrl>
Your IOx platform's IP address[127.0.0.1] : <RouterIPAddress>
Your IOx platform's port number[8443] : <RouterPortNumber> 
Authorized user name[root] : <UserName>
Password for <UserName> : <PasswordForUser>
Local repository path on IOx platform[/software/downloads]: <Repository> 
URL Scheme (http/https) [https]: <TransferProtocol>
API Prefix[/iox/api/v2/hosting/]: <ApiPreffix>
Your IOx platform's SSH Port[2222]: <SshPortForRouter>
  • Run the following commands to install, activate and start the package:
Code Block
firstline1
linenumberstrue
ioxclient application install <AppName> <PackageName>.tar 
ioxclient application activate --payload activation.json <AppName> 
ioxclient application start <AppName>

Where AppName is a friendly name used to identify the application inside the Router.

  • Use the following commands to stop/disable and uninstall the application:
Code Block
firstline1
linenumberstrue
ioxclient application stop <AppName> ioxclient application deactivate <AppName>
ioxclient application uninstall <AppName> <PackageName>.tar

Use the following command to see the application status

Code Block
firstline1
linenumberstrue
ioxclient application status <AppName>

Mapping MQTT and PLC addresses

To customize your client parameters, at Cisco Local Manager make sure your application is in Activated state. Then, inside your App Tab, go to App-Config.

You should see a text content, with some parameters. Configure them according to your architecture.

Code Block
languagetext
themeConfluence
[logging] # DEBUG:10, INFO: 20, WARNING: 30, ERROR: 40, CRITICAL: 50, NOTSET: 0 log_level: 10 # Enable/disable logging to stdout console: yes filename: status.log # Create as many Broker connections as you want, using the syntax 'mqtt_broker_X' for the section name # where x is an index for your broker [mqtt_broker_1] # broker IpAddress host:127.0.0.1 # broker port number port:1883 # username credential for connection (optional) user_name: # password credential for connection (optional) password: # Uncomment this section to connect to a second broker #[mqtt_broker_2] #host:127.0.0.1 #port:1883 #user_name: #password: [mqtt_client_info] # flag indicating if MQTT Client is Enabled enabled: yes # groupID for Payload group_id: Group # nodeID for Payload node_id: Node # deviceID for Payload device_id: Device # Indicates the time for publishing in milliseconds. #The messages that will be published to MQTT Broker are grouped and sent using this period publish_rate:1000 # Flag that indicates if it should replace brackets by parentheses in the metric name (yes/no) use_parentheses_for_array: yes [control_logix_client_info] # flag indicating if ControlLogix Client is Enables (yes/no) enabled: no # plc ip address ip_address: 127.0.0.1 # plc slot number slot: 0 # flag indicating if PLC is Micro800 (yes/no) is_micro800: no # read pooling rate in milliseconds refresh_rate:1000 # list variable names (only main element) separated by comma. E.g.: MyInt, MyUDT # If you use wildcard "*" (without quotes) ALL PLC variables will be added to the communication variable_addresses: # variables, from 'variable_addresses' field, that will be read/write access, separated by comma. Can use Variable FullName read_write_addresses:



Deploying Projects

For those who are familiar with Project Deployment in Linux Environments, this will be the exact same procedure.

With the Cisco application running, open your FrameworX's Welcome app and navigate to Server Tab. 

Under ProjectServer click on Remote and enter your Cisco's IP Address (syntax: http://<IpAddress>:3100/)  and click on Connect.

Image Added

Now click on Update to upload the files for the Runtime. A popup will open asking if you want to copy all files or just the new ones.


Image Added

If you already have a Project created, click on Upload Project to send it to the Router. If you don't, then a new Project must be created in your Windows Environment to be uploaded to Cisco (meaning that you willl have to disconnect from the router, create a new Project that reconnect and upload it).  

Only EdgeGateway Projects are allowed to run under the Cisco License, as it can be seen in the License Tab.

Image Added

Make sure that projects uploaded to Cisco have the correct Product Family and Target Framework.

Image Added

Finally, all we have to do now is configure our Project with the desired Communication Protocols to have our gateway working.


Troubleshooting

App was missing at Least one interface

If you encounter this error, it means that your router is missing a network configuration for applications. To solve it, follow the procedure described at Configure a VirtualPortGroup to a Layer 3 Data Port section.
Connect to your Router via SSH (either via terminal or in Cisco Local Manager) and do as follows.
Image Modified


In this section:

Page Tree
root@parent
spaces93DRAFT