# Wago RTC 750-640



## JorTec (14 November 2016)

Hello all,

I'm a newbie at PLC (SPS) programming (I have experience in C programming). I can speak and read German, but writing is more difficult for me. So German help is also welcome!

I have a setup with the Wago 750-842 controller and Wago 750-640 RTC. In the future I will probably switch to the 750-881 since this has an integrated RTC which can be controlled with the SysLibRTC (if I am correct). This setup is also cheaper. But for now I will continue with the 750-640.
I am trying to control the RTC using the RTC_640_01.lib. I'm getting errors when I try several ways. Since I am unable to figure this out and can't find the information, I would like your help. This is what I've done so far:

VAR
    RtcService: RTC_640;
    RtcManager : RTC_JOB_MANAGER;
END_VAR

Attempt 1:
RtcService.SERVICE := GET_TIME_OF_DAY; (* Set service*)
RtcService.StartService := TRUE;

Result: Error 4062. No access to VAR_IN_OUT Parameter StartService.
This error will also be relevent when I try to read and write data from and to the RTC.

I've tried more things, but don't think they are relevant. Maybe relevent:
CodeSys V2.3
Structured Text

What I would like to achieve is to read the time until the second changes. So every second I want to perform an action. Also when the hour changes (e.g. 16:59:59h to 17:00:00h). I also want to be able to write the time, but I expect I can figure it out once I'm able to read the time. 

Thank you in advance!


SOLVED!
I've found the solution for addressing the VAR_IN_OUT:

VAR
RtcServiceBusy :  BOOL;
RtcInputData: typInOut_640;
RtcOutputData: typInOut_640;
RtcTable : typRTC_640;
END_VAR


RtcService(StartService:=RtcServiceBusy, INPUT_640:=RtcInputData, OUTPUT_640:=RtcOutputData, RTC_Table_640:=RtcTable);


----------



## AlexMun (15 Mai 2020)

*Wago rtc 750-640*

Hi JorTec, could you kingly help me with the same issue ?

I connected an external DCF77 antenna from ALTEL (DCF-77-AT-513) to the module but i cannot see the green led blinking.
Even if I'm receiving a wrong signal, the led should blink.

Maybe something in the configuration of the module.

Do you have a working example to share with me ?
thanks so much






JorTec schrieb:


> Hello all,
> 
> I'm a newbie at PLC (SPS) programming (I have experience in C programming). I can speak and read German, but writing is more difficult for me. So German help is also welcome!
> 
> ...


----------



## wollvieh (16 Mai 2020)

Hi, in my opinion the DCF77 Module Outputs hast an open collector , so you need an pullup resistor for that. I would suggest an 1kOhm resistor to +24Volt.


----------



## AlexMun (16 Mai 2020)

Hi, thanks for the relpy. From the datasheet the DCF77 module (ALTEL (DCF-77-AT-513)) has a PNP output. So I think i need a pull down resistor to produce the logic 0 when the PNP transistor goes off.
What do you think ? How many ohms will be the pull down resistor ?
Thansk for fast feedback.
very appreciated.


----------



## AlexMun (17 Mai 2020)

Last update ...
Thanks to wollvieh, I put a pull down resistor of 1K ... now the led blink. i tseems that the signal is not correctly received or the DCF77 module ned to be configured.
Any Idea on how to setthe receiver to decode a DC77 signal (HIG-Positive) I saw in the manual of wago 750-640 and in the library manual of RTC_640_1.lib that I need to configura the antenna.
Anyone that can help me with few lines of CODESYS ? thanks in advance
best regards


----------



## wollvieh (17 Mai 2020)

How about using a library from the Codesys Store for free...
https://store.codesys.com/dcf77-decoder.html

;-)


----------



## AlexMun (18 Mai 2020)

But this library is not using the WAGO 750-640 module, I need to use and setup correctly this module.
Is there any example I can use with WAGO RTC module ?


----------



## dingo (18 Mai 2020)

did you find that already?
There is a manual under application instructions:

https://www.wago.com/de/io-systeme/real-time-clock-modul/p/750-640


----------

