There are several ways to access the SmartServer Real Time Clock from a (Free Programmable Module) FPM.
Recommended:
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));
Alternative:
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.
Comments