Question

bprieur

Member
Join Date
Mar 2007
Location
Ottawa
Posts
4
Could someone help with writting the code to energize an output one time (one scan) with the use of a pushbutton...without the help of a one-shot (OSR).

Much appreciated
 
This goes way back! Give this a try.

|---| |------|/|--------( )
| PB B A
|
|---| |-----------------( )
PB B



Hope this will help. Note that order of rungs is important.
 
The key lies in an understanding of the operation of a PLC.
First, a PLC continuously executes its program, evaluating each rung of ladder logic in sequence.
Second, it updates the state of the input signals before executing the program.
You need two rungs. The first rung uses the signal from the pushbutton to turn on an output, but only if the signal from the pushbutton was off during the last scan. The second rung is used to remember the state of the signal from the pushbutton for use during the next execution of the program.

See if you can convert that verbal description into ladder logic.
 
If the pushbutton is depressed by the operator for a second...the plc may have run through the sequence several hundred times before the operator releases the button. The trick here is to only let the ligth (output) blink for a fraction of a second...reproducing the speed of a single scan.

I'm having difficulty writting this code with only using the following statements: Normally open, Normally closed and a output or coil.

I'm trying to do this without the use of a one shot relay.
 
You were already given the correct answer to your homework.

The only problem with this is that you'll never see your light turn on -- it'll only be on for 1 scan (typically less than 10ms) before it turns back off. Fortunately for us, this is not a practical application of a one-shot.
 
Hi All

Thanks for your input.
I realized afterwards that the second posting showed the answer afterall. I'm just new to programming and still learning the ropes.

We would use an OSR in a rung to send a signal "just" as something has happened in a process, it would count the one-time event or condition only and not continue adding, subtracting or counting right?
 
Start with the pushbutton off. What is the status of the two outputs (A and B)? Now turn the PB signal on. What is the status of the A and B outputs at the conclusion of the first scan after PB goes on?. The status of A and B at the beginning of scan 2 is the same as at the end of scan 1. What is the status of A nad B at the end of scan 2?, scan 3, scan 4, etc.
 
I'm easily confused

Originally posted by gtsuport:

Can you explain how/why that code works (other than someone said it does)?

gtsuport, you posted post #2. Am I to assume you don't know how your own solution works or are you testing the studio audience?

Keith
 
no, no, no... He was asking bprieur if HE knew how it worked since he was just handed the answer to his homework.
 
What OZEE said!!

Sorry for the confusion. bprieur said that the second post was the answer. A couple of others said that also.

I just wanted to make sure bprieur understands the circuit.

Hope everyone is having a great day!
 

Similar Topics

I have an HMI 2711R - T4T Series B, and I want to know which PLCs, besides Micro 820, can communicate with it.
Replies
2
Views
61
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
63
I'm working with a project that contains some routines in ST but mostly in ladder. Am I correct in assuming this 'rung': DB1001DO._01AV55_OPEN :=...
Replies
4
Views
100
Is there a way to reset the count on the RS Logix BackUp?? XXXXX PROGRAM IN PROGRESS_BAK445.RSS XXXXX PROGRAM IN PROGRESS_BAK446.RSS XXXXX...
Replies
8
Views
252
I have a few questions about Studio5000. 1. Why is my RA folder so big? its well over 100 GB. 2. How do you delete versions or extra files...
Replies
3
Views
272
Back
Top Bottom