What is the modified Julian date and how do you calculate it with STEP 7 V5.x?
The Julian date is a decimal, sequential numbering of the date. The advantage of this format is the improved calculability of time periods between two points in time which lie far apart (astronomy). The Julian date is coupled with the coordinated world time (UTC) so that for international production the time of manufacture of a part can be given independent of the time zones (automotive industry, for example).
Unlike the Julian date, the day in the Modified Julian Date (MJD) does not change at 12:00 GMT UTC, but at 0:00 GMT UTC. Furthermore, the MJD is a smaller clearer number (MJD = JD - 2,400,000.5).
Descriptions of the Julian Date and Modified Julian Date are available in the internet.
- Download and unpack the STEP 7 project (download) "STEP_7_Julianischer_Kalender_PROJ.zip".
- At the input "diff_UTC" of FC1 you parameterize the current difference between local time and UTC.
- Download the program to your S7-300/S7-400 controller.
- Transfer the time from the PG/PC to the CPU of your S7 controller if it is not up to date.
- The calculated Julian Date is at the output "mod_jul_date" of FC1. You can see this parameter in a tag table in the "floating-point" format.
The attached download includes the archived STEP 7 V5.5 project including the German and English comments. Copy the "STEP_7_Julianischer_Kalender_PROJ.zip" file into a separate folder and then start the file with a double-click. The STEP 7 project is now unpacked with all the associated subdirectories. You can then use STEP 7 V5.5 to open and process the extracted project.
- The difference to UTC is specified in the TIME data type. In Germany, for example, it is plus two hours during the summer time (Central European Summer Time (CEST)) and plus one hour during the winter time (Central European Time (CET)).
- The very large floating-point number gives a resolution of approx. 5 minutes. Since only 6 figures are displayed of the floating-point values in the tag table a resolution of approx. 15 minutes is visible here.
The download in this FAQ was created with STEP 7 V5.5 SP3.