FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

12678 questions

15063 answers

24130 comments

47081 members

0 votes
247 views 1 comments
by

I have enabled router as Modbus TCP Slave (Network -> Modbus -> Modbus TCP Slave);

and enabled Custom Register Block in the webUI from (40000 to 41000)

and enabled Router as Modbus serial master to read slaves via RS485.

Can I store the RTU registers in the Custom Register Block and access them via Modbus TCP, or in other words can I forward the RTU registers to the TCP custom registers?

Thanks

1 Answer

0 votes
by
Hello,

Technically, when it comes to Modbus "Customer Register Block", you can put any information in it, even read Modbus Serial Master database and write desired information to this block. However, we do not have any references or instructions how to do what you desire. That would require to write customer script on the router, to periodically read information, parse it and the write it to this new register block.

Instead of trying achieve such unique solution to re-read information from the router, maybe once of other existing options is suitable for you? Options, which are available at this moment in time are:

 - To use "Modbus Serial Master" functionality in combination with "Data to Server" functionality, so that read Modbus information from your RS485 device would be sent to your servers via MQTT or HTTP(S) protocols.

 - To acquire information via MQTT directly by using "Services -> Modbus -> MQTT Gateway" functionality.
by
In my case I have worked out measuring the pulse-width/periodicity of a pulse signal from a flowmeter to

caclulate flow and totalized flow - using the edge-trigger functions of IOJuggler and a couple of scripts and /tmp files

The challenge now is to figure out how to put this data into the /tmp/regfile ...
The default methodology seems horrendously hyper-ugly
Using some random non-SI illogical ugly ASCII-ified date-stamp at its head ???!!!
Is there some fundamental reason that one wouldn't use the Unix-time: date +"%s"  ? - like as the default example...
I can't imagine digging through the ASCII rubbish heap on the other end of the modbus connection
to reconstruct the date and then convert it to something useful

I get the sense that one needs to have a single application/driver which will gather whatever values from
whatever sources and then format them into a consistent fixed-format  array
(not clear yet whether ASCII or Binary - paying attention to word-order and endianness etc)