Okuma OSP: Difference between revisions

From Knowledge Base
No edit summary
No edit summary
 
Line 1: Line 1:
== Part counting ==
== Part counting ==
Okuma OSP controls have 4 "work counters" (A, B, C, and D) that all increment when a program calls M02 or M30.
Okuma OSP controls have 4 "work counters" (A, B, C, and D) that all increment when a program calls <code>M02</code> or <code>M30</code>.


=== Which work counter does OnTakt read? ===
OnTakt reads the work counter configured in the Okuma MTConnect adapter settings on the control.
OnTakt reads the work counter configured in the Okuma MTConnect adapter settings on the control.


=== Manually setting the part counter ===
=== Manually setting the part counter ===
The work counters can be adjusted from MDI or part programs by using the VWKCC system variables:
The work counters can be adjusted from MDI or part programs by using the VWKCC system variables:
 
{| class="wikitable"
* <code>VWKCC[1]</code> (work counter A)
!Work counter
* <code>VWKCC[2]</code> (work counter B)
!System variable
* <code>VWKCC[3]</code> (work counter C)
|-
* <code>VWKCC[4]</code> (work counter D)
|A
 
|<code>VWKCC[1]</code>
|-
|B
|<code>VWKCC[2]</code>
|-
|C
|<code>VWKCC[3]</code>
|-
|D
|<code>VWKCC[4]</code>
|}
For example, a program can set work counter A to 42 by running <code>VWKCC[1]=42</code>, or manually increment work counter B by running <code>VWKCC[2]=VWKCC[2]+1</code>.
For example, a program can set work counter A to 42 by running <code>VWKCC[1]=42</code>, or manually increment work counter B by running <code>VWKCC[2]=VWKCC[2]+1</code>.



Latest revision as of 10:08, 13 August 2024

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.

Connectivity

See MTConnect (Okuma OSP)