Date_and_Time interface out [Siemens, Step 7]

obi wan

Member
Join Date
Aug 2009
Location
Ro
Posts
13
hi,

Siemens, Step 7

I create a new function (a counter with out values days, hours, minute, seconds) and I want to have also to out interface a value 'Date_and_Time' to know when the counter was reset.

But is not possible to use a value 'Date_and_Time' in interface out of a function.

Have somebody a ideea; its a trick for this or is not possible and I must find a other solution.

bye
 
You can use date_and_time as an output from an FC - can you be more specific about what processing you want to do?

dtdt.jpg
 
Yes, you right it is possible to add in interface Date_and_Time value; I can not get out the desired value, for example the current date / time.

If you use a value of temp Date_and_Time [interface] in function "Read_CLK" - this is possible.

bye

dtDateTime.jpg
 
Move to a Temp first then Block move to your OUT

//----------------------------------
// Read Time
//----------------------------------
CALL "READ_CLK" // SFC 1
RET_VAL:=#iResultSfc1
CDT :=#dtReturned_time // TEMP type Date_And_Time


CALL "BLKMOV" // SFC20
SRCBLK :=#dtReturned_time
RET_VAL:=#iResultSfc20
DSTBLK :=#dtTime_and_Date //OUT type Date_And_Time
 

Similar Topics

I've been using Step7 V5.4 for a while now and I keep hitting a problem in the block editor that I never had with V5.2 If I remove a parameter...
Replies
2
Views
4,220
So we have a few associates that like to write the date in the file name when saving the program to back it up. We back up the programs every...
Replies
12
Views
185
Hello Everyone, I want to upgrade the firmware of Powerflex 40 from 5.001 to 6.002 can anyone tell me how can I do that?
Replies
0
Views
75
Hello, I'm hoping someone can help me with understanding how to set/change these data types. We recently swapped from Invertek to AB drives...
Replies
1
Views
137
From the Red Lion website, after some customer enquiries in the last week or so... Rev. March 25, 2024 [18:30] Just thought it might help a...
Replies
9
Views
319
Back
Top Bottom