Compare expressions in Classic Ladder?

More
30 Dec 2012 01:07 - 30 Dec 2012 01:17 #28160 by BigJohnT
And works for me
%W1and%W2=%W3

Edit: and on a gut feeling I just typed in modulus and it worked!

I need to add some examples to the manual now that we have figured out how to use them :)

John
Last edit: 30 Dec 2012 01:17 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
31 Dec 2012 21:12 #28227 by BigJohnT
Did you get modulus to work?

John

Please Log in or Create an account to join the conversation.

More
01 Jan 2013 21:04 - 01 Jan 2013 21:07 #28252 by machete
I'll try it couple of days later (now is holidays in Russia).

P.S. You mean my expression will be: "modulus(%IW11-%IW10)<=10"?

P.P.S. Happy New Year! ;)
Last edit: 01 Jan 2013 21:07 by machete.

Please Log in or Create an account to join the conversation.

More
01 Jan 2013 21:10 - 01 Jan 2013 21:25 #28253 by BigJohnT
What worked for me was:
3modulus2>2
%W1modulus%W2>%W3

Although I'm not sure of the output it passed the syntax check.

Edit: I'm pretty sure the above is incorrect... I got the expected results from the following
(2+3)&(3+2)=5
10%3=1

John
Last edit: 01 Jan 2013 21:25 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
01 Jan 2013 21:29 #28254 by machete
Hmmm..

Looks like Google Translate play a joke with me..

In Russian word modul' means:

|3|=3
|-3|=3

But GT translate it like "modulus"...

And "mod" is dividing operation 3mod2=1

So, I just need to know a difference between two variables without sign.
Maybe I just need ABS??? :ohmy:

P.S. If so, sorry my stupidness..

Please Log in or Create an account to join the conversation.

More
01 Jan 2013 21:45 #28256 by BigJohnT
Yes modulus is the remainder of a division. 10/3 has a remainder of 1 so the modulus is 1

I have managed to get the absolute to work with the following syntax.
ASSIGNMENT
%W2=-1

COMPARISON
ABS(%W2)=1

John

Please Log in or Create an account to join the conversation.

Time to create page: 0.134 seconds
Powered by Kunena Forum