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!
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!