# Modbus Poll Tutorial

For a new instrument integration with IoT, it is advisable to first read a given set of registers using PC based software to validate Modbus settings of the instrument. Following are two popular software tools used in the industry:

1\) Modscan [download link](https://www.win-tech.com/)

2\) Modbus Poll [download link](https://www.modbustools.com/download.html)

{% hint style="info" %}
The integration of instrument with PC based software is not in YuDash support scope. The details of software are shared for reference only and ease of integration.&#x20;
{% endhint %}

In this tutorial, steps for reading the Modbus instrument using YuDash IoT device with help of Modbus poll is explained (with focus on data type). Following are steps involved

## 1) Modbus read through Modbus Poll

1a) Interface the given Instrument using Modbus poll software.&#x20;

1b) A sample modbus register value has been read in Modbus poll and a non-zero value is validated successfully.&#x20;

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2Fz7oGZpxhV02uDPw6xU10%2F8a.jpg?alt=media&#x26;token=6aab4e3c-0d9d-42e7-82ec-574862eff4ae" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Details and support for above step (1)is outside the scope of YuDash support.&#x20;

As per customer requirement, YuDash provided online training and RS-485 to USB kit on chargeable basis.
{% endhint %}

## 2) Mapping of Modbus-Poll Settings to YuDash Modbus

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FiJnVXa1WCprrgeHnMINw%2Fyudash_with_modbus.jpg?alt=media&#x26;token=0d327788-4123-40f7-b472-aab334de51e3" alt=""><figcaption><p>RS485/Modbus instrument is connected to YuDash IoT device</p></figcaption></figure>

### 2a) Baudrate and parity settings

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FRg6X5R6jqZ1bVA9VJMw3%2F9.jpg?alt=media&#x26;token=d0a6ad46-b609-4519-9ac7-28efc0a16824" alt=""><figcaption></figcaption></figure>

### 2b) SlaveID, register and display type mapping

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FcQCyFRUK7XAtTddwdxe6%2F10.jpg?alt=media&#x26;token=e8bbd239-bd88-4da3-88d8-d3463a05fb00" alt=""><figcaption></figcaption></figure>

## 3) Mapping of Display data types to YuDash Modbus Types

There are various data types (16, 32 and 64 bit) applicable in Modbus. It is important to have correct data type selected while reading the instrument/PLC from YuDash IoT devices. The data types are explained in [Modbus Integration guide. ](https://docs.yudash.com/dc/df/modbus/..#h.jt0n9eorg4hg_l)

After successful read of register in step 1b, corresponding code in "Type" has to be filled in YuDash Modbus settings as per below mapping:&#x20;

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FMGNrQzFqpvnWL2iggg4e%2FYuDash_Modbus_Modbuspoll.jpg?alt=media&#x26;token=df557b60-3ffd-4638-beed-108334919364" alt=""><figcaption></figcaption></figure>

### Data Type for 16 bit integers

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FY3GKfrHT8blkOsZ1grM5%2F2.jpg?alt=media&#x26;token=0986edeb-720c-4ee8-99bb-17cbc413465e" alt=""><figcaption></figcaption></figure>

### Data Type for 32 bit signed integer

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FPL30nGidKcIQQC908v1X%2F3.jpg?alt=media&#x26;token=87c31f46-f3d6-42dc-90fb-7023f336c8bb" alt=""><figcaption></figcaption></figure>

### Data type for 32 bi unsigned integer

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FUXWe2bQFfWAYazao7VWA%2F4.jpg?alt=media&#x26;token=dc019362-b236-4f1f-88d1-a6c1c9a0b8a6" alt=""><figcaption></figcaption></figure>

### Data type for 32 bit Float

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FdUwGF6s3MWa2TNXlJ2Tb%2F6.jpg?alt=media&#x26;token=effe6521-990b-4de8-91b0-7982f63256e6" alt=""><figcaption></figcaption></figure>

### Data type for 64 bit data types

YuDash supports few 64 bit register data types which are converted to 32 bit floating point numbers.

## Byte Alignment Reference

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2Fa6x7p2X3OFgqBDPCTEmY%2Fbyte_page.jpg?alt=media&#x26;token=abf3ee17-68c0-4b94-b3ae-6b23ef67e939" alt=""><figcaption></figcaption></figure>

## 4) Technical Notes

### 4a) Data exchange between YuDash IoT and RS485 instrument

<figure><img src="https://1858257737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FToww5EM1cml3ouN6fvnJ%2Fuploads%2FRZetAS93Atr7xUEibCq4%2Fdata_flow.jpg?alt=media&#x26;token=7c689fff-e65a-4b6b-ae09-2d35012614c9" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yudash.com/dc/df/modbus/modbus-poll-tutorial.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
