iot.a2s.pl

I/O Modbus module with built-in GSM/GPRS modem


1. Introduction

There are 7 example files in the iMod telemetric module, which help with a proper configuration of the device and help to understand the basic, necessary rules of creating configuration files:

  • access to hardware resources,
  • modbus proxy,
  • SMS, e-mail event types,
  • modbus events,
  • script events,
  • counters,
  • SNMP.

Each protocol describes one of the basic functionalities available on the NPE/iMod device. The following example describes the simplest functionality - access to hardware resources. By using and analyzing the other examples, you can easily configure the NPE/iMod industrial computer as an alarm module (notifier), data logger or a fully functional PLC.

2. Access to hardware resources

2.1. Channel definition

The first example is built on the basis of the simplest configuration - it enables easy access to hardware resources of the device, readout of the status and control via the Modbus TCP protocol. In this example the digital input DI1 and the USER LED is used.

There is a video tutorial below, describing the use of the example configuration and its verification in order to check if it works properly. Additionally at the end of the article there is a direct link to the configuration file. More information about the example #1 can be found in the iMod manual in chapter 3.1 – example 1: Access to hardware resources.


The iMod configuration file consists of channel and parameter groups. The channel groups are divided into three main channels:

  • source channel - in this case it is a hardware resources access channel,
  • data access channel - by using this channel you can read the parameter values located in the pre-defined data source channel,
  • communication channel

In the example #1 the first two channels are used.

The following definition describes access to hardware resources:

  1.     <source-channel name=“NPE_io”>
  2.              <protocol name=“HARDWARE”/>
  3.              <gap>0</gap>
  4.              <cycle>5</cycle>
  5.     </source-channel>

The <source-channel> element describes the data source channel. The name value is assigned to the channel and must be unique in the whole configuration. In the protocol name field we define an interface via which the iMod will read data – in the example #1 we read hardware resources, this is why we take the HARDWARE value. Additionally, there are two more elements in the configuration: gap and cycle.

The <cycle> parameter was replaced by the <refresh interval> parameter – which defines how often a source readout is updated. The <gap> parameter defines the length of intervals between following readout cycles. Optionally, there may be a <delay> type parameter, which describes an interval between readouts of the following modbus addresses in the cycle. These values are expressed in seconds.

The second channel used in the example configuration #1 is the data access channel. It is defined in the following way:

  1.     <access-channel name=“Modbus_S1”>
  2.                 <protocol name=“MODBUS” />
  3.                 <port>“ET-502-TCP”</port>
  4.     </access-channel>

Just like before, the channel name needs to be unique. The protocol element takes the MODBUS value in this case – it means that the MODBUS protocol is used for reading data. Enter the interface for data sharing in the port element – in this case ET means the Ethernet interface on the 502 port via the TCP/IP protocol.

2.2. Definition of Parameters

icons

As already mentioned above, in the example #1 the user has access to the iMod hardware resources. There are different kinds of interfaces depending on the version of the iMod.

USER LED Parameter

In this article there is a description of access to the DI1 digital input and the USER LED on the front of the device. The parameter definition is as follows:

  1.     <parameter>
  2.         <id>100</id>
  3.         <description>“USR_LED”</description>
  4.         <source-channel channel-name=“NPE_io” parameter-id=“USER_LED”/>
  5.         <access-channel channel-name=“Modbus_S1” parameter-id=“100 />
  6.     </parameter>

In order to define a parameter properly, you need to give a unique ID number to the parameter. This number can’t repeat and can’t be assigned to any other parameter. The last two lines are for establishing the channels, to which a parameter is related.

  1.     <source-channel channel-name=“NPE_io” parameter-id=“DI1” />

In this line there is a reference to the source channel with the name NPE_io. The device will collect data with this channel. The Parameter-id parameter is defined as the USER_LED which means that the device will collect the USER_LED status value.

Possible values for the parameter-id for the Hardware channel are:

Digital InputDigital OutputAnalog Input
DI1DO1AI1
DI2 DO2 AI2
DI3 PO1 AI3
DI4 PO2 AIW
DI5 PO3 
DI6 PO4
DI7 
DIW

 

  1.     <access-channel channel-name=“Modbus_S1” parameter-id=“101/>

This line defines the data access channel for a selected parameter.The Parameter-id for the Modbus channel, describes a modbus register. The status of the USER_LED, which was read with the source-channel will be further distributed by the Modbus_S1 channel with the parameter from id = 100. This number is unique and can’t repeat in the following parameters using the same data access channel.

In conclusion – the USER_LED status read from the iMod device will be shared via Ethernet with the Modbus protocol under the 100 parameter.

Parameter DI1

The situation is similar for the DI1 parameter.

  1.     <parameter>
  2.             <id>“101"</id>
  3.             <description>“DI1"</description>
  4.             <source-channel channel-name=“NPE_io” parameter-id=“DI1” />
  5.             <access-channel channel-name=“Modbus_S1”parameter-id=“101/>
  6.     </parameter>

Look at the different ID given to the parameter (as it was mentioned before, the ID must be unique), the source-channel is the same, however, a different parameter is read – DI1. In addition, the access-channel is also the same - the only difference is the parameter number of the DI1 digital input value.

Download

See iMod series devices

Articles in Categories: iMod functionality Collapse
Perfect Controller for Fleet Monitoring
The NPE/iMod industrial computer is commonly used in various industrial sectors. One of the sectors is the automotive industry, where the J1939 protocol is often used. This protocol enables collection of all the data provided by a vehicle. NPE/iMod is a perfect device for data collection, data logging and data sharing among end-users.
Read article »
Industrial Computer with Built-in Modbus Capability, part 3
This article is the third part of a series describing the NPE/iMod devices with Modbus capability. In order to see the other parts, please click the links below.
Read article »
Industrial Computer with Built-in Modbus Capability, part 2
This article is the second part of a series describing the NPE/iMod devices with Modbus capability. In order to see the other parts, please click the links below.
Read article »
Industrial Computer with Built-in Modbus Capability, part 1
This article is the first part of a series describing the NPE/iMod devices with Modbus capability. In order to see the other parts, please click the links below.
Read article »
NPE/iMod – Everything is Under Control
The NPE/iMod industrial computer is a perfect telecontrol device. It enables you to connect different devices into one network and to receive a constant data readout. Access to the information is provided by a built-in Apache HTTP server, the data might also be displayed in real time with the NXDynamics graphical interface.
Read article »
Remote Weather Monitoring
The NPE/iMod telemetry module is not only a device for industry. It is also a perfect solution for Meteorology, where it can operate as a data logger or a notify module. With the use of proper sensors, the NPE/iMod operates as a fully functional weather station.
Read article »
Data Logger and Notify Module in CAN Networks
The NPE/iMod industrial computer is equipped with a number of interfaces and protocols. External modules additionally enhance its functionalities. Can bus is one of the protocols that the NPE/iMod device can be equipped with. It has been widely used both in the automotive industry and in production automation. The NPE/iMod controller, together with the I-7530A-MR module is perfect for control and monitoring of the devices using the protocol.
Read article »
Embedded Computer for Multiple Access Systems
The NPE/iMod industrial computer, due to its enhanced architecture, can operate as a versatile automation controller. This module combines the advantages of a fully programmable and configurable PAC/CAC, which guarantees a quick start and a full use of the device possibilities without the need to use a complicated software.
Read article »
Enhanced Interface and Protocol Converter
Due to a huge number of interfaces and supported protocols, the NPE/iMod industrial computer has functionalities of both a simple, easy to use, configurable converter and a fully programmable device. The NPE/iMod computer is equipped with serial interfaces such as RS-232, RS-485, GPRS, USB or Ethernet.
Read article »
Configurable and Programmable SQL and CSV Data Logger
The NPE/iMod industrial computer is a perfect fully programmable and configurable data logger. Due to an extensive range of input and output interfaces, the data collected by the device can be transferred further in order to check if the system, where NPE/iMod is installed, operates properly.
Read article »
Telemetry Module for Railway Industry
The iMod platform is such a versatile solution that it has been approved by the railway industry. NPE/iMod can operate as a remote controller, notify module and a data logger. Users can configure their own visualisation interface on the NXDynamics Web platform, providing constant access to parameters and status of devices in real time.
Read article »
PostgreSQL Server for Embedded Computers
The PostgreSQL database support has been recently added to the NPE/iMod functionalities. Due to this functionality an industrial computer can operate both as an SQL database server and an SQL client. In order to make the PSQL support easier, we created a built-in module for the innovative NX Dynamics Web interface. This module fully supports both local and external PostgreSQL database in accordance with the SQL syntax. It enables an easy database connection as well as viewing and modifying the tables in the database.
Read article »
Intelligent Controller for DeviceNet Network
With the use of the I-7242D external module, the NPE/iMod industrial computer is perfect for control and management of the objects in the DeviceNet networks. The communication between the module and the computer is carried out through the Modbus RTU protocol. Next, all the data can be transferred to a local HMI or using the GPRS - to a control station.
Read article »
iMod internal structure
This is a second in a series of four articles aimed at bringing You a revolutionary iMod platform.Great opportunities always carry a large customizable. iMod has a user-friendly way to configure many options, which is done by editing a simple XML file. This allows you to freely define parameters such as...
Read article »
Smart Metering - Save Your Energy
There is a wide offer of precise electronic energy meters on the market. Most of them are only for metering the current electricity consumption. By using the NPE/iMod telemetry module, the energy grid can be fully automated (smart grid) and metres intelligent (smart metering).
Read article »
iMod - Why Linux
Every IT professional knows what Linux offers for servers. However, more often, thanks to more powerfull energy-efficient processors, this system becomes the ideal platform for embedded systems and all kinds of drivers. The Linux system is characterized by...
Read article »
iMod - Why GPRS
iMod allows parallel access via GSM and Ethernet - Router RS-232 / RS-485 / Ethernet / GPRS - Modbus router / gateway - Access via FTP, WWW, Telnet - Remote configuration and management
Read article »
Wireless GPRS communication between serial ports
Because of a built-in modem, the NPE/iMod telemetry module is a perfect RS-232/485 to wireless data transmission converter. The NPE/iMod computer creates a network connection between several remotely located devices, due to the built-in GPRS modem or the VPN support.
Read article »
NX Dynamics web interface
NX Dynamics is an innovate solution from TechBase company - a modern interface for operating and monitoring NPE/iMod computers.
Read article »
NXDynamics - Tool for iMod Configuration
NXDynamics is an innovative interface for monitoring and operation of the NPE/iMod industrial computers through a Web browser. One of the latest functionalities available is the easy management of the iMod configuration files.
Read article »
Access to Free Software Updates
In order to meet our clients’ expectations, we created an application for automatic update of packages – Software manager. This application enables free of charge, easy and fully automatic update of the software on the NPE/iMod platform. Apart from the key packages such as firmware, there are other software packages available through the application (e.g., PHP, SSH, SSL and VPN).
Read article »
iMod: QuickStart
We created a QuickStart document, especially for first time users of the iMod platform. Its simple form should help the less experienced users with a fast understanding of the device’s core functionalities.
Read article »
iMod – New functionality: two-way SMS communication
The iMod telemetric module has an option with a GSM/GPRS/EDGE Class 10 modem operating in three ranges (900/1800/1900 MHz). These modems are ideally suited for installation where information collected by the device is sent over large distances.
Read article »
Sending SMS messages upon an event from the iMod platform
Sending an SMS from the iMod upon an event is very simple – it is sufficient to correctly configure the MainConfig.xml file...
Read article »
Reaction of iMod platform to an SMS message
The iMod has the capability of reacting to incoming SMS messages. For this purpose, an appropriately configured MainConfig.xml file and a simple shell script should be used...
Read article »
iMod – a scripting source channel
The iMod telemetric module has the capability of using BASH scripts as a source of data. This capability can be used in different ways, including two-way SMS communication support.
Read article »
iMod with 1-Wire interface
iMod telemetry module gained new feature which is 1-Wire interface. What is 1-Wire?
Read article »
Details on making WWW visualizations
The iMod platform finds a wide range of applications in distributed system as a telemetric module as well as a communication and control module...
Read article »
iMod - new function: Schedulers
As the NPE/iMod are developed, there is more and more demand for new functions. One of the basic functions that a telemetric module should have, is the capability of saving the values of selected parameters to CSV files or databases (SQLite or PSQL) with specific hours, times of day, and even days of the year.
Read article »