adccommunitymod (AutomationDirect) asked a question.

comparative contacts (easy question)

Created Date: June 09,2005

Created By: jeremyvance

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I'm trying to compare a timer's current value to a constant (if TA2 is >= 3 seconds do this...). I'm using a DL06. Can someone please help me.


  • adccommunitymod (AutomationDirect)

    Created Date: June 09,2005

    Created by: jeremyvance

    I'm trying to compare a timer's current value to a constant (if TA2 is>= 3 seconds do this...). I'm using a DL06.

    Can someone please help me.

  • adccommunitymod (AutomationDirect)

    Created Date: June 09,2005

    Created by: bcarlton

    You should be able to do that. The right side must be either a V register or a constant. An example of this using your instance would be TA2>= K30 (because standard timers have 1/10th second resolution).

  • adccommunitymod (AutomationDirect)

    Created Date: June 10,2005

    Created by: franji1

    What's good about the relationals on timer/counter accumulators and K values is that the accumulators are BCD and the K values are BCD/HEX. So when you do

    TA2 K30

    --]>= [--

    you really are comparing the accumulator to the value 30.

  • adccommunitymod (AutomationDirect)

    Created Date: June 10,2005

    Created by: jeremyvance

    Thanks guys, I had it reversed because the logic really needed to be less than. Thanks!

  • adccommunitymod (AutomationDirect)

    Created Date: June 10,2005

    Created by: bcarlton

    Ah - you found out that constants (K) are not permitted on the left side.

  • adccommunitymod (AutomationDirect)

    Created Date: June 10,2005

    Created by: elevmike

    Originally posted by bcarlton:

    Ah - you found out that constants (K) are not permitted on the left side.

    I guess I must have been lucky. I never realized this.

  • adccommunitymod (AutomationDirect)

    Created Date: June 13,2005

    Created by: marksji

    Originally posted by elevmike:

    I guess I must have been lucky. I never realized this.

    News to me too... and I use a BUNCH of compares... Guess it just never came up.