SLC 5/03 Date and Time

I have an SLC 5/03 too! I'm currently in the process of replacing it for an S7-1500 after having a few problems with it.


If the onboard clock isn't reliable, you can get standalone time-of-day relays like this:
https://uk.rs-online.com/web/p/products/8966891/


I've fitted a similar one that kills power to a heat plate over the weekend when production stops.

If this is more accurate than the SLC clock, then use something like this and a DI to set your SLC time.
 
If this is more accurate than the SLC clock, then use something like this and a DI to set your SLC time.

That is probably still the best approach, even if an external CIP client sets the bit that causes the system to start the warm up process at 4am.

That said, it only takes a couple of rungs to update the RTC from a CIP client, and if that client is a PC that keeps its clock synchronized from an NTP server, then it might solve that first half of OP's question.

With that in mind, the attached .ZIP archive comprises the following files:

  • misc_calendar_clock.RSS
    • Implements read from and write to RTC
      • Triggered by two low bits of element at offset 12 of an integer file (e.g. N101:12/0 and N101:12/1)
      • RTC values CPWed from RTC to Nxxx:6 - Nxxx:11
      • Values CPWed from Nxxx:0 - Nxxx:5 to RTC to update (write to) RTC
      • Configured for MicroLogix 1100
        • Manual says RTC is read-only, but it works?
      • SLC does not have RTC Function File
        • Use S-registers S:37 - S:42 instead
          • I.e. CPW Source and Target would be #S:37 instead of #RTC:0.YR
            • Assuming CPW/COP works with S registers
  • misc_calendar_clock.PDF
    • Printout of .RSS above
  • slc_adjust_time.py
    • Python 3 script to interface via CIP with .RSS above to synchronize PLC RTC to OS clock where script is running.
      • E.g. this has been tested and works in the Windows System for Linux (WSL) environment under Windows 10
      • I assume it would also work in a native Windows 10/Python 3 environment
      • It uses pycomm3 cf. this link(?).
  • slc_adjust_RTC.png
    • Image of the ladder logic
Again, this works as-is for MicroLogix 1100, but I have no SLC devices for testing, so I don't know if it can be made to work there.

All credit goes to the developers of pycomm3 who made this an all but trivial effort (I had a functional prototype in about half an hour), and without whom this would be a far more complex task.

slc_adjust_RTC.png
 
I woke up this morning and realized someone could use this without understanding how it works, and the script could start flipping bits in an unsuspecting N-file and do damage or harm on an existing process.

So I added a fingerprint mechanism, to try to ensure someone does not do that.

I updated the latest iteration in DOWNLOADS here on PLCS.net; but long term will keep in on Github so it is easier to update.

If someone with an SLC would like to test this, I would be willing to help modify the code to make it work.
 
KISS man, just read DI @ 23:00

SSV
NewTime[1] := CurrentTime[1];
NewTime[2] := CurrentTime[2];
NewTime[3] := CurrentTime[3];
NewTime[4] := 23;
NewTime[5] := 0;
NewTime[6] := 0;
 
Last edited:
SSV? the only SSVs in the 1747-rm001 manual are [process variable] (5), [class variable] (1), and [address various] (1).

There are two parts to this thread: (1) do something at 4am; (2) measure 4am accurately.
 

Similar Topics

I was online a SLC5/04 yesterday and one thing I did was go to processor properties and set the date and time to get the PLC clock current. It...
Replies
4
Views
724
Hi, I have just flashed an SLC5/05 Cat No. 1747-L551 FRN8 with the latest available firmware from Rockwell using ControlFlash and now the CPU is...
Replies
4
Views
1,765
Hi, all We have several machines using SLC, and we find the spare parts are more and more difficult to buy. But my boss refused to upgrade the...
Replies
11
Views
3,945
Hello all, What is the best to sync time and date between Cimplicity and SLC 5/05. There is an option to run a script in the background to...
Replies
0
Views
2,454
Hello all! I'm new to this forum and have a couple of questions that have been bugging me for about a year now. Maybe someone here can help me...
Replies
0
Views
2,123
Back
Top Bottom