Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

PLC 5 High/Low select function?

Status
Not open for further replies.

Ideasworking

Electrical
Joined
Dec 20, 2006
Messages
7
Location
CA
Hello,

I need to compare two analog values and store the high or the low value. Does the PLC5 have an instruction like this? If not are there any other ways to determine the high or low value of two analog values?

Thanks,
Lou
 
Just in case anyone cares... What I did was use four compares and four moves.

For the high select, I have two rungs; rung 1 comares A to B, if greater the move puts the A value to a new address (N33:27). Rung 2 compares B to A, if greater the move puts the B value to the same new address (N33:27).

The low select looks pretty much the same but the new address is N33:28

Hope this helps someone else.
Cheers!
Lou
 
Couldn't you get by with only two compares?
If A > B Then
move A to N7:100
Else move B to N7:100

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top