![]() |
Welcome to the AutomationDirect Customer Forums.
These
forums are intended as a place for AutomationDirect customers to help one another,
share information, and share ideas.
The forums are not routinely monitored by AutomationDirect
Technical Support staff. While staff members may answer questions occasionally,
for a prompt response to a problem please contact Technical Support directly
at: 1(800) 633-0405 or (770) 844-4200 or e-mail
Tech Support.
|
#1
|
|||
|
|||
|
Help with this program
1. Program a single timer (TMR) such that:
a. when switch 1 is on, there is a 1 sec delay, then LED 6 turns ON b. when switch 2 is on, there is a 3 sec delay, then LED 6 turns ON c. when switch 3 is on, there is a 5 sec delay, then LED 6 turns ON 2. Program two Shift Registers(SR) and one timer(TMR) enabled by switch 4 a. The 1st SR will turn the lights ON with the following timing (REMEMBER YOU CAN ONLY USE 1 TMR for part 2): i. LED 1, immediately ii. LED 2, after 2 sec. iii. LED 3, after 4 sec. iv. LED 4, after 3 sec. b. Pause for 4 seconds, then turn the lights off using the second SR in reverse order (4, 3, 2, 1) with a 4 sec pause between the lights turning off, pause one second and go forward again. (REMEMBER YOU CAN ONLY USE 1 TMR FOR BOTH SR’s in part 2) c. The process should work indefinitely. |
|
#2
|
|||
|
|||
|
shawn,
A couple of questions Quote:
Concerning the shift register part of the program Do you have to use two shift registers? Can you use just one? Do you have to use a timer at all? When you were just a little tyke. Did the neighbor girl next door ever take you behind the woodshed and tell you "Ill show you mine if you show me yours first"? Quote:
__________________
Vaughn |
|
#3
|
|||
|
|||
|
I'm with you, up to this point
Quote:
Here is a 64 dollar question. Is there a particular reason you need to use a shift register? A drum would be very simple to implement.
__________________
Vaughn |
|
#4
|
|||
|
|||
|
__________________
Vaughn |
|
#5
|
|||
|
|||
|
Quote:
4 sec pause between the lights turning off, pause one second and go forward again (forward again) a. The 1st SR will turn the lights ON with the following timing (REMEMBER YOU CAN ONLY USE 1 TMR for part 2): i. LED 1, immediately Quote:
![]() ""I'll show you mine if you show me yours first" ![]() I used to answer questions on Yahhoo answers, and it was not all that unusual to see a homework question where someone said they had already worked out the problem themselves but they wanted to see someone elses answer for confirmation, while I usualy ingnored such questions, once in a while I'd sugest they post their answer and then I'd tell them if they got it right, but all that ever got me was a "thumbs down" and nobody ever botherd to show their answer. The funny thing is i decided to Google "1. Program a single timer (TMR) such that:" and guess what was the second item in the search results: http://answers.yahoo.com/question/index?qid=20091103142944AA1vseC" Unfoutunatly I not familaiar with Directsoft (and on the Yahoo post he said DL06), I don't even know if there is any standard for for a PLC "psudo code". Still, here is one Idea I had for the first part: Quote:
(if your timers count in say intervals of 100ms multiply my constants by 10, if 10ms, then * 100) if S1 and timer1 current value = 1 -> set LED6 if S2 and timer1 current vlaue = 3 -> set LED6 if S3 and timer1 -> set LED6 (actualy the S3 is redundant here, if the timer is running and the LED is not on by now, S3 must be on) if (not S1) and (not S2) and (not S3) -> reset LED6 (and timer1 if turning off it's enabling inputs doesn't reset it, i.e. a maintained timer) In this case if more than one switch is closed the LED will turn on at the shortest interval selected. There is one interesting "feature" if S3 is turned on, then after more than 1 and less than 5 seconds S1 is turned on and S3 turned off (in that order) the LED will not come on even though a switch is on !, using "equals or greater than" or eliminating the "redundant" S3 in the the next to last rung would eliminate that, but that wouldn't be as much fun. Since the details coding a shift register could be implementation dependant I'm not going to try to tackle that one in any detail, but it seems to me that one would have to program the one allowed timer as a 1 second pulse generator that clocks the SR and get the other time intervals by where you get the data out of the SR. It seems to me too that it would be simpler to use one shift register (or a drum), but again, I think this is home work not real life. |
|
#6
|
|||
|
|||
|
I was just trying to add some humor instead of of ranting about homework.
Quote:
If he were to respond I will try to lead him in the right direction. But I will not give him the answer outright.
__________________
Vaughn |
|
#7
|
|||
|
|||
|
Well, I was usually the one that suggested the "show me scenario "
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|