I am trying to use this "CurTimeEx" function block to get the controller's date, time, and day of the week but it just return the default date, time and the day of the week. (1970-01-01, 00:00s, 0)
I want to know the day of the week when i give the date and time to the CurTimeEx function block. It seem doesn't work.....
I also have try the "CurTime" i am not sure, Is it works as i don't know what is return data mean for... the data type is "SysTime64".
perhaps you can advise me how to use the CurTimeEx function block.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe it's platform dependent, but for my target CurTimeEx just works without needing to do anything else. You need to include SysLibTime.lib and that's it. And BTW, it doesn't seem to work in simulation mode.
But what do you mean by "when I give the date and time to the CurTimeEx" ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hcchin hat geschrieben:
I am trying to use this "CurTimeEx" function block to get the controller's date, time, and day of the week but it just return the default date, time and the day of the week. (1970-01-01, 00:00s, 0)
On my WAGO, I noticed that first, the clock is not updated. In the web interface, the option 'Clock' always shows the beginning's unix time i.e. 1970-01-01. After a clock update, the clock has been functionnal.
So try to update clock with the Web interface.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to use this "CurTimeEx" function block to get the controller's date, time, and day of the week but it just return the default date, time and the day of the week. (1970-01-01, 00:00s, 0)
I want to know the day of the week when i give the date and time to the CurTimeEx function block. It seem doesn't work.....
I also have try the "CurTime" i am not sure, Is it works as i don't know what is return data mean for... the data type is "SysTime64".
perhaps you can advise me how to use the CurTimeEx function block.
go to w www.oscat.de w
you will find a day_of_week function.
Maybe it's platform dependent, but for my target CurTimeEx just works without needing to do anything else. You need to include SysLibTime.lib and that's it. And BTW, it doesn't seem to work in simulation mode.
But what do you mean by "when I give the date and time to the CurTimeEx" ?
Hi,
Try this sample project I crafted out for you.
U will be required to change the target settings.
You can investigate further in my custom made program as per your requirements.
Hope this helps.
Regards,
Rahul.
Sample.rar [22.02 KiB]
On my WAGO, I noticed that first, the clock is not updated. In the web interface, the option 'Clock' always shows the beginning's unix time i.e. 1970-01-01. After a clock update, the clock has been functionnal.
So try to update clock with the Web interface.