Host Engineering Forum
General Category => DirectSOFT => Topic started 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.
-
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.
-
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
-
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.
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.
-
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.
-
.... 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
-
.... 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:
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)
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...
-
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
-
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.