retry
Code:if val < 6 AND Menu_Select = 211 then lookup val,[1,2,4,8,16,32],val if val =>6 and val <= 11 and Menu_Select = 2112 then lookup val-6,[1,2,4,8,16,32],val if val =>12 and Menu_Select = 2113 then lookup val-12,[1,2,4,8,16,32],val
retry
Code:if val < 6 AND Menu_Select = 211 then lookup val,[1,2,4,8,16,32],val if val =>6 and val <= 11 and Menu_Select = 2112 then lookup val-6,[1,2,4,8,16,32],val if val =>12 and Menu_Select = 2113 then lookup val-12,[1,2,4,8,16,32],val
Power 2 to the value of val ( 2^val) and you will get the same value as your lookup table.
Since 2^0 = 1 you will use an if then to turn it into zero.
Cheers
Al.
Last edited by aratti; - 5th August 2014 at 01:47.
All progress began with an idea
Bookmarks