dl06

AGENTTINFOIL

Member
Join Date
Jul 2005
Location
Louisville, KY
Posts
222
Hello, my project is going quite well thanks to the help of Bernie and some others here at plcs.net, But now I have ran into a new problem, I need to delay Y3 for x amount of time before it becomes true, And also my counter needs to be reset to zero when the machine powers down, I am new to programming and still learning so please give me examples with out giving me the answer. Thanks to all for your help. Also I've included a zip to look at.
 
You kinda trapped yourself by using CT0 to reset the counter. In your existing logic, CT0 will only be ON for one scan, so it won't drive a timer (as you've discovered). If you use instead use Y3 to reset the counter, you can add the delay.

Use these 3 rungs to replace your existing rungs 3 and 4.


| X7 X4 +-----+
|----] [----] [-------------------| |
| | CT0 |
| Y3 | K10 |
|----] [--------------------------| |
| +-----+
| CT0 +-----+
|----] [--------------------------| T0 | Delay Before
| | Kx | Y3 Turns ON
| +-----+
|
| T0 Y3
|----] [--------------------------( SET )

I used T0 only as an example. You can use whatever timer number you have free.

There are many other ways to do it, but this should work AND make sense to you... :nodi:

🍻

-Eric
 
Yes Eric I did find out that CT0 will not drive a timer, But I was not sure why and now I know. I was not sure if I could use the same timer instruction or if I needed a different instruction altogether, When it seems all I needed to do was write the logic different. thanks for your help I'm sure it will work. Travis
 
Ok, I Replaced Rungs 3-4 And I Have My Delay I Need But Now My Counter Continues To Count Past My Value That I Need, And Unless Im Mistaken Y3 Resets My Counter When It Becomes True. Check Out What I Got And Explain This To Me, How Can I Make This Work. My Counter Must Go Back To 0 And Still Have My Delay On Y3. I've Rewrote The Logic Several Times And I Feel Like I'm Close But Still Falling Short. Thanks For Any Help
 
OK, now I see what you're after. You want to start counting the next stack while still pushing the previous one. Try this for rungs 3 and 4:

| X7 X4 +-----+
|---] [----] [--------------------| |
| | CT0 |
| CT0 | K10 |
|---] [---------------------------| |
| +-----+
| CT0 T1 +-----+
|---] [---+--]/[-----------+------| T1 |
| | | | K20 |
| | | +-----+
| Cx | |
|---] [---+ +---------(Cx)


Cx (x being a free bit) now latches when CT0 turns on, and remains latched until T1 expires, even if CT0 turns off. Therefore, CT0 can be reset immediately.

🍻

-Eric
 
T1 becomes true when the timer (T1) expires. You must already know that since you used it to SET Y1. Are you confused by the AND NOT (--]/[--) part? That instruction will be true when T1 is NOT expired.

A lousy attempt at an explanation of that rung...

When CT0 becomes true, T1 will start timing, and bit Cx will turn ON. This is because T1 has not yet expired (we just started it). Now that Cx is ON, the branch on the left with Cx will maintain the latch when CT0 turns off. When T1 expires, the AND NOT T1 instruction will become false, clearing the latch.

So, did it work?

🍻

-Eric
 
Eric You Were Right It Did Work,thanks For The Help. I Have 1 More Question For You, How Can I Get My Counter To Reset It Self To 0 When I Tun The Machine Off, Or Select A Diffrent Count.
 
The accumulated count is stored in the respective V-memory location. In the DL06, they are in V1000 to V1177. You can also refer to them as CTA0 through CTA177, which makes it easier to remember which location goes with which counter.

If the counter is setup as 'retentive', it will remember it's value through a power cycle. If not, it will reset to zero. Retentive ranges are set in DirectSOFT by using the pulldown menu PLC->Setup->Retentive Ranges. By default, all counter are retentive.

Alternatively, you could reset the counter at powerup by paralleling the first scan bit (SP0) on the reset rung of the counter. Another way is to use the RST instruction, with the counter as the operand.

The counter preset does not have to be a constant (K) value. You can use a V-momory location instead. The counter will then use whatever value is currently in that V-memory location. IOW, instead of CT0 K10, you could enter CT0 V2000. If you put a value of '10' in V2000, the counter's preset will be, you guessed it, 10.

🍻

-Eric
 
An 'operand' is a number (or address or whatever) supplied to a command to allow it to function. For example, a timer has, as operands, the timer number and the preset (whether a constant number or an address). In Eric's example they would be, for the counter command, CT0 and K10 (or V2000).

The difference between placing K10 and V2000 in the counter command? If K10 then it would have that preset until you changed it in the original program and re-downloaded. If v2000 the the contents of V200 is the preset and they can be changed at any time while running, via a PC or possibly a display unit.
 
Last edited:

Similar Topics

Hi, Mostly AB guy here with a little Koyo experience, but all of its digital. I get handed three analog I/O cards and asked to prove that they...
Replies
6
Views
479
Hi all, I am making a test rig to be able to wire in any DL06 (or DL05) And create a HMI in red lions crimson 3.1 to test all the inputs and...
Replies
4
Views
913
I have a Cmore screen which is communicating to the DL06 in BCD and need to create a timer that works in real numbers for a test, I simply need to...
Replies
3
Views
2,090
I have a client that has many Automation Direct DL06 PLCs for a municipal water/wastewater system. When there is a power outage, one of the sites...
Replies
4
Views
2,407
Hey everyone, Working on a system with a Koyo DL06 processor and it's my first experience with them. I have DirectSoft 6 and we got the program...
Replies
5
Views
2,259
Back
Top Bottom