I am writing a program to stack parts, on every other row the parts need to be flipped. I need a trigger to tell the robot if the part needs flipped or not. I already have a counter in place that counts each row so if I could check if the value of the counter was odd or even, I could then use that to determine if the part needs flipped or not.
Is this possible to check if a value is odd or even? I have been trying to do some research on it and found some examples using the Trunc /MOD function. Is there a simpler way to do it or do I need to use this? If this is the only way could anyone give me an example piece of code I could experiment with?
Thanks in advance.