FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
437 views 7 comments
by anonymous
good afternoon.

could you help me with the following, I wanted to know how I can receive data from a sutron Xlink 500 data logger. The logger does not have ethernet ports, just a serial rs232 and a rs485 connection.

I have already tried configuring monbus server but I have not had responses from the client side, which in this case would be the xlink 500.

this is the schema I am implementing.

please help....
by anonymous

Thank you very much for the answer, I was able to connect now.

But now I have another query, at the time of performing the test in RUT955 that gives the following value [51139] and the values that I want to obtain are from the following temperature and barometric pressure sensors. In the screenshots it looks more detailed.

by anonymous

To read more values from the xlink device you will need to refer to the manual of the device and see what registers hold what information and in what format it is stored. For each of the value you want to read, you have to add an additional request in the configuration.

1 Answer

0 votes
by anonymous

Hello,

To read Modbus information from a serial port you need to install a package called Modbus Serial Master, since it is not available by default on RUT955. You can do that in two ways:

Way one:

Go to WebUI Services –> Package manager, press Refresh button and then search for Modbus serial master, click the + sign and will be installed. More information can be found here: https://wiki.teltonika-networks.com/view/RUT955_Package_Manager#Package_Manager

Way two: you can manually download the package to your pc and upload it via Package manager -> Upload. You can download the packages .zip file from https://wiki.teltonika-networks.com/view/RUT955_Package_Downloads#Latest_Packages_.28from_07.00.29 and in the zip file look for MODBUS_Serial_master.tar.gz.

After the package is installed, you can find it in Services -> Modbus -> Modbus serial master. Select which serial interface you will be using, enter the serial port options of your device, click save & apply. More info can be found here: https://wiki.teltonika-networks.com/view/RUT955_Modbus#Modbus_Serial_Master

Then you can add a device to your device list, by pressing add and then on the pencil to enter the setting for you modbus device, slave ID and the period of requests to the device. More info here: https://wiki.teltonika-networks.com/view/RUT955_Modbus#RS232_Slave_Devices_List

In the same window you can configure what request will be sent to the device on each period, here you can select the data type, what function will be executed, start register number and how many registers are supposed to be read, you can find more detailed information here: https://wiki.teltonika-networks.com/view/RUT955_Modbus#Requests_Configuration_2

Please note, to get the data from xlink 500 device it should also support Modbus protocol and you should know to which register router should send request and what is the number of registers.

You can also find configuration example of obtaining data via Modbus in the link bellow:

https://wiki.teltonika-networks.com/view/How_to_simulate_Modbus_serial_communication

You can also test your request by selecting the name of the request and pressing the test button.

If you do net get desired results, you can try to add +1 to the register number, since the is no agreement for the starting register number of Modbus devices.

Regards,

Paulius

by anonymous

It could be that the slave address is invalid, the default one is usually 1.

From the screenshot you have provided, you used 1 as the address, could you try using 2 as the address. Also, the manual states to use 16-bit unsinged integers as data type.

Also, have you checked that the baudrate and the other serial settings are correct to connecting to the xlink device. I have provided in the screenshot what would be the default setting based on the device manual.

Also have you tried to run the modbus examples with the modrssim2 program from the wiki page link provided and did those examples work for you? If not, please provide the configuration and errors that you had.

RS232 xlink serial config

by anonymous

Thank you very much for the answer, with the comment above mentioning that I was already able to obtain the data from the sensors that I wanted, for example from a temperature sensor. I will attach a screenshot ending the comment.

Now my query is how can I download this data or send it to an ftp, or a simple external server?

Is there a possibility to download these mentioned data?

by anonymous

To send modbus data from the device there are quite a few options:

Modbus data to server which allows to send modbus data in preset JSON format via MQTT, HTTP or kinesis, you can find more info about it on our wiki.

MQTT gateway allows you to send modbus data via MQTT but in different format, you can read more here.

You can find a configuration example here. If you are using windows you can try Eclipse Mosquitto which has the same commands as in this example.

by anonymous

good afternoon, could you help me with the search for the directory of the data that the RUT955 collects in modbus mode, I need the location of the directory using the WinSCP software.

please help.

The first image is the data obtained by the RUT955 in modbus serial master mode.

the second capture is of the WinSCP software already visualizing the folders or directories of the RUT955.

by anonymous

 

The collected data is stored in a database file that is in /tmp/.modbus_tcp_master_db, the file by default is hidden.

Database is in sqlite3 format and can be accessed using any sqlite3 database engine.