Can anyone give me some examples of how to set up the syntax for the MOD Operator in iLogic?
As an example, I would hope to get the remainder of a length divided by a set value of 95".
120.4375" / 95" = 1.xxx-xxxxxxxx
I would like to know if and how I might use the MOD operator in the iLogic code to get the remainder rounded to the nearest 16th (which in this case should be 25.4375").
I have used the % in the parameters to accomplish this in the past, but I am not sure how to set it up in code.
Solved! Go to Solution.
Solved by J-Camper. Go to Solution.
Here is a sample:
Dim inputVar As Double = 120.4375 in
Dim TOL As Double = 1 in / 16 ul
Dim MODvalue As Double = 95 in
Dim Output1 As Double = Math.Round((inputVar Mod MODvalue) / TOL) * TOL
Logger.Trace(Output1)
Can't find what you're looking for? Ask the community or share your knowledge.