The epoch in second interval is not correct in db

I set 1s interval in modbus >> series master >>> 1s

But modbus_db is getting 2 second intervals:

Hi,

Is there a way to modify the data write to modbus_db?

or some kind of API for modbus, so that i can activate data write in an accurate time. We need high accurate time and response_data at a time e.g.00:00. And only send once per day to cloud.

Hi,

Anyone answer this question? It’s been 2 days.

Hello,

I’ve checked, and with the interval set to 1 in Modbus Master configuration, the data is returned every second for both registers read:


Perhaps your device takes longer than a second to return the values? Are you sure that the interval is set to 1 second?

Best regards,


Could you also attach the Serial connection parameters?

Best regards,

What’s that?


It could be that the device simply cannot return this data in 1 second. Also, what is the firmware version on your device?

Best regards,

I’d suggest trying to follow this configuration example, and checking if the issue is still present:
https://wiki.teltonika-networks.com/view/Modbus_Master_RutOS_configuration_example
The same TRB1 device can act as a slave and a master. Try reading the register 2 with the register count of 2. If the data is returned every second, the issue is most likely caused by the speed of the serial line. If your device supports it, please try increasing the baud rate and check if the issue replicates.

Best regards,

We are using rs485 to send data to device, not another wireless device. So you can only see lan instead of wan.

No, it won’t send data when baud > 9600

By disable one of the slave, it now can send data by one second intervals. So your advice is to change the series wire to improve the bandwitdth?


Our main target is just send a reading for all the slaves in a exact time to cloud, that’s all. So if I can get some api or lower level code that I can modify, to write data to modbus_db file, then we don’t need to worry about the baud thing.

Thanks,

Hi @Daumantas,

Any updates?

Thanks,

This is because the limitation of the rs485 series cable, it can only send one data per time, I’m wondering if I connect with 100 stateless devices to the teltonika, and want 9:00am data, what would happended?

This is answer from GPT

If you’re experiencing data skipping issues with your RS485 communication in your IoT setup, it could be due to a variety of factors. Here are some potential solutions:

  1. Master-Slave Configuration: Consider setting up a master-slave configuration where one device (the master) addresses each slave in turn and makes it send either data or a dummy ACK or NACK1. Each slave waits for its ID sent by the master and answers only when that ID was sent1.
  2. Check for Electrical Noise: Electrical noise in the system can cause COM ports to become ‘lost’ on your computer2. You might want to check for sources of electrical noise and take steps to mitigate them.
  3. Ensure Adequate Response Time: Make sure the device you are talking to is not sent a query and does not have enough time to respond with the message2. The VISA read times out and an error is generated. This error if propagated through can cause the VI’s to stop performing any operations2.
  4. Hardware Considerations: It could also be a hardware problem, multiple devices on RS485 can be tricky2. You might want to consider using a USB to RS485 communication module for each of the different bus configurations you need to create2.
  5. Proper Wiring: Guidelines for Proper Wiring of an RS-485 (TIA/EIA-485-A) Network can help in reducing communication errors2.
  6. Check Your Code: If you’re using custom code for communication, make sure there are no logical errors or issues that could be causing the data skipping.

Remember, troubleshooting communication issues can be complex and might require a combination of solutions. If you’re still having trouble, you might want to consult with a network or hardware engineer who can provide more specific advice based on your exact setup.

Hello,

Since the Modbus service is closed-source, it will not be possible to directly modify the Modbus Client service. However, I’d suggest checking out the Modbus to MQTT Gateway, which can be used to read and write Modbus values remotely using MQTT: Modbus RTU Master MQTT Serial Gateway - Teltonika Networks Wiki
If your device supports it, I’d also suggest configuring the RS485 line for full-duplex operation, as the TRB145 supports it.

Best regards,

This topic was automatically closed after 15 days. New replies are no longer allowed.