Software has begun to influence our day-to-day lives. Each day we are using some sort of software, like switching on TV, locking our cars, switching on our air conditioners, all using remote control. We are connecting devices to devices daily and I had not even thought about this connectivity until I started working on GE Predix. These activities fall in the category of IoT (Internet of Things) which is about human interaction with objects. With this technology, devices can alert users when certain events or situations occur.
GE Predix deals with IIoT (Industrial Internet of Things) which differs greatly from IoT. The focus is not on connecting small devices but rather on connecting industrial assets, such as jet engines, turbines and locomotives to the cloud and each other, in a meaningful way. Think about a situation where we are able to identify well in advance that an industrial asset is about to stop working due to certain issues and are able to take actions before it affects our business?
PREDIX is the world’s first Industrial Internet Platform which connects machines, intelligence and people.
Predix is a platform with components that span from machine to the cloud to enable industrial use cases. The primary components are:
Predix Machine provides secure cloud connectivity to Industrial assets and manages them. Developers can develop their own Predix machine with the help of Predix Machine Software Development Kit (SDK). Predix Machine SDK can be added as a plugin in Eclipse IDE and Predix machine can be generated by selecting individual bundles or by selecting certain feature groups where all necessary bundles needed for that feature will be included automatically. The Predix machine SDK can be downloaded as a zip from https://artifactory.predix.io, for which a valid Predix user account is needed.
The downloaded SDK will create the following directory structure
where
The Predix Machine can be created and exported as a folder from Eclipse with the help of installation guide. The Predix Machine will have the following directory structure:
where
One of the main components of Predix Machine SDK is Machine Gateway Service which provides management of machine adapters in a centralized way. Its architecture is extensible so that developers can develop their own custom adapters for real time data streaming. Predix machine already has custom adapters for MQTT, Modbus, OPC-UA and health monitoring.
Let’s review how Predix machine sends data to cloud from sensors
To know how Predix machine sends data to cloud, an understanding of the below components is necessary.
Let’s take an example – how Modbus data is send to cloud from sensors
Modbus is a serial communication protocol used for transmitting information over serial lines between electronic devices. It’s an open protocol which means manufactures can build it into their equipment without having to pay royalties. Modbus falls into two categories – ModbusTCP and ModbusRTU. The difference between the two is that ModbusTCP runs on an Ethernet physical layer and ModbusRTU is a serial level protocol. Modbus operates on memory registers to configure, monitor and control device I/O. Modbus has a simple structure that differentiates between four basic data types:
It’s up to the manufacturer to decide whether a particular device includes all these register types or not. Like most protocols, Modbus uses client/server type protocol. The client sends a request to server and server sends back response with requested data or acknowledgement. A Modbus message may also include a Unit ID, a number between 0 and 255 ,which is used to identify the server in networks.
Predix Machine is flexible enough, that the data can be sent by modifying configuration files only (no coding is required). For reading data from Modbus, there is already an adapter available in Predix – Modbus Adapter. This is added as a bundle in Predix Machine under machine/bundles folder. The configuration for Modbus Adapter can be found under configuration/machine. When Predix Machine starts, the bundle will be activated and started and it will read com.ge.dspmicro.machineadapter.modbus-0.config file. Given below is the content of a sample config file.
In the config file, we can specify the XML file to be read for Modbus configuration, a logical name and description for the Adapter, thread pool size to handle subscriptions and the maximum retries for connecting to a node if it fails while connecting. Given below is the content of com.ge.dspmicro.machineadapter.modbus-0.xml file. This configuration is used to read data from ModbusTCP.
The above XML file is the configuration to read data from two registers (with addresses 10 and 11) from a ModbusTCP running in localhost (127.0.0.1), 502 port. Each register is represented as a Data Node. The data in holding register address 10 is of data type double and it holds the latitude information. Likewise all data nodes that need to be read can be configured in the ‘dataNodeConfig’ section. The nodes that need to be subscribed can be given in ‘dataSubscriptionConfig’ section. In the above sample, the nodes given in ‘ModbusSubscription’ will start after 10 minutes from bundle start (startPointOffset is given as 10 minutes) and it will be read for every 1 minute (updateInterval is given as 60 seconds). This subscription needs to be specified in the spillway config file (configuration/machine/com.ge.dspmicro.hoover.spillway-0.config).
In the config file, we can specify a name for spillway, the data subscriptions to be considered, the name of destination river – where the data needs to be send and the name of the storeforward associated with this spillway. (We can also add a processor if we need to manipulate data in between and the processor can be specified in spillway config)
The storeforward name given in the spillway config needs to be specified in the storeforward config file (configuration/machine/ com.ge.dspmicro.storeforward-0.config).
The storeforward config files also hold information like username and password for H2 (used by Predix internally to temporarily store data) and more. This will be added by Predix internally without assistance. The spillway destination specified in spillway config needs to be specified in websocket river config (configuration/machine/com.ge.dspmicro.websocketriver.send-0.config).
In the websocketriver config file, we should also specify the url of time series (Time series is a database that is optimized for handling time series data), Predix zone ID and its value (We will get these values from the free time series service provided by GE in the Predix cloud. An account needs to be created in https://predix.io/ and subscribed to the time series service). You should be authenticated in Predix Cloud and the username and password details need to be given in the identity config file (configuration/machine/ com.ge.dspmicro.predixcloud.identity.config). We will get the UAA (User Account and Authentication) url from Predix Cloud UAA service.
You can query the timeseries data using Time Series Query in Predix Tool Kit (https://predix-toolkit.run.aws-usw02-pr.ice.predix.io/).
Given below is the pictorial representation depicting how data is send to Predix time series in cloud:
In short, data will be read from various Modbus sensors using Modbus Adapter. It will be sent to the Predix Time series through Spillway and Websocket River. If data needs to stored temporarily, a StoreForward can be configured. Processor, an optional component, can be added for data aggregation or manipulation. We will be able to send the data to Predix time series only when it is authenticated successfully through UAA.