Host Engineering Forum

General Category => DirectSOFT => Topic started by: Mike_D on June 21, 2008, 01:21:46 PM

Title: timer help please
Post by: Mike_D on June 21, 2008, 01:21:46 PM
New to DO 6 and direct software. A/B programmer so I am a bit lost here, on the timers how do I get the equivalent ot a TT/EN/DN
(timer timing/ enable / and a done Bit) from the timer instruction, also not sure of how to set the time. would k10 equal 1 second if I am us in the .1 sec div timer? thanks for the help, I reallllllly need it here.
Title: Re: timer help please
Post by: Controls Guy on June 21, 2008, 02:07:17 PM
Yes, K10 on a TMR as opposed to a TMRF will give a one second timer.

For T0.DN, just enter 'T0' on any type of contact.

EN and TT are a little more difficult:

For EN, use a compare contact  K0 < TA0     (TA0 is the accumulator value)

For TT, add NOT T0, as in K0 < TA0 NC (T0)

You can't write to the preset directly (as in T4:0.PRE), but you can enter a Vxxx (integer value instead of a constant), and write to that, and I believe you can write to the ACC value.

ACC and PRE values are in BCD.  Yeah, I know.
Title: Re: timer help please
Post by: milldrone on June 23, 2008, 07:40:57 AM
Mike_D,

Bernie Carlton has a couple of web pages for the AB guy that is trying to work with AD
http://www.theplcguy.com/ABtoAD/Introduction.htm
Title: Re: timer help please
Post by: b_carlton on June 23, 2008, 11:10:18 AM
Actually on my web site I state that the derivation of the TT and EN equivalents is trivial.

Let's review - the equivalent of the DN bit is a contact with the same name as the timer itself.

To create an EN bit merely parallel the timer with an output of a 'C' bit. This will have the same value as the equivalent EN bit.

To create a TT bit contine with another parallel branch. Condition it with a NOT of the timer (DN) contact. Connect to another output of a 'C' bit. This will have the equivallent of a TT bit.

Code: [Select]
  Conditions
-----||----------------+-----------| TMR  T0   |
                                +
                                +                      C0
                                +----------------( )    This is the equivalent of the EN bit
                                +
                                +       T0            C1
                                +-----|\|--------( )    This is the equivalent of the TT bit


Sorry - editing seems to mess up the 'code' section formatting. I hope you get the idea. Maybe I'll place this diagram in my site in place of the 'trivial' comment.
Title: Re: timer help please
Post by: franji1 on June 23, 2008, 01:43:11 PM
Sorry - editing seems to mess up the 'code' section formatting. I hope you get the idea. Maybe I'll place this diagram in my site in place of the 'trivial' comment.
I figured out that the font in the actual forum edit window is not mono-spaced, so your text in a code section is never "lined up".  What I figured out, edit the code text in Notepad to get everything to line up, then just paste it into the forum edit window.
Title: Re: timer help please
Post by: AZRoger on June 24, 2008, 08:07:45 PM
.... uuuuhhh is it just me, but I thought one of the reasons you actually identified part of a post as CODE is because you wanted a monospaced font. Sounds like a bug. It actually looks like Courier. Maybe TABS are not being processed as the correct number of spaces. Is there a [mono] [/mono] tag that could be used? My point is that it should not be hard to lay in a little code and have it stay lined up.   ???
Roger 
Title: Re: timer help please
Post by: franji1 on June 24, 2008, 09:13:40 PM
.... uuuuhhh is it just me, but I thought one of the reasons you actually identified part of a post as CODE is because you wanted a monospaced font. Sounds like a bug. It actually looks like Courier. Maybe TABS are not being processed as the correct number of spaces. Is there a [mono] [/mono] tag that could be used? My point is that it should not be hard to lay in a little code and have it stay lined up.   ???
Roger 
It's not the font in the display - that is correct - it's monospaced.  It's the font in the box I am currently typing in.  So in THIS editor, if I type 20 "I"s
IIIIIIIIIIIIIIIIIIII
and 20 "W"s
WWWWWWWWWWWWWWWWWWWW
they don't line up in THIS editor.  So when I visually try to line them up in a code block:
Code: [Select]
IIIIIIIIIIIIIIIIIIIII
WWWWWWWW
This code block has 21 I's and 8 W's, and they line up in this editor, but they definitely do NOT line up as a mono-spaced font.  But if I count them out (as in the top part)
Code: [Select]
if I type 20 "I"s
IIIIIIIIIIIIIIIIIIII
and 20 "W"s
WWWWWWWWWWWWWWWWWWWW
these SHOULD line up in the DISPLAY (I'm still in the editor and it definitely does not line up in the editor, so I don't really know yet  ;D - wait, I'll do preview  ;) YUP, it worked!)

I'm not sure if we can change the font of this edit control  :o (the forum is a software package, not something we wrote), but I'll check it out...
Title: Re: timer help please
Post by: AZRoger on June 25, 2008, 08:52:57 AM
franji1,
Thanks for the explanation. I understand. Your suggestion of using Notepad was to do code "preview" in parallel with entering the rest of the post. You can count characters to line things up OR go parallel with a different editor. I'm fine with that. :)
Roger

Title: Re: timer help please
Post by: franji1 on June 25, 2008, 09:49:55 AM
franji1,
Thanks for the explanation. I understand. Your suggestion of using Notepad was to do code "preview" in parallel with entering the rest of the post. You can count characters to line things up OR go parallel with a different editor. I'm fine with that. :)
Roger
We're gonna look into it.  It completely defeats the purpose when trying to draw ladder logic.  I'm hoping it's a simple change to a .CSS file somewhere.