![]() Hardware configuration: positions of DIP switches determine parameters.įor this article, we will go for the second option suitable in a situation when you don’t know the contents of configuration registers.Software configuration: parameters match contents of the corresponding registers,. ![]() The xG18 module’s parameters can be configured in two ways: If the connected device is the only device connected to the bus or is connected as of last, you need to attach the 120Ω terminating resistor by using the corresponding DIP switch. An overview of serial interfaces is available HEREfor the Axon line and HEREfor the Neuron line. Let’s start by testing the communication with xG18, which is connected to the Unipi Neuron M203 controller via its single RS485 interface available at /dev/extcomm/0/0. This tool serves as a client for both Modbus RTU and TCP. ![]() A quick and easy method of doing so is the mbpoll program included in the OS Debian standard $ sudo apt install mbpoll Communication testīefore integrating external devices to an IDE, we recommend testing the communication first to ensure all physical connections are available and communication parameters are correctly configured. The xG18 module allows the connection of up to eight Unipi 1-Wire DS18B20 temperature sensors communicating via Modbus RTU.Īside from serial communication parameters (address, bitrate, parity), the module also allows you to configure the reading period independently for each 1-Wire channel. The second interface will be used in the example project below. The sensor uses two interfaces to communicate with the control system - RS485 (Modbus RTU) and wireless Wi-Fi interface (Modbus TCP). Volatile organic compound concentration (VOC).The sensor is designed for installation in building interiors and can be used to measure the following parameters: The first device we will connect to a Unipi controller is the RW-THC indoor air quality sensor. These values are represented within registers arranged into a register map, whose description should be an integral part of any Modbus device documentation. Modbus devices usually provide multiple values taking the form of measured data, configuration parameters etc. Port 502 is used commonly for TCP but is also freely configurable. IP address and port (only for TCP) - an IP address is assigned statically or dynamically.Parity and bitrate or stop bit number (does not apply for Ethernet/TCP connection) - all devices within a single segment usually share the same RS485 parameters,.Address/device identification - a unique number used to identify the Modbus server,.The following example focuses on RTU and TCP as the most frequently used variants, which require a set of specific parameters to be configured on both sides of the communication: The protocol exists in RTU, ASCII and TCP variants differing in context format or coding of the individual values. A more detailed look on Modbus is beyond this article’s scope - on this link, you can find all relevant info.Īs to its characteristics, Modbus is a Client-Server protocol where the client is a master device (a PLC in our case) while the server is represented by an extension module, smart sensor or other external devices. Its main advantages are its simplicity and low system requirements. ![]() This protocol has been in use since 1979 and is among the most frequently used protocols in the sphere of monitoring and regulation. Given the widespread use of Modbus, you can also use it to integrate a wide range of other devices from different vendors. Two Unipi products are used in the text below - RW-THC indoor air quality sensor and Unipi Extension xG18 extension module, with both utilising the Modbus protocol. RS485 serial interface and Ethernet are the most common communication methods and as are also the topic of this article. These modules can use various methods to communicate with the PLC. In such cases, one of the possible solutions is to use an extension module featuring the needed peripherals. However, in some projects, you may need more inputs/outputs, additional types of I/Os or other peripherals than the controller in question features. The previous article demonstrated usage of integrated inputs/outputs of an Unipi Neuron controller, measurement of temperature using a 1-Wire sensor and creation of a simple Node-RED sample project of a thermostat with hysteresis. Welcome to the third part of the series about using open-source software on Unipi PLCs. 12/8/20 The third article of the blog series about using open-source tools on Unipi programmable logic controllers will demonstrate communication with external devices using the Modbus protocol.
0 Comments
Leave a Reply. |