SHM Modbus - Getting Started
SHM Modbus > Getting Started
“This getting started section demonstrates setting up a Shared Memory Modbus client and simulating register data.”
1. Start Modbus client
modbus-tcp-client-shm --semaphore modbus -p 5020
This command starts a shared memory Modbus TCP client listening on port 5020
.
It creates the shared memories modbus_DO
, modbus_DI
, modbus_AO
and modbus_AI
,
and creates the semaphore modbus
to protect the shared memory from simultaneous access.
For more details about using the Modbus clients see modbus-tcp-client-shm and modbus-rtu-client-shm.
2. Interact with the shared memory
SHM Modbus provides tools to inspect and manipulate the Modbus client data.
Write data
- write-shm: write any data to a shared memory. (available via the GUI)
- shared-mem-random: write random data to a shared memory (available via the GUI)
- stdin-to-modbus-shm: write values (with specified data type) to registers.
- shm-modbus-signal-gen: signal generator that generates input for stdin-to-modbus-shm
Inspect data
- dump-shm: outputs shared memory data to stdout. Can be used in combination with the
hexdump
command to create a hexdump of a shared memory. (The hexdump functionality is available via the GUI.) - shm-format: reads data with a specified data type from shared memory.