You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Zabbix documentation into your native language.

14 modbus.getパラメーター

概要

以下の表は、アイテムmodbus.getのパラメーターの詳細を示しています。

パラメーター

パラメーター 説明 デフォルト
endpoint プロトコルとエンドポイントのアドレス。protocol://connection_string で定義

プロトコルの値: rtu, ascii (Agent 2 のみ), tcp

コネクションストリングのフォーマット:

tcp の場合 - address:port
シリアルラインの場合: rtu, ascii - port_name:speed:params
ここで
'speed' - 1200, 9600 など
'params' - データビット (5,6,7 または 8)、パリティ (n,e,o のいずれか、none/even/odd)、ストップビット (1 または 2)
プロトコル: なし

rtu/ascii プロトコル:
port_name: なし
speed: 115200
params: 8n1

tcp プロトコル:
address: なし
port: 502
tcp://192.168.6.1:511
tcp://192.168.6.2
tcp://[::1]:511
tcp://::1
tcp://localhost:511
tcp://localhost
rtu://COM1:9600:8n
ascii://COM2:1200:7o2
rtu://ttyS0:9600
ascii://ttyS1
slave id 対象デバイスのModbusアドレス (1~247)。MODBUS Messaging Implementation Guide (23ページ) を参照

tcpデバイス (GW以外) はこのフィールドを無視
serial: 1

tcp: 255 (0xFF)
2
function 空、またはサポートされている関数の値:

1 - Read Coil,
2 - Read Discrete Input,
3 - Read Holding Registers,
4 - Read Input Registers
3
address 最初のレジスタ、コイル、または入力のアドレス。

'function' が空の場合、'address' は以下の範囲で指定:
Coil - 00001 - 09999
Discrete input - 10001 - 19999
Input register - 30001 - 39999
Holding register - 40001 - 49999

'function' が空でない場合、'address' フィールドは0~65535の範囲で、修正なしで使用 (PDU)
functionが空: 00001

functionが空でない: 0
9999
count デバイスから読み取る連続した 'type' の数。

CoilまたはDiscrete inputの場合、'type' = 1ビット
その他の場合: (count*sizeof(type))/2 = 実際に読み取るレジスタ数
'offset' が0でない場合、その値が '実際の数' に加算される
許容範囲は1:65535
1 2
type データ型:

Read Coil, Read Discrete Input の場合 - bit

Read Holding Registers, Read Input Registers の場合:
int8 - 8ビット
uint8 - 8ビット (符号なし)
int16 - 16ビット
uint16 - 16ビット (符号なし)
int32 - 32ビット
uint32 - 32ビット (符号なし)
float - 32ビット
uint64 - 64ビット (符号なし)
double - 64ビット
bit
uint16
uint64
endianness エンディアンタイプ:
be - ビッグエンディアン
le - リトルエンディアン
mbe - ミッドビッグエンディアン
mle - ミッドリトルエンディアン

制限:
1ビットの場合 - be
8ビットの場合 - be,le
16ビットの場合 - be,le
be le
offset 'address' から始まるレジスタ数で、その結果は破棄される。

各レジスタのサイズは16ビット (ランダムリードアクセスをサポートしない機器のために必要)
0 4