what adjustment must i make?

walters

Member
Join Date
Feb 2005
Location
reusel
Posts
185
this is my program:

CALL "BLKMOV"
SRCBLK :=#OB1_DATE_TIME
RET_VAL:=#return
DSTBLK :=P#DB10.DBX 0.0 BYTE 8

CALL "READ_CLK"
RET_VAL:=#return1
CDT :=DB1.Date_Time_SPS.Date_Time

L LB 12 //year
L LB 13 //month
L LB 14 //day
L LB 15 //hour
L LB 16 //min
L LB 17 //sec

how must i change this program so i can change the values of year, month, day etc with my TP?
 
walters

As this question is a continuation of the other threads you have started (you could have continued in the original thread rather than start a new one each time, but that is by the by), I assume that what you are trying to acheive is as follows:-

1. Display the date/time on the TP, this being set via the TP
2. If the TP is shut down, you want the TP to retreive the current date/time from the PLC

Is the date/time originally being set from an 'input field' on the TP?
Are you actually displaying the PLC real time clock on the TP or the TP system date and time?

I think the way I would tackle this would be to display the PLC date and time on the TP, which will mean that even if the TP is powered off, when it is restarted it will read the date and time from the PLC and everything is hunky dory!!
But...
If the PLC goes into stop or is powered off, the PLC's real time clock is frozen (it stops!) then upon PLC restart, the PLC uses the saved time to start the clock from. So if the PLC is in stop mode for, say 10 minutes, upon restart the clock will be 10 minutes slow and the TP display will also be 10 minutes slow.
What you need then is to be able to update the PLC real time clock from the TP. For this you would use an input field, set to the correct length for inputting in the date/time format that the PLC can read. This field will point to a DB area set up as Date/time data, which you would then use with SFC0 SET_CLK.

So, to summarise..

Using SFC20, in OB1, you would move OB1_DATE_TIME to a DB set up as previously described in other threads. Remember to convert the clock bytes, that are in BCD, to INT
On the TP, have some output fields set up that point to the DB area where you have stored the various INT from the clock.
Again, on the TP have an input field set up to write to a DB area that will receive the manual time and date input.
In the PLC, using SFC0 SET_CLK you can then update the PLC clock manually from the TP if required. I would have SFC0 controlled by a button that can be pressed on the TP, an 'Enter Data' button.

If (and that's a big IF) I get some time, I will try and write an example for you, including the TP part. But, having said that, please try and have a go at this yourself, you will learn more that way. If you do get stuck, post what you have here and we, that is all of us who use S7's, will try and assist you in anyway we can.

Paul
 

Similar Topics

Hi Friends, I am facing a problem with encoder adjustment in Sew Electric Cylinder CMS71L. encoder using is Sick Hiperface Drive is MOVIDRIVE...
Replies
16
Views
628
Good Evening , I never set up a Altivar 320 Frequency Drive . I must say I never seen a more complicated drive to set up , LOL How do...
Replies
4
Views
2,056
Customer is trying to drive two loop powered LCD display in a 4-20mA loop, one them needs to be backlit, which drops enough voltage to shut the...
Replies
5
Views
1,932
I question about a kinetix 6500, hooked up to a Allen Bradley Control Logix 5572 controller. The current program uses MAM instruction to bring the...
Replies
4
Views
2,343
Is it possible to adjust the time settings for timers while the process is running though the software or app? For example, I want to adjust a...
Replies
3
Views
1,707
Back
Top Bottom