In this article, we describe display of variables for CNC macro programming.
It is necessary to understand how the values of variables are displayed on the macro variable screen, because it might cause some confusion. The calculated value of a variable must lie within the permitted range (10-²⁹ < magnitude < 10⁴⁷ , or be 0) . However, all the legal values cannot be displayed correctly on the screen, which uses a simple eight digit decimal format, without exponential digits.
Even then, the value (provided it is legal) held in the variable is correctly used for further calculations. Also, Fanuc Oi series controls do not allow more than eight digits (including leading or trailing zeroes) for specifying a value in direct assignment. Some examples are given below:
#1 = 0 . 00000001 ; (Illegal value, as it contains more than eight digits)
#1 = .00000001; (Assigns correct value to#1, but displays nine stars, *********, because the number cannot be correctly displayed using eight digits, because the display automatically adds at least one zero to the left of decimal. So, it should display 0.00000001, which it cannot because nine digits are required. Note that the value is the same as the value in the previous example)
#1 = #1 * 10 ; (Assigns 0.0000001 to #1 which is also correctly displayed)
#1 = #1 * #1 * #1 * #1 / 10; (Assigns 10-²⁹ to #1, but displays nine stars)
#1 = #1 / 10; (The calculated value is less than 10-²⁹, which does not lie in the permitted range, so the execution terminates with an alarm. Note that the alarm message would be “CALCULATED DATA OVERFLOW,” though it is actually a mathematical underflow)
#1 = 10000000; (Displays 10000000)
#1 = #1 * #1 * #1 * #1 * #1 * #1; (Assigns 10⁴² to #1, but displays nine stars)
#1 = #1 * 100000; (Assigns 10⁴⁷ to #1, but displays nine stars)
# 1 = # 1 * 10; (The calculated value is more than 10⁴⁷ which does not lie in the permitted range. So, the execution terminates with an alarm, “CALCULATED DATA OVERFLOW”)