Host Engineering Forum

General Category => DirectSOFT => Topic started by: Narf3684 on June 17, 2008, 12:20:31 AM

Title: Stage counters
Post by: Narf3684 on June 17, 2008, 12:20:31 AM
Hello everyone. This is my first post, and i thought i would start off by letting you all know about my knowledge with this program. My dad has a generator company, so i have been learning plc's for him in my spare time. I know the basics, but not much. I am trying to use a stage counter for a program. When i put it in the program i plan on using, it doesn't count. When i put it in a test program, of course, just to mock me, it works. How do i get the counter to add one when it hits that stage? Because i have compared the programs, and made changes, but i haven't found the solution. Any knowledge with them is helpful, but remember, i don't know many technical terms, and i have basicly no experience with programing of any kind, so simplicity please.
Title: Re: Stage counters
Post by: b_carlton on June 17, 2008, 08:53:13 AM
The Stage Counter, like any other, needs to see an OFF - To - On transition. If the signal going to the Stage Counter is already on when the stage is turned on then it won't count. Solutions:

1. Place the Stage Counter outside of any stage at the start of the program. Trigger it using the stage bit as a contact.

2. In the stage trigger the counter with an unused contact. After the counter, on another rung, turn on the bit using the SP1 system contact.

Code: [Select]
PLC 05

// Rung 1
// Address 0
SG S0

// Rung 2
// Address 2
STR C0
SGCNT CT0 K10

// Rung 3
// Address 6
STR SP1
OUT C0

// Rung 4
// Address 8
END

// Rung 5
// Address 9
NOP