Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Bobby on June 01, 2017, 08:13:29 AM
-
Hey all,
Trying to find an easy way to determine from 4 different values which is greater. Feel like there should be an easy way but not seeing it.
Thanks!
-
Hey all,
Trying to find an easy way to determine from 4 different values which is greater. Feel like there should be an easy way but not seeing it.
Thanks!
MATH D10 = maxr(D0, 4)
-
I figured there was an easy way! Thanks!
-
I figured there was an easy way! Thanks!
There are a TON of cool functions in the MATH block, but since it is a free-form editor (for now), no one knows what goodies are in there. The MATH Help Topic DMD0085 spells them all out. Here's a screen shot of that list (MAXR is under the Statistical group). Let us know if we can add any that might be helpful.
(https://forum.hosteng.com/proxy.php?request=http%3A%2F%2Fwww.hosteng.com%2FDownload%2FScreenShots%2FMath_Functions.png&hash=4bd86e26ac30f28c38ef4c59e0660bf601cf64df)
-
I don't need it yet, but how about returning the first or last offset from a MAXR type operation on a range of locations? I am asking to know that say the 5th element is the largest value, so I can use that to reference related values in other ranges with that offset.
-
I don't need it yet, but how about returning the first or last offset from a MAXR type operation on a range of locations? I am asking to know that say the 5th element is the largest value, so I can use that to reference related values in other ranges with that offset.
That is a great idea. We would probably make that be an actual instruction, since MATH is meant to generate 1 result (not multiple output parameters). We want to add Table/Statistical instructions, and this would be great as part of that set of instructions.
-
Or do it in two steps. Do a series of FINDRxx() [FINDREQ, FINDRGE, FINDRLT, etc.] functions that take (range, value) and return an index to the first element that satisfies the test. Those would be useful functions on their own, and used with the output of MAXR(), would give the index to the max value in the range. Maybe include a user-definable equality window for reals.
-
Not to get off topic but the Rockwell Software salesmen were in our offices this morning and it was a pleasure telling them how glad I am NOT to be using their product anymore! The guy mentions that they have 84% of our market. I said that I was aware of that, and if a customer says they want AB then our response is "Then we won't sell you our product, sorry"
In 12 years of using AB I've never spoken to anyone actually involved with making AB and in this forum you guys listen to what we say and we actually see it show up in your products! Freaking AWESOME!
-
Yeah, but if they're measuring the 84% by dollar value of the PLC's, that might only be three systems a year! ;D