Hi.
With the package modbus_tcp_master the RUT240 can read modbus data from a PLC (Modbus TCP Server)
root@Teltonika-RUT240:~# modbus_tcp_master
Daemon starting
got ctx
got ctx
Uci init done
modbus_data table already exists
SENT_ID_TABLE already exists
Create DB done
slave request nr:[0] config is full and enabled
Getting configuration for alarms
found alarm for slave device,alarm_config_name:alarm_af699c2c632aa8afb36b5ad3b32f6450, section->e.name:cfg0169aa
have full slave config with 1 rules configured, can start thread
pthread_created:0
Freeing UCI structures
Checking DB size
Current entries to db count: 641 of 20000
request paramms: function=3, first_reg=1000, reg_count=10, enabled=1
adding data for function 3 request
chars writen to socket[12]
Before reading - expected_response_length:29
total_bytes_read[[29]]
response->data_count:20
29 chars read: trans id:0, prot id:0, len:23, uid:1 f_code:3, data_count:20, resp0:0, resp1:0, resp2:0, resp3:100, resp4:0
Checking if the response is valid
saving response to DB
Response succcessfully writen to db
Checking alarms configuration
No alarms configured for this device
closing socket
Thread sleeping 10 s, before next check
I would like to use this instruction (modbus_tcp_data) in a script, and get the modbus readed data.
Do you know how I can do it?
Thanks in advance.