📜 ⬆️ ⬇️

Wireless communication module with a WISE-4000 object



Is it possible, without programming skills, to deploy an industrial-level data collection system? In the article we will get acquainted with the devices that allow in a few clicks to get a ready-made digital signal processing system available through the JSON API.

The WISE-4000 series are input / output devices for logging, monitoring and transferring data from remote objects. They support industrial protocols MQTT, Modbus / TCP and have HTTP JSON API. There is integration with cloud services Microsoft Azure, Dropbox and others.
')
Devices can work as part of SCADA, as well as autonomously. WiFi connection is supported.

Specifications



Primary setup


Initial configuration occurs via the web interface: the device is transferred to the access point mode with the network name (SSID) of the type WISE- <model <- <MAC_address> and activates the DHCP server, like a normal Wi-Fi router. To put the WISE-4000 into the setup mode (initial mode), you need to turn the DIP switch SW1-P1 on the back cover to the OFF position.

It is important to keep in mind that switching to setup mode does not reset the password of the web interface to the factory one. In order to reset the settings, you must use the Windows utility Adam / Apax. Net Utility .

In the web interface, you can set a Wi-Fi client mode (Infrastrucutre mode) or an access point mode (AP Mode).


In client mode, you can set two different Wi-Fi networks to which the device will try to connect. As a second network, it is convenient to use the service network to configure, to which the device will automatically connect, being at the service stand. After setting up the network, you can set the DIP switch SW1-P1 to ON.


DIP switches on the back of the WISE-4051

I / O ports


Let us analyze the assignment of input / output ports using the example of the WISE-4051 model, which has eight ports of digital inputs (DI) and one RS-485 port for Modbus / RTU Master. The main purpose of this model is to collect data from sensors and monitor remote objects.

Logic levels

Ports 0-3 are of the “dry” (dry) contact type. A logical contact is a closed contact with DCOM0, and a logical zero, respectively, an open contact. You can connect reed switches, relays, buttons to this contact.

Ports 4-7 are of the type “wet” (wet) contact. A logical unit is a voltage of 10–30V, and a logical zero is 0–3V between the contact and the ground of DCOM1.

All ports support the inversion of logic levels, as well as a pulse signal with a frequency up to 3 kHz.


Port Assignment WISE-4051

I / O Modes


Each of the digital inputs can operate independently in one of five input signal processing modes. Depending on the selected mode, the received signal will be stored in different ways in the device’s memory. Each of the modes allows you to invert the logical zero and one.


DI - normal digital input


This mode allows you to read the state of the contact Low / High. Additionally, you can activate the noise filter by setting the minimum and maximum signal length in tenths of milliseconds.


Counter


The “counter” mode sequentially counts the number of received signals and saves their number. Additionally, you can set the starting value of the variable. This mode is convenient to use for counting regular events, such as triggering a reed switch to assess the patency of different doors.


Digital Input Counter Mode

Alarm Mode (Latch)


In this mode, the one-time signal irrevocably switches the state of the input to the trigger mode, until it is forcibly reset, via the API or manually. This mode is useful for alarms, fuses and any signals requiring personnel intervention.


Two digital contacts in alarm mode. Contact 0 is in alarm status.

Frequency Measurement Mode


Stores the current frequency of the signal with an accuracy of 0.1 to 0.01 Hz. Additionally, you can set the time interval for zeroing values. This mode can be used for pulse signals, revolution counters, motors, oscillations, etc.



Local storage


Received signals device can save to internal memory, in case of loss of communication with the server or for fully autonomous operation. The backup battery allows you to store data in volatile memory when the main power is disconnected.

Local storage requests can be made via the web interface, Modbus / TCP and HTTP RESTful API.


Request local storage via a web interface.

HTTP RESTful


For an example of working with the HTTP API, let's try deploying a simple testbed. To the input number 3, we connect the usual mechanical button and set the “counter” mode of operation in the web interface. Press the button several times to check if the value changes.

The web interface shows that the counter value increases


Entry counter number 3 in the web interface

Next, we will try to read the state of the counter using the HTTP API described in the documentation . To do this, perform a GET request using the curl utility, where 10.0.0.1 is the device ip address, di_value means Digital Input Value, slot_0 is the slot number and ch_3 is the port number on the device. Since HTTP Basic Auth is used, the login and password can be passed to the URL.

curl http://username:password@10.0.0.1/di_value/slot_0/ch_3 { "Ch": 3, "Md": 1, "Val": 27, "Stat": 0, "Cnting": 1, "OvLch": 0 } 

Let us analyze the values ​​in the answer:

Ch is the number of the input, in our case â„–3.
Md - mode of operation, in our case “counter” (0 - DI, 1 - Counter, 2 - LowToHighLatch, 3 - HighToLowLatch, 4 - Frequency).
Val is the value of the counter, in our case the number of button presses.

Thus, without programming skills and installing additional software, using only a web interface, in five minutes we were able to set up a simple data collection and storage device that can be easily integrated into any modern system. Despite the fact that this example is rather primitive, it gives a general understanding of the ease of setup. By the same principle, you can deploy more complex systems with heterogeneous data types and modes of operation.

Cloud providers


Devices of the WISE-4000 series support integration with cloud services. The collected data can be transferred to the cloud storage via the MQTT protocol or uploaded as files to a dropbox or to an internal server. Integration with Advantech WebAccess SCADA system is also supported.

Microsoft Azure


To connect the device to Microsoft Azure IoT Hub, it is enough to specify the server address, device name and secret token.



Dropbox


To connect Dropbox, Oauth2 authorization is used, right in the web interface. Data from the local storage will be loaded as * .csv files. This feature can be used for backup storage or data processing manually.

SDK for developers


The WISE-4012E kit is specially designed for convenient development and debugging of systems based on WISE-4000 . The kit includes a WISE-4012E module with two analog and two digital inputs as well as two relay channels. The device is powered directly from USB and does not require additional power supplies.

Developer Kit WISE-4012E with USB power and I / O demo board

I / O Demo


So that a developer can independently simulate input-output signals at the hardware level, a demo board is included in the package. Two potentiometers are used for debugging analog outputs, DIP switches for discrete inputs, and two LEDs for relay outputs. This allows you to get in the workplace a full test bench without unnecessary wires.



Conclusion


WISE-4000 combines the functions of a data acquisition and transmission device (DRC) and a remote communication device with an object (ODR). Setup does not require programming skills and can be performed via a web interface from a smartphone as soon as possible. Thanks to the support of modern protocols, devices can be easily integrated into modern SCADA and cloud systems.

Source: https://habr.com/ru/post/456352/


All Articles