How to Read the SmartServer Current Time in a FPM? (KB1069)

There are several ways to access the SmartServer Real Time Clock from a (Free Programmable Module) FPM.


The SmartServer Real Time Clock can be accessed by adding "#include <time.h>" in your FPM and use the C library time function to get the current time. 


#include <time.h>

time_t now;     
now = time(NULL);
printf("\nCurrent time is %s", ctime(&now));



The SmartServer i.LON App (Internal) Real-time Clock Functional Block (FB) nvoRtTimeDate NV provides the current SmartServer time.  nvoRtTimeDate (default: updated every 10 seconds) is updated at a rate specified by the nciRtUpdateRate CP.  This means the nvoRtTimeDate time by default can drift by up to 10 seconds so using the time.h function provides more accurate values.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk