-
gateway.wait-after-failed-attempts
+
gateway.wait-after-failed-attempts
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.scss
index 8900741a93..0c68b6af9e 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.scss
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.scss
@@ -23,4 +23,14 @@
margin-right: 16px;
color: rgba(0, 0, 0, 0.87);
}
+
+ .fixed-title-width-260 {
+ min-width: 260px;
+ }
+
+ ::ng-deep.security-config {
+ .fixed-title-width {
+ min-width: 230px;
+ }
+ }
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.ts
index e21a9921a7..3d2f5b6f5d 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-slave-dialog/modbus-slave-dialog.component.ts
@@ -52,6 +52,8 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { GatewayPortTooltipPipe } from '@home/components/widget/lib/gateway/pipes/gateway-port-tooltip.pipe';
import { takeUntil } from 'rxjs/operators';
import { isEqual } from '@core/utils';
+import { TruncateWithTooltipDirective } from '@shared/directives/truncate-with-tooltip.directive';
+import { helpBaseUrl } from '@shared/models/constants';
@Component({
selector: 'tb-modbus-slave-dialog',
@@ -76,6 +78,7 @@ import { isEqual } from '@core/utils';
ModbusValuesComponent,
ModbusSecurityConfigComponent,
GatewayPortTooltipPipe,
+ TruncateWithTooltipDirective,
],
styleUrls: ['./modbus-slave-dialog.component.scss'],
})
@@ -97,7 +100,7 @@ export class ModbusSlaveDialogComponent extends DialogComponent(
export const HelpLinkByMappingTypeMap = new Map(
[
- [MappingType.DATA, 'https://thingsboard.io/docs/iot-gateway/config/mqtt/#section-mapping'],
- [MappingType.OPCUA, 'https://thingsboard.io/docs/iot-gateway/config/opc-ua/#section-mapping'],
- [MappingType.REQUESTS, 'https://thingsboard.io/docs/iot-gateway/config/mqtt/#section-mapping']
+ [MappingType.DATA, helpBaseUrl + '/docs/iot-gateway/config/mqtt/#section-mapping'],
+ [MappingType.OPCUA, helpBaseUrl + '/docs/iot-gateway/config/opc-ua/#section-mapping'],
+ [MappingType.REQUESTS, helpBaseUrl + '/docs/iot-gateway/config/mqtt/#section-mapping']
]
);
diff --git a/ui-ngx/src/assets/help/en_US/widget/lib/gateway/modbus-functions-data-types_fn.md b/ui-ngx/src/assets/help/en_US/widget/lib/gateway/modbus-functions-data-types_fn.md
new file mode 100644
index 0000000000..6a38f9220f
--- /dev/null
+++ b/ui-ngx/src/assets/help/en_US/widget/lib/gateway/modbus-functions-data-types_fn.md
@@ -0,0 +1,33 @@
+# Modbus Functions
+
+The Modbus connector supports the following Modbus functions:
+
+| Modbus Function Code | Description |
+|----------------------|----------------------------------|
+| 1 | Read Coils |
+| 2 | Read Discrete Inputs |
+| 3 | Read Multiple Holding Registers |
+| 4 | Read Input Registers |
+| 5 | Write Coil |
+| 6 | Write Register |
+| 15 | Write Coils |
+| 16 | Write Registers |
+
+## Data Types
+
+A list and description of the supported data types for reading/writing data:
+
+| Type | Function Code | Objects Count | Note |
+|----------|---------------|---------------|----------------------------------------------------|
+| string | 3-4 | 1-… | Read bytes from registers and decode it (‘UTF-8’ coding). |
+| bytes | 3-4 | 1-… | Read bytes from registers. |
+| bits | 1-4 | 1-… | Read coils. If the objects count is 1, result will be interpreted as a boolean. Otherwise, the result will be an array with bits. |
+| 16int | 3-4 | 1 | Integer 16 bit. |
+| 16uint | 3-4 | 1 | Unsigned integer 16 bit. |
+| 16float | 3-4 | 1 | Float 16 bit. |
+| 32int | 3-4 | 2 | Integer 32 bit. |
+| 32uint | 3-4 | 2 | Unsigned integer 32 bit. |
+| 32float | 3-4 | 2 | Float 32 bit. |
+| 64int | 3-4 | 4 | Integer 64 bit. |
+| 64uint | 3-4 | 4 | Unsigned integer 64 bit. |
+| 64float | 3-4 | 4 | Float 64 bit. |
diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json
index 4f3895b21a..f34466580f 100644
--- a/ui-ngx/src/assets/locale/locale.constant-en_US.json
+++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json
@@ -3312,6 +3312,7 @@
"exactly-once": "2 - Exactly once"
},
"objects-count": "Objects count",
+ "objects-count-required": "Objects count is required",
"wait-after-failed-attempts": "Wait after failed attempts (ms)",
"tls-path-private-key": "Path to private key on gateway",
"toggle-fullscreen": "Toggle fullscreen",
@@ -3367,7 +3368,6 @@
"permit-without-calls": "Allow server to keep the GRPC connection alive even when there are no active RPC calls.",
"path-in-os": "Path in gateway os.",
"memory": "Your data will be stored in the in-memory queue, it is a fastest but no persistence guarantee.",
- "framer-type": "Type of framer.",
"file": "Your data will be stored in separated files and will be saved even after the gateway restart.",
"sqlite": "Your data will be stored in file based database. And will be saved even after the gateway restart.",
"opc-timeout": "Timeout in milliseconds for connecting to OPC-UA server.",
@@ -3376,7 +3376,33 @@
"enable-subscription": "If true - the gateway will subscribe to interesting nodes and wait for data update and if false - the gateway will rescan OPC-UA server every scanPeriodInMillis.",
"show-map": "Show nodes on scanning.",
"method-name": "Name of method on OPC-UA server.",
- "arguments": "Arguments for the method (will be overwritten by arguments from the RPC request)."
+ "arguments": "Arguments for the method (will be overwritten by arguments from the RPC request).",
+ "modbus": {
+ "framer-type": "Type of a framer (Socket, RTU, or ASCII), if needed.",
+ "host": "Hostname or IP address of Modbus server.",
+ "port": "Modbus server port for connection.",
+ "unit-id": "Modbus slave ID.",
+ "connection-timeout": "Connection timeout (in seconds) for the Modbus server.",
+ "byte-order": "Byte order for reading data.",
+ "word-order": "Word order when reading multiple registers.",
+ "retries": "Retrying data transmission to the master. Acceptable values: true or false.",
+ "retries-on-empty": "Retry sending data to the master if the data is empty.",
+ "retries-on-invalid": "Retry sending data to the master if it fails.",
+ "poll-period": "Period in milliseconds to check attributes and telemetry on the slave.",
+ "connect-attempt-time": "A waiting period in milliseconds before establishing a connection to the master.",
+ "connect-attempt-count": "The number of connection attempts made through the gateway.",
+ "wait-after-failed-attempts": "A waiting period in milliseconds before attempting to send data to the master.",
+ "serial-port": "Serial port for connection.",
+ "baudrate": "Baud rate for the serial device.",
+ "stopbits": "The number of stop bits sent after each character in a message to indicate the end of the byte.",
+ "bytesize": "The number of bits in a byte of serial data. This can be one of 5, 6, 7, or 8.",
+ "parity": "The type of checksum used to verify data integrity. Options: (E)ven, (O)dd, (N)one.",
+ "strict": "Use inter-character timeout for baudrates ≤ 19200.",
+ "objects-count": "Depends on the selected type.",
+ "address": "Register address to verify.",
+ "key": "Key to be used as the attribute key for the platform instance.",
+ "data-keys": "For more information about function codes and data types click on help icon"
+ }
}
},
"grid": {