Introduction
Every once in a while it is helpful to have a function to calculate remainder division in INFORM. This function does not exist natively on the robot controller so this article provides an example of how to implement this function using custom code. Note that 'Modulus.JBI' is attached to this article.
Implementation
When you call this job you will feed the dividend and divisor using job arguments. The GETS I000 $RV will collect the remainder that was calculated by the Modulus job.
Argument 1 -> Dividend
Argument 2 -> Divisor
In example show below. 10 / 3 yields a remainder of 1 in I000.
Implementation - Step by Step
In the event you are unfamiliar with how to add these commands/settings, follow the below screenshots.
(1) Move cursor to the right side of the instruction, press Select.
(2) The 'Detail Edit' screen appears.
(3) Define the arguments as shown below.
(4) Now the CALL JOB command is setup correctly.
(5) Next, add the GETS I000 $RV from the INFORM LIST and the sample setup is complete.
Comments
0 comments
Please sign in to leave a comment.