How can we help?

Okuma THINC Constants and Variables

You are here:
< All Topics

Okuma THINC Source Variables

Okuma variables are used to hold data retrieved from Okuma THINC devices.

The information in curly brackets are required parameters specifying additional information, such as a spindle number, about the data being retrieved.

Some variables optionally support multiple paths. Valid options are nothing, a path number, or All. These are denoted in the variable list with a {} inside the variable brackets: [OkumaTHINC.variable_name{}]. The following are example values to determine which path to read:

  • Path 1:[OkumaTHINC.cycle_status] or [OkumaTHINC.cycle_status{1}]
  • Path 2: [OkumaTHINC.cycle_status{2}]
  • Loop (checks if a variable is true for any path): [OkumaTHINC.feed_hold_status{All}]
Variable NameNotes
Active Tool [OkumaTHINC.active_tool{}]Returns the tool position of the active tool. Any individual path.
Alarm Code [OkumaTHINC.alarm_code{}]Returns the alarm code without the description. No Path.
Alarm Detail [OkumaTHINC.alarm_detail{}]Returns the alarm code with the description. No Path.
Alarm Status [OkumaTHINC.alarm_status{}]0 = No Alarm. No Path.
Capture Alarms [OkumaTHINC.alarms{}]Used to capture all Okuma alarms including those that go off simultaneously. Any individual path or all paths.
Bit Input/Output Data [OkumaTHINC.bit_io]{ADDRESS,BIT}Returns a 1 or a 0 for the specified bit. No path.
Common Variable [OkumaTHINC.common_variable{}]{VARIABLE}The current value held by a specific common or system variable. Any individual path.
Connect Time [OkumaTHINC.connect_time]The connect time for the most recent poll. No path.
Connected Time [OkumaTHINC.connected_time]Returns the amount of time in seconds since a successful connection to the Source. No path.
Coolant [OkumaTHINC.coolant]0 = Coolant Off
1 = Coolant On
No Path
Current Executing Block [OkumaTHINC.current_block{}]The variable will hold the contents of the current line being executed. Any individual path.
Current Executing Block RLN [OkumaTHINC.current_block_rln{}]The variable will hold the contents of the current line being executed. This variable will also remove line numbers that begin with the letter 'N' as well as remove any comment at the end of the line. Any individual path.
Current Executing Line Number [OkumaTHINC.current_line_number{}]Returns the line number of the code currently executing. Line numbers must be defined in the program as N#### preceding the line of code. Any individual path.
Cycle Status [OkumaTHINC.cycle_status{}]0 = Idle, 1 = Cycling. Any individual path or all paths.
Dry Run [OkumaTHINC.dry_run]0 = Dry Run Off
1 = Dry Run On
No Path
Emergency Status [OkumaTHINC.emergency_status{}]0 = Not in Emergency, 1 = In Emergency. No path.
Feed Hold Status [OkumaTHINC.feed_hold_status]0 = Not Holding, 1 = Holding. No path.
Feed Rate Override [OkumaTHINC.feedrate_override{}]The current feed rate override as a percentage. No Path.
Long Word Input/Output Data [OkumaTHINC.long_word_io] {ADDRESS}The current 64 bit long word value of the specified address.
Mode Selection [OkumaTHINC.mode_selection{}]The current setting for the mode selection.  Options are AUTO (0), MDI (1), and MANUAL (3). Constants, which are listed below, can be used to reference these numbers. Any individual path.
Optional Block Skip [OkumaTHINC.optional_block_skip]0 = Block Skip Off
1 = Block Skip On
No Path
Optional Stop State [OkumaTHINC.optional_stop{}]0 = Optional Stop Off
1 = Optional Stop On
No Path
Part Count (1-4) [OkumaTHINC.part_count_#1-4{}]Returns the current part count from the specified Okuma part counter. Any individual path.
Part Number Executing Program [OkumaTHINC.part_number_fep{}]{PART_NUMBER_IDENTIFIER}Returns the part number from a comment in the executing program regardless of where the machine is in the program. Searches for a comment containing the identifier, and loads the remainder of the comment as the part number excluding the ending ). Stops searching when a line not beginning with O or ( is found. Any individual path.
Part Number Main Program [OkumaTHINC.part_number_fmp{}]{PART_NUMBER_IDENTIFIER}Returns the part number from a comment in the main program regardless of where the machine is in the program. Searches for a comment containing the identifier, and loads the remainder of the comment as the part number excluding the ending ). Stops searching when a line not beginning with O or ( is found. Any individual path.
Path Feed Rate [OkumaTHINC.path_feed_rate{}]Returns the current path feed rate. Any individual path.
Program Comment [OkumaTHINC.comments{}]{string}Returns the program comment after the provided search string. If no string is provided all comments in the program are returned. Any individual path.

Works with CNC Memory and Fanuc Data Server. Cannot read from External Memory.
Program File Name [OkumaTHINC.program_filename{}] Returns the actual file name of the program. Any individual Path.
Program Number Executing [OkumaTHINC.program_number_executing{}]Returns the executing program number. This may be the main program or a sub program. Some programs may not have a program number. Any individual Path.
Program Number Main [OkumaTHINC.program_number{}]Return the active main program number. Some programs may not have a program number. Any individual Path.
Program Stop (M0) [OkumaTHINC.program_stop{}]Returns True if the program has stopped due to an M0 code. Any individual path or all paths.
Rapid Override [OkumaTHINC.rapid_override{}]Returns the percentage of the rapid traverse override. Any individual path.
Single Block Status [OkumaTHINC.single_block_status{}]0 = Single Block off, 1 = Single Block On. Any individual path or all paths.
Spindle Load Meter Percent [OkumaTHINC.spindle_load_meter_percent{}] {SPINDLE NUMBER}Spindle Load in percent for the specified spindle. Any individual path.
Spindle Override [OkumaTHINC.spindle_override{}] {SPINDLE NUMBER}The active spindle override as a percentage. Any individual path.
Spindle Speed [OkumaTHINC.spindle_speed{}] {SPINDLE NUMBER}Returns the speed of the specified spindle. Any individual path.
Word Input/Output Data [OkumaTHINC.word_io] {ADDRESS}The current 32 bit word value of the specified address.

The following variables hold the value for the previous poll from the Control. The same rules for reading paths above will apply.

Variable NameSyntax
Active Tool (Previous)[OkumaTHINC.prev_active_tool{}]
Alarm Code (Previous)[OkumaTHINC.prev_alarm_code{}]
Alarm Detail (Previous)[OkumaTHINC.prev_alarm_detail{}]
Alarm Status (Previous)[OkumaTHINC.prev_alarm_status{}]
Alarms (Previous)[OkumaTHINC.prev_alarms{}]
Bit Input/Output data (Previous)[OkumaTHINC.prev_bit_io]{ADDRESS,BIT}
Connect Time (Previous)[OkumaTHINC.prev_connect_time]
Connected Time (Previous)[OkumaTHINC.prev_connected_time]
Current Executing Block (Previous)[OkumaTHINC.prev_current_block{}]
Current Executing Block RLN (Previous)[OkumaTHINC.prev_current_block_rln{}]
Current Executing Line Number (Previous)[OkumaTHINC.prev_current_line_number{}]
Cycle Status (Previous)[OkumaTHINC.prev_cycle_status{}]
Emergency Status (Previous)[OkumaTHINC.prev_emercency_status{}]
Feed Hold Status (Previous)[OkumaTHINC.prev_feed_hold_status{}]
Feed Rate Override (Previous)[OkumaTHINC.prev_feedrate_override{}]
Long Word Input/Output Data (Previous)[OkumaTHINC.prev_long_word_io] {ADDRESS}
Macro Variable (Previous)[OkumaTHINC.prev_macro_variable{}]{VARIABLE}
Mode Selection (Previous)[OkumaTHINC.prev_mode_selection{}]
Optional Stop State (Previous)[OkumaTHINC.prev_optional_stop{}]
Part Count (1-4) (Previous) [OkumaTHINC.prev_part_count_#1-4]
Part Number Executing Program (Previous)[OkumaTHINC.prev_part_number_fep{}]
Part Number Main Program (Previous)[OkumaTHINC.prev_part_number_fmp{}]
Path Feed Rate (Previous)[OkumaTHINC.prev_path_feed_rate{}]
Program Comment (Previous)[OkumaTHINC.prev_comments{}]
Program File Name (Previous)[OkumaTHINC.prev_program_filename{}]
Program Number Executing (Previous)[OkumaTHINC.prev_program_number_executing{}]
Program Number Main (Previous)[OkumaTHINC.prev_program_number{}]
Program Stop (M0) (Previous)[OkumaTHINC.prev_program_stop{}]
Rapid Override (Previous)[OkumaTHINC.prev_rapid_override{}]
Single Block Status (Previous)[OkumaTHINC.prev_single_block_status{}]
Spindle Load Meter Percent (Previous)[OkumaTHINC.prev_spindle_load_meter_percent{}] {SPINDLE NUMBER}
Spindle Override (Previous)[OkumaTHINC.prev_spindle_override{}]
Spindle Speed (Previous)[OkumaTHINC.prev_spindle_speed{}] {SPINDLE NUMBER}
Word Input/Output Data (Previous)[OkumaTHINC.prev_word_io] {ADDRESS}

Okuma THINC Constants

Constant NameSyntax
Auto Mode[OkumaTHINC.AUTO]
Cycling[OkumaTHINC.CYCLING]
Idle[OkumaTHINC.IDLE]
Manual Mode[OkumaTHINC.MANUAL]
MDI Mode[OkumaTHINC.MDI]

Okuma THINC Target Commands

Focas Command NameSyntax
Send Macro Variable[OkumaTHINC.send_macro_variable]{VARIABLE,VALUE,DECIMAL PLACES/EXPONENT PART}
Table of Contents