Support Forums
Timestamp issue and Modbus

We have been working with DT's for a long time, but this is our first time working with a MODBUS device and need some help.
Usually when we write schedules, we do a polling schedule at 15 seconds where we read all our sensors and do calculations, and a reporting schedule at 15 minutes that reports sums/averages as appropriate. (EX: RA15S, RB15M)

The issue we are having is that in all the loggers that are talking with a MODBUS power monitor (DENT power scout), the reports are coming out at odd timestamps, offset as much as 2 minutes from when they should be reporting. We are trying to collect 64 points of data off the MODBUS channel every 15 seconds, and I have it set for 1 retry on each, which is a lot, but at 9600 baud it seems like that should be enough time to read the channels... or am I mistaken?

Any help would be appreciated.

We have been working with DT's for a long time, but this is our first time working with a MODBUS device and need some help. Usually when we write schedules, we do a polling schedule at 15 seconds where we read all our sensors and do calculations, and a reporting schedule at 15 minutes that reports sums/averages as appropriate. (EX: RA15S, RB15M) The issue we are having is that in all the loggers that are talking with a MODBUS power monitor (DENT power scout), the reports are coming out at odd timestamps, offset as much as 2 minutes from when they should be reporting. We are trying to collect 64 points of data off the MODBUS channel every 15 seconds, and I have it set for 1 retry on each, which is a lot, but at 9600 baud it seems like that should be enough time to read the channels... or am I mistaken? Any help would be appreciated.

Hi eweitzel,

There are several factors that cause that offset (e.g.: reading MODBUS in block compare to individually, number of retries etc).

Could you email me your service data report and program for review?

Best regards,
Rudy Gunawan

Hi eweitzel, There are several factors that cause that offset (e.g.: reading MODBUS in block compare to individually, number of retries etc). Could you email me your service data report and program for review? Best regards, Rudy Gunawan

I can't find your e-mail listed, maybe it's because I'm new to the forums, I'm restricted? It appears I am not able to add attachments to this post either, so forgive me, I'm adding a sample into this message, but this program is large.

Data being reported:
"Timestamp","TZ","TAO (degF)","RHO (%)","TAI1 (degF)","RHI1 (%)","TAI3 (degF)","RHI3 (%)","TAI2 (degF)","TAI5 (degF)","TAI6 (degF)","TWFS (degF)","TWFR (degF)","TWZS (degF)","TWZR (degF)","VWZ (gal)","VFC (gal)","VWS (gal)","VWD (gal)","EFAN (kW)","EFC_FA (kW)","ESP (kW)","EWH (kW)","EHP (kW)","EP1 (kW)","EP7 (kW)","EPV (kW)","EHSE (kW)","EGEN (kW)","TWFS (degF)","TWFR (degF)","TWZS (degF)","TWZR (degF)","QFCH (Btu)","QRFH (Btu)","QFCC (Btu)","QRFC (Btu)","QDHW (Btu)","QSOLAR (Btu)","PLH1 (%)","PLH2 (%)","PLC1 (%)","PLC2 (%)","PLFCHP (%)","PLFCFA (%)","PLGEN (%)","PLSP (%)","PLWH (%)","PLHP (%)","PLP3 (%)","PLP9 (%)","PLPV (%)","PLHSE (%)","PLFC (%)","PFHP1","PFHP2","PFHP3","AMPHP1","AMPHP2","AMPHP3","VHP1","VHP2","VHP3","PFEP11","PFEP12","AMPEP11","AMPEP12","VEP11","VEP12","PFEP71","PFEP72","PFEP73

I can't find your e-mail listed, maybe it's because I'm new to the forums, I'm restricted? It appears I am not able to add attachments to this post either, so forgive me, I'm adding a sample into this message, but this program is large. Data being reported: "Timestamp","TZ","TAO (degF)","RHO (%)","TAI1 (degF)","RHI1 (%)","TAI3 (degF)","RHI3 (%)","TAI2 (degF)","TAI5 (degF)","TAI6 (degF)","TWFS (degF)","TWFR (degF)","TWZS (degF)","TWZR (degF)","VWZ (gal)","VFC (gal)","VWS (gal)","VWD (gal)","EFAN (kW)","EFC_FA (kW)","ESP (kW)","EWH (kW)","EHP (kW)","EP1 (kW)","EP7 (kW)","EPV (kW)","EHSE (kW)","EGEN (kW)","TWFS (degF)","TWFR (degF)","TWZS (degF)","TWZR (degF)","QFCH (Btu)","QRFH (Btu)","QFCC (Btu)","QRFC (Btu)","QDHW (Btu)","QSOLAR (Btu)","PLH1 (%)","PLH2 (%)","PLC1 (%)","PLC2 (%)","PLFCHP (%)","PLFCFA (%)","PLGEN (%)","PLSP (%)","PLWH (%)","PLHP (%)","PLP3 (%)","PLP9 (%)","PLPV (%)","PLHSE (%)","PLFC (%)","PFHP1","PFHP2","PFHP3","AMPHP1","AMPHP2","AMPHP3","VHP1","VHP2","VHP3","PFEP11","PFEP12","AMPEP11","AMPEP12","VEP11","VEP12","PFEP71","PFEP72","PFEP73

Hi eweitzel,

I got your result and code.
Can you access private message of this forum?

As you are reading analogue channel as well, it may not have enough time to finish schedule A.
I will analyse this and get back to you.

Best regards,
Rudy Gunawan

Hi eweitzel, I got your result and code. Can you access private message of this forum? As you are reading analogue channel as well, it may not have enough time to finish schedule A. I will analyse this and get back to you. Best regards, Rudy Gunawan

Hi eweitzel,

I have checked all of your code, it is possible that your MODBUS device is slowing down your scan rate.
Each MODBUS device has different respond time, some are very fast and some could be slow (slow device can reach more than 1 s to respond).

I used Scheider ION6200 and able to run sampling at 1s for 75 parameters.

To increase sampling speed, you may consider to increase your baud rate and do a block read as many as you can and scaling it later, example:
1MODBUS(AD2,R4:4056,0.1,=44..46CV,RT1,W) 'HP L1,2,3 Amps'
1MODBUS(AD2,R4:4059,0.1,=47..49CV,RT1,W) 'HP L1,2,3 Volts'

into
1MODBUS(AD2,R4:4056,0.1,=44..49CV,RT1,W) 'HP L1,2,3 Amps and Volts'

Best regards,
Rudy Gunawan

Hi eweitzel, I have checked all of your code, it is possible that your MODBUS device is slowing down your scan rate. Each MODBUS device has different respond time, some are very fast and some could be slow (slow device can reach more than 1 s to respond). I used Scheider ION6200 and able to run sampling at 1s for 75 parameters. To increase sampling speed, you may consider to increase your baud rate and do a block read as many as you can and scaling it later, example: 1MODBUS(AD2,R4:4056,0.1,=44..46CV,RT1,W) 'HP L1,2,3 Amps' 1MODBUS(AD2,R4:4059,0.1,=47..49CV,RT1,W) 'HP L1,2,3 Volts' into 1MODBUS(AD2,R4:4056,0.1,=44..49CV,RT1,W) 'HP L1,2,3 Amps and Volts' Best regards, Rudy Gunawan
31
4
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft