This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
uphp:functions:mb_send_command [2017/05/05 14:28] jeff created |
uphp:functions:mb_send_command [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
< | < | ||
- | Send a sequence of characters to the rs485 bus and get a reply | + | Send a sequence of characters to the RS-485 [or TCP Channel] |
====Description==== | ====Description==== | ||
- | <well size=" | + | <well size=" |
- | < | + | |
<span style=" | <span style=" | ||
- | <span style=" | + | <span style=" |
- | </html> | + | <span style=" |
- | [[mb_send_command]] ( | + | <span style=" |
- | <html> | + | <span style=" |
+ | <span style=" | ||
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
Line 20: | Line 20: | ||
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
- | </ | + | </ |
- | </ | + | |
====Parameters==== | ====Parameters==== | ||
- | < | + | < |
+ | < | ||
- | ====Return | + | The $bus parameter can be one of the following values: |
+ | |||
+ | 0 - Modbus RTU | ||
+ | |||
+ | 2-10 - Modbus TCP Channel 1-9 | ||
+ | |||
+ | ====Return | ||
< | < | ||
Line 35: | Line 41: | ||
[[mb_add_dev()]] - Add a device to the list of polled devices | [[mb_add_dev()]] - Add a device to the list of polled devices | ||
- | [[mb_delete_device()]] - Delete a device from the list of active devices | + | [[mb_delete_dev()]] - Delete a device from the list of active devices |
[[mb_get_dev_by_id()]] - Return modbus device details by ID | [[mb_get_dev_by_id()]] - Return modbus device details by ID | ||
Line 53: | Line 59: | ||
[[mb_num_devices()]] - Return number of devices on the modbus | [[mb_num_devices()]] - Return number of devices on the modbus | ||
- | [[mb_queue_command()]] - Queue a sequence of characters to the rs485 bus and get but ignore the reply | + | [[mb_queue_command()]] - Queue a sequence of characters to the RS-485 |
[[mb_scan_complete()]] - Check to see if a modbus scan has completed | [[mb_scan_complete()]] - Check to see if a modbus scan has completed |