advice on my first ladder program

As far as the LATCH question, it is not a LATCH or SET.
They use the same logic/conditions to start and run 2 different timers.
Once you lose the conditions (such as the input) the timers will stop timing and go back to ACC=0
 
I am not sure what you mean by latching two timers. If you think of this as an electrical circuit then what you have circled is similar to a jumper. Both timers are in parallel. So for example if your sensor contact goes true, then both timers will be enabled. Keep in mind here that you have two different types of timers. The TON will be enabled and the accumulator will start to increment. When the accumulator reaches the preset (or greater) the Done bit will set. The TOF will be enabled also, but the done bit will immediately be set. the Accumulator will not start to decrement until the logic in front of the instruction goes false. Done bit released when accum <=0.

Russell
 
Cscape comes with an example project folder.
Open up some of the programs and look around.
You'll see how the comarisons are used to determine if the timer IF...ACCUMULATOR = to a value, THEN do....logic.
Horner also has internal registers that will give you a pulse of 1mS, 10Ms, 100mS and a minute
Look for %SR type registers
%S type bits include an "Always ON' bit, "Network OK" bit and more.
Once you get the basics you'll find it easy to work with.
If the example programs don't work for you I may have a couple of small real life programs (applications that I can forward) to you
 
Good stuff. I finished the Cscape tutorial from their FTP site yesterday.
I will look at these responses to keep getting a better understanding of this ladder. Much appreciated!
 
I think I will attempt to recreate using the allen bradley software.
Horner's cscape is different and it may help me learn it more easily.
Should I download the INGEAR Visual Studio.NET? I know it wont download programs to my Horner (proprietary is great).
Thanks
 
Last edited:
here is my attempt at a conversion to cscape. any glaring errors that you may notice? thanks
Sure.
Let's start from the start.
Each timer or counter consumes 2 consecutive registers.
R0001 + R0002 = Timer 1
For timer 2 you'll need R0003 + R0004.
As it is, you are overwritting the contents of R0002 already.
In AB world T1 is a canned timer and T2 another one.
I think that threw you off a bit.
It takes a little time to get used to it.
 
here is my attempt at a conversion to cscape. any glaring errors that you may notice? thanks
The logic looks ok if you're recreating the aB one.
Here's a tip:
Use registers as "PT" for your timers.
T1= R0001 + R0002, PT for T1=R0003
T2= R0004 + R0005, PT for T2=R0006
You have an XLe, create a numeric display that you'll use to write values to R0003 and R0006.
You can change the Preset values of all your timers from the LCD on the fly.
R0003 and R0006 are 16 bit registers only, type INTEGER when you define your numeric input field for your screen.
When you do the MOV, you'll need to move the accumulated value of T1 to T2 PT.
Hope this helps a bit.
 
whew

ok, will digest and edit once more.
As I look at it, is the TOF ok just hanging down there?
Is the "fast scan" the same as a one shot (this was a guess)
will recharge battery too :O)
thank you.
 
Last edited:
Is the "fast scan" the same as a one shot (this was a guess)
No, a "one-shot" is a bit that causes the rung output to go true (on) for only one scan of the microprocessor. It will not be true again until the preceeding logic goes false, then true again. It is often called a True on Rising Edge, or True on Falling Edge, or One Shot Rising, and so on.
 
That "FST_SCN" bit is not "Fast Scan". It's "First Scan". It is a one-shot bit that is true during the first scan after you put the PLC into run.

As far as the parallel timers go, I'm not sure. Horner PLCs follow GE Fanuc pretty closely and that rung structure would not be permissible in some GE Fanuc PLCs. If Cscape software has a validation procedure, I'd suggest you run it.
 
Last edited:
That "FST_SCN" bit is not "Fast Scan". It's "First Scan". It is a one-shot bit that is true during the first scan after you put the PLC into run.

As far as the parallel timers go, I'm not sure. Horner PLCs follow GE Fanuc pretty closely and that rung structure would not be permissible in some GE Fanuc PLCs. If Cscape software has a validation procedure, I'd suggest you run it.
I agree with steve.
"FST_SCN" is a one shot bit, it comes on during the first scan.
As far as the timers, cimplie your program and you'll probably get an error or warning by nesting the 2 timers.
Yes, the Cscape software has a complie/validation function.
Warnnings and errors will show up if you run it.
 
And so the First Scan bit will not do the required task, that is to do a "True One Time" on every scan, not just the first scan. I am sure that your Cscape software has an equivalent that will work.
 

Similar Topics

Hi, I have just started learning PLC programming by using TLP LogixPro Simulator. I'm now doing the Door simulation to Open and Close the door...
Replies
15
Views
9,458
Hi folks, I have a piece of code from my first project that I'm looking to improve a bit so am looking for some advice on how to do so. There's...
Replies
11
Views
2,846
Hi All, I was in the design stage of a new stand-alone machine and need some inputs/advice from all you experienced and knowledgeable industry...
Replies
5
Views
3,074
Excuse then punn, but i would appreciate any advice people would have about 'breaking in' to programming PLC's. Following an instrument...
Replies
4
Views
5,260
I am not sure why this is requested, but it was asked. Currently I have one PLC , with one output to a relay, turning on a field equipment (just...
Replies
7
Views
235
Back
Top Bottom