
adccommunitymod (AutomationDirect) asked a question.
Changing hours on DL260 clock logic
Created Date: November 11,2009
Created By: cl323805
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
Hi I am a newbie with the plc business and I have what seems to be a simple problem. I can't seem to figure out how to change the hours in the clock on my DL260 CPU. I have tried an Ibox to add an hour to the V-mem location for hours and one for subtracting hours; however, these ideas did not work. I am unsure on the proper logic to use in this situation. Thank you for your time!
Created Date: November 11,2009
Created by: KPrice
Yes, this is a little tricky. The V-memory V7766 (second), V7767 (minute), and V7770 (hour) are read-only. You must use the TIME instruction. You must also use some logic to place the second, minute, and hour into the correct format in a double-word. See the TIME instruction. Hope this helps.
Created Date: November 12,2009
Created by: cl323805
Ok I believe I am on the same page with you. That was very helpful. The DL205 (5-176) user manual has a good example of how to perform this TIME action; however, they are using a constant 'K ' value in the LDD box and I would like to use a v-memory location here that can have values input from a C-more touch panel numeric entry. I am not sure of the logic i need to add in order to insure the proper format is input in the LDD box.
Thanks
Created Date: November 12,2009
Created by: Shimmy
I'm not at a computer that I can open this program but I knew there was a example for adjusting PLC time for daylight savings time. Check this out and see if it helps.
http://support.automationdirect.com/examples/DL205/EP-MISC-001_205.zip
Created Date: November 12,2009
Created by: KPrice
cl323805, the program Shimmy suggests is good for seeing how you can use the time (and date) values to trigger events in the PLC.
As far as manipulating your hour, minute, and second V-memory data into the double-word TIME format:
Let:
V1500 = hour from C-more numeric entry (BCD)
V1501 = minute from C-more numeric entry (BCD)
V1502 = second from C-more numeric entry (BCD)
C10 = C-more PB (momentary on) to enter new time
V1520/V1521 double-word formatted for TIME instruction
(we usually omit the adjustment capability for seconds)
Show time on C-more so operator can verify if change took place.
--|rising edge C10|--
LD V1501
SHFL K8
ADD V1502
OUT V1520
LD V1500
OUT V1521
--|falling edge C10|--
TIME V1520
Hope this helps.
Created Date: November 13,2009
Created by: cl323805
Thanks everyone...all of this information was quite helpful!!
Created Date: November 11,2009
Created by: cl323805
Hi I am a newbie with the plc business and I have what seems to be a simple problem. I can't seem to figure out how to change the hours in the clock on my DL260 CPU. I have tried an Ibox to add an hour to the V-mem location for hours and one for subtracting hours; however, these ideas did not work. I am unsure on the proper logic to use in this situation.
Thank you for your time!