JSON Objects and How They Can Streamline an IIoT Application

In web development, JSON objects are a programmer’s dream come true. JSON, or JavaScript Object Notation, is much similar to XML (EXtensible Markup Language) in that it’s used as a standard format to organize and transfer data across multiple programming languages. For example, say you want to send sensor data from a SQL database to a JavaScript front end. JavaScript doesn’t know SQL syntax and SQL doesn’t know JavaScript syntax. How do these different languages communicate? JSON/XML will act as a middle ground between the two allowing them to talk to each other. When given a choice between the two, I’m always going to pick JSON objects as they are much more efficient than XML. They are shorter in length and easier for computers and people to interpret. Here’s what 3 sensors would look like in XML versus JSON:

xml

Example of XML

json

Example of JSON

dpropHow does this apply to the Industrial Internet of Things? The JSON format for data transfer is so universal that IO-Link modules host it on a web server. This server is accessible by entering the IP address of the module. The module data can be seen in JSON format by modifying the IP address and adding “/dprop.jsn” into the URL of a web browser (i.e. 192.168.0.1/dprop.jsn). You should see something similar to the image on the right.

reqqresarchThe “dprop” stands for data propagation or simply the movement of data from one source to multiple sources. This data is delivered with a standard request-response system. Say you’re writing some software that uses the sensor data as variables. All that’s needed to get that sensor data is a few lines of code that send a request to the module which in turn responds with your data.

opcuaHow does this differ from the Industrial Internet of Things (IIoT) application frameworks from my past blogs? Previously, we discussed using OPC UA software to subscribe to PLC data and forwarding this data to a SQL database. From there, the application would query SQL for the data and render it appropriately for the user experience. Using JSON objects, we entirely eliminate the need for SQL or OPC UA software by accessing the data directly from the module. This not only makes the application independent from the PLC but also uses much less network traffic. However, using JSON objects, we can only subscribe to data from IO Link devices.

All acronyms aside, there are a million different ways to structure an IIoT application. The best fitting architecture depends on the environment. Systems with standard input/output will most likely need some form of communication with the controller. IO-Link systems will streamline this process by allowing the user to directly access the module’s IO Link data. How you go about building your application is entirely up to you. In the end, however, having this information readily available via the Industrial Internet of Things will be more beneficial than you could have ever imagined.

To learn more about IIoT visit www.balluff.us.

About Pat Millott

I am a student at the University of Cincinnati studying Computer Science.
This entry was posted in All posts, Industrial Internet of Things, IO-Link and tagged , , , , , . Bookmark the permalink.

3 Responses to JSON Objects and How They Can Streamline an IIoT Application

  1. Pingback: What does that “Ready for IIoT” tag really mean? | SENSORTECH

  2. Pingback: JSON Objects and How They Can Streamline an IIoT Application — SENSORTECH – SutoCom Solutions

  3. Norm Clarke says:

    Great job Pat! Helps demystify our ability to ‘enable’ Industry 4.0 and the IIoT !

Leave a Reply