S7: how to copy data of type DATE_AND_TIME

hotchili

Member
Join Date
Jun 2005
Location
Wroclaw
Posts
2
Hello Everyone

In some date block I have DATE_AND_TIME data. I would like to copy it to another data block. How can I do it? Should I use SFC20? Could anybody write an example?

Thank you in advance, best regards,
Mac
 
The DATE_AND_TIME format is 8 Bytes long, if you know the absolute address of the source, then the easyest way is probably just to do two DWORD load and transfers:

Code:
L DB1.DBD10
T DB2.DBD20
L DB1.DBD14
T DB2.DBD24
 
As RMA has stated, load/transfers are the way to go in this example. However, shown below is the syntax for using SFC20 to do the same job so you will know what to do if you have a bigger area to transfer in the future.

dtsfc201.JPG
 
Last edited:

Similar Topics

This feels like a simple, elementary question, but I am a Siemens novice and know there are experts here. My S7-1500 project (TIA Portal v17) has...
Replies
10
Views
2,706
Hi everyone! I am working on a Siemens plc (1200/1500), and I have two instruction that i have to perform. A) data structure (40 bools, 40...
Replies
3
Views
2,455
Hello! I am completely new to PLCs, so I apologize in advance if this is a dumb question. I have a device that sends out its data as a number of...
Replies
5
Views
2,137
Hello, I am new to Siemens' Simotion Scout software. I looked for a thread that might include this but...I have a CU320 and an existing project...
Replies
9
Views
2,639
In a few months I'll be decommissioning a PLC-3. We have a DOS VM with the AB6200 software that can apparently go online with this beast. I say...
Replies
1
Views
1,459
Back
Top Bottom