Read time from a Modbus register in SAIA PCD03

martincho8002

Member
Join Date
Oct 2018
Location
Sofia
Posts
3
Hi there.

I am trying to read time of day from a Modbus register in SAIA PCD3 however I have limited data about the point. It should be read as an integer but then it should be processed. The valuer I see currently is in the range of millions , for example:

39,322,505 should be some time of the day in the range between 00:00 and 24:00 but I do not know how to divide/multiply it ?

Thanks in advance
 
Cant see your Reading is a valid clock. Did you test modbus adress (n +/-1)?

Some standard formats: 32bit

Day Day of month
DayInYear No of day in the year (1..366)
DayOW Day of week
DHHMM Day of week Hour, Minute
HHMM Hour, Minute
HHMMSS Hour, Minute, Second
Hour Hour
YYMMDD Year 00..99, Month, Day
MinODay Minute of the day
Minute Minute
MMDD Month, Day
MMDDHHMM Month, Day, Hour, Minute
Month Month
SecODay Second of the day
Second Second
Week Week of year
WWD Week of year and day of week
Year Year 00..99
YYYYear Year 2000..2099
YYYYMMDD Year 2000..2099, Month, Day




Internal Clock/Date representation (64bit)
Digit 9 8 7 6 5 4 3 2 1 0
Reg 0 0 0 0 Hour Hour Min Min Sec Sec
Reg+1 0 Week Week WDay Year Year Mon Mon Day Day


Week Week of year 1..53
WDay Day of week 1..7 (Monday = 1, Sunday = 7)
Year Year 0..99
Mon Month of year 1..12
Day Day of month 1..28/29/30/31 (month dependent)
Hour Hour 0..23
Min Minute 0..59
Sec Second 0..59
 
Also if it's a 32bit register are you reading the word order correctly? Some systems will read the most significant word first the then least. You may need to swap the word order.


Without any information about what is stored in the PCD3 you are going to struggle to get the data format correct. What information do you have, even if it is limited?
 
Also if it's a 32bit register are you reading the word order correctly? Some systems will read the most significant word first the then least. You may need to swap the word order.


Without any information about what is stored in the PCD3 you are going to struggle to get the data format correct. What information do you have, even if it is limited?

The register in question is 16 bit. Can someone give examples of 16bit formats for hour:minute. HH:mm
 
16 bit registers can only return a maximum value of 65536 if unsigned or -32768 to 32767 if signed.


You stated you received a value of 39,322,505, so it is highly unlikely to be 16 bit unless there is something odd going on.
 
16 bit registers can only return a maximum value of 65536 if unsigned or -32768 to 32767 if signed.


You stated you received a value of 39,322,505, so it is highly unlikely to be 16 bit unless there is something odd going on.


Thanks, I will look into it.
 

Similar Topics

Hi everyone, I am working on a project that needs to expose the SV (Set Value) of a temperature controller to a SCADA system. SCADA <-...
Replies
4
Views
162
I have Micro850 with module 2080-Serialisol. It is needed to read 5 registers from a device via Modbus RTU. The device is Ok, I can read the data...
Replies
0
Views
1,139
I have a twido TWDLCAE40DRF PLC, IP 192.168.0.1, connect to a network switch port 1. Also, I have a modbus Power Meter (Device ID: 5, PLC try to...
Replies
11
Views
8,947
Hello, I set up my Micro820 with a basic mapping. When I try to run a script to read the addresses I get errors for illegal addresses...
Replies
2
Views
172
I am working on a project, inside an AB CLX, I implemented the Modbus TCP Client AOI published on AB website, to interreact with a Modbus ASCII...
Replies
7
Views
3,567
Back
Top Bottom