Host Engineering Forum
General Category => DirectSOFT => Topic started by: PStiles on August 31, 2010, 07:43:26 AM
-
Is there a example somewhere let I can download that show how to turn a output on and off at certian times of the day and on certain days of the week.
What I would like to do is turn a output off Monday thru Friday between the hours of 8:00 am and 4:00 pm. The out put would be on all other times.
CPU is a 440
-
So you want to turn the output on if:
It is Saturday
OR
It is Sunday
OR
It is before 8 AM
OR
It is after 4 PM
Now, can you turn that into a rung using the day/time information?
-
Yes this is what I am looking to do. Is there a example that I may look at, not sure how to start.
-
In your previous thread you ended up creating a rung. You will create 1 rung.
You will use the day and time information in the PLC. Do you know where that is?
You will use compare functions. Are you confused about those?
What is the specific problem?
-
I do not understand how to access the time and day info in the PLC. Is there documentation that shows an example that I can use to extrapolate this programming from?
-
Do you have the manual for the CPU, either in printed or PDF form? Do you know the V registers where the time/date information is stored?
-
Here is a test for Sunday
-
Thanks for the start. I have the day of week working, but the time of day does not. Below is my program.
PLC 440
// Rung 1
// Address 0
STRE V7771 K2
ANDN V7770 K8
AND V7770 K16
OUT Y40
// Rung 2
// Address 7
END
// Rung 3
// Address 8
-
Say the instructions out loud (at least it helps me)
STRE V7771 K2 - If it's Monday
ANDN V7770 K8 - And it's earlier than 8 AM
AND V7770 K16 - AND its later than 4 PM (huh?)
Do you know how to make an OR operation in ladder logic?
-
I do understand and and or logic. The reason I tried it the way in my program is I am asking if it is Monday between 08:00 am and 4:00 pm turn Y40 off. If it is after 4:00 pm or before 08:00 am, turn Y40 on.
-
The day of the week and the time less then 08:00 am works. The issue is with the greater then 4:00 part, any suggestions?
-
After reading the manual there are no examples of the or function. While I understand the concept, I do not understand how to make on. Could you providea example?
-
Thanks for your help. I figured it out.