Modbus RTU:making request without "parameter descriptor" setup

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Modbus RTU:making request without "parameter descriptor" setup

Postby davdav » Wed Dec 02, 2020 4:05 pm

Hi everybody,

I would like to use freemodbus component to implement a modbus MASTER.

I have two concerns using the component:
1. The serial port which will send the modbus request (UART0) is currently used, so its driver is installed and a specific task manages its event: suspending the task it's OK but should I also delete the driver every time I want to send a modbus request?

2. since modbus request will be made "on-the-fly" (no knowledge of what function code and/or register number is requested), is it possible to avoid the setup of the "parameter descriptor" as reported in the example:
is is possible to use only "mbc_master_send_request" API to read/write the modbus slave register?


Thanks

ESP_alisitsyn
Posts: 203
Joined: Fri Feb 01, 2019 4:02 pm
Contact:

Re: Modbus RTU:making request without "parameter descriptor" setup

Postby ESP_alisitsyn » Wed Jan 13, 2021 8:00 am

Hi davdav,
since modbus request will be made "on-the-fly" (no knowledge of what function code and/or register number is requested), is it possible to avoid the setup of the "parameter descriptor" as reported in the example:
is is possible to use only "mbc_master_send_request" API to read/write the modbus slave register?
The modbus master implementation uses modbus controller interface layer above modbus to use modbus with other implementations like MDF. You can use the modbus API and mbc_master_send_request() in your application if absolutely required. See the file mbc_serial_master.c/h of modbus controller as an example of using the modbus port layer.

Who is online

Users browsing this forum: Baidu [Spider] and 136 guests