Você está na página 1de 2

show the entry list

STEP 7 -- Creating S7 programs -- Editing date, time and counters


Time synchronization - Time synchronization in the automation environment
How can you set the time of an S7 controller from WinCC?
Which functions are available in STEP 7 V5.5 and in TIA Portal for processing the data types DT and DTL?
Which STEP 7 standard blocks are available for time stamping and time-of-day synchronization?
How is the runtime of a terminal device (pump, for example) calculated?
What is the modified Julian date and how can you calculate it with STEP 7?
Tips and tricks for reading and comparing date, time and counters
How do you convert an available seconds value into days, hours, minutes and seconds? How do you convert an available seconds value into days, hours, minutes and seconds? How do you convert an available seconds value into days, hours, minutes and seconds? How do you convert an available seconds value into days, hours, minutes and seconds?
Information about the topic of "Editing date and time"
How can you measure the time?
How do you program a timer that retains the time value at STOP and counts on starting at the stored value?
How can you set the time of an S7-300 CPU via Industrial Ethernet and via MPI?
How do you load the IEC standard functions FC3, FC6, FC7 and FC8 from the STEP 7 IEC library?
How can you use IEC functions to read and input the date and time of the CPU?
How can you synchronize CPU clocks with each other?
How can you count forwards and backwards in a bandwidth between -2147483648 and +2147483647?
How can you read out the date and time with SFC1 (READ_CLK) and input them with SFC0 (SET_CLK)?
How can you create a timer for the "S7" without using an "S7 Timer"?
How do you convert an available seconds value into days, hours, minutes and seconds?
Display part number
Instructions: Instructions: Instructions: Instructions:
The following STEP 7 program can be used to convert an available seconds value into days, hours,
minutes and seconds and output the results accordingly.
Fig. 01
Table 01 shows the input and output parameters with the data types and value ranges of function
block FB1. The seconds value is input via the input parameter "value" and output of the converted
value is via the output parameters "days", "hours", "min", "sec", or with the parameter
"CounterString" (format: day:hours:minutes:seconds).
Input parameter Input parameter Input parameter Input parameter Type Type Type Type Description Description Description Description Range Range Range Range
value DINT Input value that gives the time in seconds -2147483648,..,
+2147483647
Pgina 1 de 2 Siemens Industry Online Support - Automation Service, Automation Support, Simat...
22/0/201 !ttp"//support.automation.siemens.com/##/llisapi.dll/$%%21&'unc(ll)o*+Id(2%%%...
Output parameter Output parameter Output parameter Output parameter Type Type Type Type Description Description Description Description Range Range Range Range
days INT Number of days calculated -32768,...,+32767
hours INT Number of hours calculated 0,...,24
min INT Number of minutes calculated 0,...,60
sec INT Number of seconds calculated 0,...,60
CounterString STRING Formatted output of the time calculated
Example: 19:23:54:11 (dd:hh:mm:ss)
Maximum 99 days Maximum 99 days Maximum 99 days Maximum 99 days
Table 01: Description of parameters
The attached download contains an archived STEP 7 project with the STEP 7 program described
above. Block FB1 containing German and English comments is called in OB1.
Copy the "Sec_Chan.zip" file into a separate directory and unpack the file. You can then use the
SIMATIC Manager to open and process the extracted project.
Sec_Chan.zip ( 37 KB )
Entry ID: Entry ID: Entry ID: Entry ID:874721 Date: Date: Date: Date:2009-08-13
This entry is available in the following languages:
german french italian spanish chinese
I regard this article.... I regard this article.... I regard this article.... I regard this article.... as helpful as not helpful
Copy link Suggestion for the entry Send to a friend
Print
Siemens AG 2014 - Corporate Information - Privacy Policy - Terms of Use
Pgina 2 de 2 Siemens Industry Online Support - Automation Service, Automation Support, Simat...
22/0/201 !ttp"//support.automation.siemens.com/##/llisapi.dll/$%%21&'unc(ll)o*+Id(2%%%...

Você também pode gostar