printer clock / weird gcode timestamps fix

Discussions about ideaMaker and other printing software.
theRenegade
Posts: 60
Joined: Tue May 03, 2016 11:58 am

printer clock / weird gcode timestamps fix

Postby theRenegade » Wed May 25, 2016 8:29 pm

Update: No need for TZ setting (see below). Don't edit /etc/profile, instead use actual firmware (mine was too old) and adjust timezone in printer setup.


Recently there was a discussion in a chat about the printers weird clock settings and I told 'just enable the time synch features and it's done'. I received some answers about difficulties with this and that would not work for every user, but maybe that's just related to translations issues or the man in the middle. :)

Here is how to setup automatic time synch for the printer to have the gcode files uploaded with their correct timestamps.
The Touchscreen and remote ideaMaker connection still show the timestamp in UTC but this could be fixed by a correct timezone setting for the process.

Disclaimer: It works for me and even that's not guaranteed in any way. Do everything you do at own risk!


Use ssh to connect to your printer and modify /etc/default/ntpdate, this is how mine looks after the changes:

—————————————
# Configuration script used by ntpdate-sync script

NTPSERVERS="ptbtime1.ptb.de"

# Set to "yes" to write time to hardware clock on success
UPDATE_HWCLOCK="yes"
————————————

I use a German official NTP server with atomic clock time, use your favorite NTP Server (or Servers, pool.ntp.org for example).
The automatic time synching is already in roots crontab (runs every 30 minutes), just the configuration above is missing.


outdated, caused by old firmware
-----
If you leave it like this, you will get UTC time set for the printers system and hardware clock, I wanted to have it Central European time. The timezone package seems missing that's why I set the TZ variable in /etc/profile like this:

TZ=CET-1CEST,M3.5.0,M10.5.0/3
export TZ

I added this to the bottom of the profile.
-----


Note to R3D: The printer could be factory configured for time synch to pool.ntp.org servers.
Last edited by theRenegade on Thu May 26, 2016 6:38 am, edited 1 time in total.

User avatar
dhylands
Posts: 119
Joined: Mon Mar 21, 2016 9:11 pm

Re: printer clock / weird gcode timestamps fix

Postby dhylands » Wed May 25, 2016 9:55 pm

I also covered a portion of this (setting the timezone) in a slightly different manner here:
viewtopic.php?f=3&t=20

I like the idea of syncing with ntp.

theRenegade
Posts: 60
Joined: Tue May 03, 2016 11:58 am

Re: printer clock / weird gcode timestamps fix

Postby theRenegade » Wed May 25, 2016 10:21 pm

I wasn't aware of this post, I searched the forum for 'clock'...

I also did not want to mix up the printers system with files from other distributions / architectures wich could cause errors, that's why I did it with what's available on the R3D distribution.

Does your setting via /etc/localtime let the GUI / ideaMaker also show correct timezone data?
If so, R3D should just provide the tzdata package as stated before and things can be fixed easily.

User avatar
dhylands
Posts: 119
Joined: Mon Mar 21, 2016 9:11 pm

Re: printer clock / weird gcode timestamps fix

Postby dhylands » Wed May 25, 2016 10:56 pm

Actually, in my firmware (which is version 0.6.5.3247), under settings (the gear in the top right) Other, I was able to set the timezone, date and time.

The UI isn't at all intuitive. I typed va and then a list of timezones which matched showed up (you have to type at least 2 letters). In my case, Vancouver, Pacific was the one I chose.

It sets /etc/localtime to be a symlink into the proper tzdata database. So after doing that, my files looked like:
root@raise3d:~# ls -l /etc/localtime
lrwxrwxrwx 1 root root 49 May 23 16:53 /etc/localtime -> /opt/Raise3D/resources/zoneinfo/America/Vancouver

This site has a list of the time zone cities: https://en.wikipedia.org/wiki/List_of_t ... time_zones (note that it shows the timezone first, then the city name).

theRenegade
Posts: 60
Joined: Tue May 03, 2016 11:58 am

Re: printer clock / weird gcode timestamps fix

Postby theRenegade » Thu May 26, 2016 6:42 am

My firmware was 0.6.1.somewhat... (received it last week like that).
Actual firmware has tzdata installed and setting the TZ in the printer together with the automatic time synch does the job.


Return to “Software”

Who is online

Users browsing this forum: Bing [Bot], SchMax and 2 guests