
adccommunitymod (AutomationDirect) asked a question.
Created Date: April 06,2009
Created By: johnR
**** 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.****
Hey All, another newbie question........ How do I set the time in an 06 PLC? I 've found reference to it in the DirectSoft help section, but seems rather vague. I see that the hour is in V7770, and the minutes is in V7767, but I don't understand what this is telling me....... "Help " states the following; "The Time instruction can be used to set the time (24 hour clock) in the CPU. The instruction requires two consecutive V memory locations (Vaaa) which are used to set the time. If the values in the specified locations are not valid, the time will not be set. The current time can be read from memory locations V7747 and V7766-V7770. " And it shows an example if the "time " box with V2000 in it. What does this mean??? I thought this could have been as simple as using the "change value " command, but apparently not. What am I missing here?? Thanks, JohnR
Created Date: April 06,2009
Created by: bcarlton
No, you can't directly set the time/date by writing to the register where you read them. The instruction shows that you must set up two adjacent registers (they use V2000 and V2001). The first one will hold the 'minutes ' as a BCD number in its upper two numbers and the 'seconds ' in the lower two. The upper register holds the hours (24 hour clock in BCD) in the lower two numbers and zeroes in the upper two. Theire example shows a value of 73000 (their LDD box instruction in my manual is missing one zero).
Once the registers are set up the TIME instruction is called with the location (V2000 in this example) of the lower register. The TIME command takes care of setting the real time clock function of the PLC as well as updating the time registers.
A similar function allows you to manipulate the DATE.
Created Date: April 06,2009
Created by: johnR
bcarlton- thanks for the quick response....
you must have a better "help " reference than me, 'cause I see nothing close to what you 've said.
sorry to be a pest, but could you give me an example?
JohnR
Created Date: April 06,2009
Created by: bcarlton
Get the DL06 manual (free) at http://web6.automationdirect.com/static/manuals/d006userm/d006userm.html
It has much more specific help than that which is within the DirectSOFT program. Actually I encourage anyone who will use the PLC extensively to buy the actual manual.
On checking the current online manual I see that my remark from the earlier post
Their example shows a value of 73000 (their LDD box instruction in my manual is missing one zero).
is now not true. They have corrected it.
Created Date: April 06,2009
Created by: johnR
Okay, thanks.....
Got the manual......
Found the example......
That makes more sense......
JohnR
Created Date: April 07,2009
Created by: DesertRat
Here's a simpler way to set the time in the PLC. In your DirectSoft program click on PLC, Setup, Calendar, Get PC Time, then Write to PLC. In order for your PLC to retain the time and date after a power cycle, you'll need to install the battery.
Hope this helps.
Created Date: April 07,2009
Created by: bcarlton
DesertRat - you may have good advice there. I assumed (and now looking at his first post it was only an assumption) that he knew how to set it from within DirectSoft and was asking about setting it from within the ladder.
JohnR may wish to let us know which way he meant but thats just to satisfy curiosity.
Created Date: April 07,2009
Created by: Tubecut
I second the suggestion in getting the hardcopy manual. Mine is starting to fall apart because it is used a lot.
My 2 cents :D
Created Date: April 07,2009
Created by: bcarlton
Not only get the hardcopy - actually read it. Don't just have it for times you think you many need something. Read everything - well you don't have to read every entry in the C and X and Y bit to word tables - but everything else. Read EVERY instruction, even if you don't think you'll ever have a need for it. Read the table of the system V registers and the system bits (SPxx). Read about setting up the high speed counter stuff for various modes. Read the networking stuff.
In the second section read about DRUM instructions, Stage logic, and PID loops
Because sure enough an application will come up with something weird and a light will go on over your head and you'll think to yourself 'I think the DL06 can do that. Let me check. '
Created Date: April 08,2009
Created by: DesertRat
Because sure enough an application will come up with something weird and a light will go on over your head and you'll think to yourself 'I think the DL06 can do that. Let me check. '
I agree, been there done that. :)
Created Date: April 06,2009
Created by: johnR
Hey All, another newbie question........
How do I set the time in an 06 PLC?
I 've found reference to it in the DirectSoft help section, but seems rather vague.
I see that the hour is in V7770, and the minutes is in V7767, but I don't understand what this is telling me.......
"Help " states the following;
"The Time instruction can be used to set the time (24 hour clock) in the CPU. The instruction requires two consecutive V memory locations (Vaaa) which are used to set the time. If the values in the specified locations are not valid, the time will not be set. The current time can be read from memory locations V7747 and V7766-V7770. "
And it shows an example if the "time " box with V2000 in it.
What does this mean???
I thought this could have been as simple as using the "change value " command, but apparently not.
What am I missing here??
Thanks, JohnR