Part counting
Okuma OSP controls have 4 "work counters" (A, B, C, and D) that all increment when a program calls M02
or M30
.
Which work counter does OnTakt read?
OnTakt reads the work counter configured in the Okuma MTConnect adapter settings on the control.
Manually setting the part counter
The work counters can be adjusted from MDI or part programs by using the VWKCC system variables:
Work counter | System variable |
---|---|
A | VWKCC[1]
|
B | VWKCC[2]
|
C | VWKCC[3]
|
D | VWKCC[4]
|
For example, a program can set work counter A to 42 by running VWKCC[1]=42
, or manually increment work counter B by running VWKCC[2]=VWKCC[2]+1
.
Variable part counting
Instead of using the built-in part counters, OnTakt can also read a common variable and interpret it as a part counter. This way, the part program can increment the part counter by incrementing a common variable. For example, the statement #5=#5+1
increments common variable 5.