Schneider M580 Local day of week

Marie1982

Member
Join Date
Feb 2007
Location
House
Posts
121
Hi everyone,

I used RRTC_DT function to get the local date and time of a Schneider M580. How can I get the day of week (integer from 1 to 7 representing monday to sunday)? I know about %SW49, but this gives the UTC day of week and I want the local day of week.

I'm using UnityPro v8.0

Thanks.
 
Hmm, M580 uses UTC time on RTC

Can you just adjust PLC time to local time (is there time sync from internet or is PLC clock adjusted only from laptop/with Unity program at online? (if RTC clock don't get sync elsewhere then easiset way should be adjust clock now to locat time RTC=UDT)


How many hours from UTC?


Brute method, use compare with system word %49 and local time?


UCT time Monday 2:00, SW49=1 and local time something 21 (sunday) UCT and local time difference 2 hours.

=> SW49=1 , UCT 00.00 and local time 22 => write weekday to another variable 7 (sunday)
=> SW49=1 , UCT 01.00 and local time 23 => write weekday =7
=> SW49=1 , UCT 02.00 local time 00 => write weekday =1

=>SW49=2 , UCT 00.00 and local time 22 => weekday =1
...
And same for all other weekdays.


Another method could be to make one shot pulse at midnight (local time) and count up on integer on midnight (counter 1..7)

But then you should have counter/weekday also adjustable from HMI/Scada if weekday goes to wrong day somehow or if you adjust clock.
 
Last edited:

Similar Topics

Hello all, I am wanting to update the system clock via NTP in the M580/M340. I'm aware that we are able to connect to a NTP in the controller...
Replies
4
Views
129
Looking for some advice on a project. The controller is a BMEP584040. There is a RIO ring with several drops with Quantum I/O. On this ring...
Replies
12
Views
994
Hi, Does anyone know if programming a Modicon M580 is basically the same format as an M340? Also do they use the same software package? Thanks...
Replies
2
Views
1,777
Hi Folks, We have this M580's configured as hotstandby and is curious if it is possible to monitor the modules on the remote racks. Unity pro...
Replies
1
Views
1,586
Hello, Wondering if anyone else out there has experienced issue with Scan Time on H58-6040 m580 processor. These controllers have a periodic...
Replies
3
Views
3,036
Back
Top Bottom