Skip to content

Commit fd7d0ff

Browse files
authored
Merge pull request #1630 from hansu/docs-2.8
Improved Modbus to Hal docs + man page (2.8)
2 parents b64025d + 47fed73 commit fd7d0ff

6 files changed

Lines changed: 258 additions & 295 deletions

File tree

docs/man/man1/mb2hal.1

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,67 @@
2626
.\"
2727
.\"
2828
.\"
29-
.TH mb2hal "1" "January 1, 2016" "Modbus to HAL" "LinuxCNC Documentation"
29+
.TH mb2hal "1" "November 20, 2021" "Modbus to HAL" "LinuxCNC Documentation"
3030
.SH NAME
3131
\fBmb2hal\fR - HAL userspace component for Modbus
3232
.SH SYNOPSIS
33-
.B mb2hal
34-
.RI [OPTIONS]
33+
.TP
34+
Default component name:
35+
loadusr -W mb2hal config=config_file.ini
36+
.TP
37+
Custom component name:
38+
loadusr -Wn mymodule mb2hal config=config_file.ini
39+
40+
3541
.br
3642
.SH DESCRIPTION
3743
MB2HAL is a generic userspace HAL component to communicate with one or more
38-
Modbus devices.
44+
Modbus devices. It supoorts Modbus RTU and Modbus TCP.
45+
3946
.PP
40-
See the Documents for more information on mb2hal
47+
See
48+
.UR http://linuxcnc.org/docs/html/drivers/mb2hal.html
49+
.UE
50+
for more information.
51+
52+
.SH PINS
53+
54+
.SS fnct_02_read_discrete_inputs:
55+
.TP
56+
.B mb2hal.m.n\fR bit out
57+
.SS fnct_03_read_holding_registers:
58+
.SS fnct_04_read_input_registers:
59+
.TP
60+
.B mb2hal.m.n.float\fR float out
61+
.TQ
62+
.B mb2hal.m.n.int\fR s32 out
63+
.SS fnct_06_write_single_register:
64+
.TP
65+
.B mb2hal.m.n\fR float in
66+
NELEMENTS needs to be 1 or PIN_NAMES must contain just one name.
67+
.SS fnct_15_write_multiple_coils:
68+
.TP
69+
.B mb2hal.m.n\fR bit in
70+
.SS fnct_16_write_multiple_registers:
71+
.TP
72+
.B mb2hal.m.n\fR float in
73+
.RE
74+
75+
.SS Each transaction
76+
.TQ
77+
.B mb2hal.m.num_errors\fR u32 in
78+
Error counter
79+
.RE
80+
81+
.br
82+
m = HAL_TX_NAME or transaction number if not set, n = element number (NELEMENTS)
83+
.br
84+
Example:
85+
.br
86+
mb2hal.00.01.<type> (transaction=00, second register=01 (00 is the first one))
87+
.br
88+
mb2hal.TxName.01.<type> (HAL_TX_NAME=TxName, second register=01 (00 is the first one))
89+
4190
.SH AUTHOR
4291
Victor Rocco
4392
.SH LICENSE

docs/src/Submakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ $(DOC_TARGETS_HTML): $(DOC_DIR)/html/%.html: $(DOC_SRCDIR)/%.html
617617
mkdir -p objects/image-cache; \
618618
HTML_LATEX_CACHE=objects/image-cache $(DOC_SRCDIR)/html-latex-images $$HTML_FILE || (X=$$?; rm $$HTML_FILE; exit $$X); \
619619
done
620+
cp -f ../src/hal/user_comps/mb2hal/mb2hal_HOWTO.ini $(DOC_DIR)/html/drivers/
620621
touch $@
621622

622623
# Define a target-specific variable called STYLES_SCRIPTS_DIR, which has

0 commit comments

Comments
 (0)