Jump to content



Photo
- - - - -

DirectSoft 5 - Where is > comparison?

  • Please log in to reply
3 replies to this topic

#1 skyfox

skyfox

    Sparky

  • MrPLC Member
  • PipPipPip
  • 11 posts
  • Country:United States
    United States

Posted 06 October 2011 - 12:51 PM

Does DirectSoft have the > (greater than) comparison?

Say I want to check if a > b; In ladder, I have to;

b [Not Equal To] a " And " b [<] A to get it done.

This to me, is not very clean coding. Is this the only way you can do a greater than comparison in Dirctsoft 5?


Thanks

Edited by skyfox, 06 October 2011 - 12:52 PM.


#2 Shiner

Shiner

    Sparky

  • MrPLC Member
  • PipPipPip
  • 290 posts
  • Gender:Male
  • Location:Houston
  • Country:United States
    United States

Posted 06 October 2011 - 01:01 PM

Use just the less than statement only put your variables opposite. You really only need one function anyways, one will always be on the greater than side, who cares if it reads left to right or not.

#3 b_carlton

b_carlton

    User

  • MrPLC Member
  • PipPipPipPipPip
  • 989 posts
  • Gender:Male
  • Location:Yakima, Washington
  • Country:United States
    United States

Posted 06 October 2011 - 01:04 PM

The L-R symetry is not complete. The comparisons do not allow a constant (K) on the left hand side. You would have to assign a constant to a V register then use that on the left hand side.

Edited by b_carlton, 06 October 2011 - 01:05 PM.

An output is a PLC's way of getting its inputs to change.

#4 Dean.awatson

Dean.awatson

    Hi, I am New!

  • MrPLC Member
  • Pip
  • 1 posts
  • Country:United States
    United States

Posted 26 March 2012 - 09:47 PM

Just a thought ... If V2000> k100
then wouldn't V2000>= k101 work just the same?

Edited by Dean.awatson, 26 March 2012 - 09:48 PM.



Store » Automation Direct

Articles » Automation Direct



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users