Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria
How to change RTC time of Touchberry or industrial Raspberry PLC
Raspberry Pi based PLC family and TouchBerry Pi family devices have an RTC chip called DS3231. The RTC (Real-Time-Clock) is used to set the time of the devices in the most accurate mode and it does not change the time even by powering on and off the device or with other changes it may receive.
The key points you should consider are as follows:
Industrial Raspberry Pi PLC family or Touchberry Panel PC
PLC access: shh. A tutorial on how to access the device via Linux or Windows can be found in the Raspberry Pi PLC controller User Guide.
First, you have to set the time and date of the system and synchronize it with the RTC clock:
sudo date -s 'year_month_day 24format_hour_minute'
sudo date -s '20210308 1151'
After that, you can write it to the RTC chip to save it permanently:
sudo hwclock -w
To finish, if you want to check the RTC time and date, you can read it using this command:
sudo hwclock -r