simple Modebus client and server test by response of random number
Project description
Modbus TCP simulator
-set config in register_params.json
ex)
{
"40001":{"max_int":300, "min_int":100, "address":40001},
"40002":{"max_int":300, "min_int":20, "address":40002},
"40004":{"max_int":300, "min_int":20, "address":40004}
}
start simulating server by 'ygModbus-runserver'
ctrl+c for terminate server
ygModBus-runserver args:
('-H', '--host', type=str, default='127.0.0.1', help='Host (default: 127.0.0.1)')
('-p', '--port', type=int, default=502, help='TCP port (default: 502)')
('-j', '--json', type=str, default='register_params.json', help='JSON file with register parameters (default: register_params.json)')
('-i', '--interval', type=float, default=1.0, help='Interval in seconds for updating holding registers (default: 1.0)')
get response from server by 'ygModbus-request'
ygModbus-request args:
('-H', '--host', type=str, default='127.0.0.1', help='Host (default: 127.0.0.1)')
('-p', '--port', type=int, default=502, help='TCP port (default: 502)')
('-n', '--number', type=int, default=1, help='Number of holding registers (default: 1)')
('-s', '--start', type=int, default=40001, help='Starting register address (default: 40001)')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for ygModbus-0.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cef9fc463c22fc118718723349ed48966a1e3cc4d9e27b41dff834c6c25fe4ce |
|
MD5 | 4b7ca8ab94420416c8682ce8e82eca77 |
|
BLAKE2b-256 | e030c3bb6fefa6d4b85227d3316cfc35d0dabfa4dfc97d684f76eae6006b006a |