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 a 120V relay, 120V DI card and a analog input. I was wanting to know if i could put a 24V DI and well as a 120V DI card on the same plc...
Replies
1
Views
63
Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
184
Good morning! Let me start by saying, I am still learning about this type of HMI programming. I recently watched a video about recipes and how it...
Replies
4
Views
166
I have some logic that I have written within a 5380 series controller that tracks the time an event is started, while the event is running an RTO...
Replies
2
Views
102
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
112
Back
Top Bottom