Focas Source Variables
Focas variables are used to hold data retrieved from Focas enabled devices.
|
Variable Name |
Notes |
Active Tool [Focas.active_tool] |
Returns the tool position of the active tool |
|
Alarm Code [Focas.alarm_code] |
Returns the alarm code without the description |
|
Alarm Detail [Focas.alarm_detail] |
Returns the alarm code with the description |
|
Alarm Status [Focas.alarm_status] |
0 = No Alarm |
|
Capture Focas Alarms [Focas.alarms] |
Used to capture all Focas alarms including those that go off simultaneously |
|
Axis Feed Rate [Focas.axis_feed_rate] |
Return the axis feed rate of the controlled axis |
|
Connect Time [Focas.connect_time] |
The connect time for the most recent poll |
|
Connected Time [Focas.connected_time] |
Returns the amount of time in seconds since a successful connection to the Source. |
|
Current Block [Focas.current_block] |
The variable will hold the contents of the current line being executed until reaching the 1st new line or 500 characters, whichever comes first. |
|
Current Executing Block RLN [Focas.current_block_rln] |
The variable will hold the contents of the current line being executed until reaching the 1st new line or 500 characters, whichever comes first. This variable will also remove line numbers that begin with the letter 'N'. |
|
Cycle Status [Focas.cycle_status] |
0 = Idle, 1 = Cycling |
|
Downtime Code [Focas.nc_downtime_code] |
Returns the downtime code from a comment in the top 500 characters of the NC program. The comment must be DOWNTIME=(downtime_code) |
|
Emergency Status [Focas.emergency_status] |
0 = Not in Emergency, 1 = In Emergency |
|
Feed Hold Status [Focas.feed_hold_status] |
0 = Not Holding, 1 = Holding |
|
Feed Rate Override [Focas.feedrate_override]{PATH} |
The current feed rate override as a percentage |
|
Has Downtime Code [Focas.has_nc_downtime_code] |
True = A downtime code exists in a comment, False = A downtime code does not exist |
|
Macro Variable {} Focas.macro_variable{VARIABLE} |
The current value held by a specific macro or system variable |
|
Mode Selection [Focas.mode_selection] |
The current setting for the mode selection. Options are MDI (0), MEM (1), EDIT (3), JOG (5). Constants, which are listed below, can be used to reference these numbers |
|
Optional Stop (M1) [Focas.optional_stop] |
Returns True if the program has stopped due to an M1 code |
|
Part Count [Focas.part_count] |
Returns the current part count from the Fanuc part counter |
|
Part Number [Focas.part_number] |
Returns the part number from a comment in the top 500 characters of the NC program. The comment must be (PARTNUMBER=123456-01) where 123456-01 is the actual part number. (PARTNUMBER=); will return NONE. Spaces are not allowed in the comment. |
|
Program Number [Focas.main_program_number] |
Return the active main program number |
|
Executing program Number [Focas.program_number_executing] |
Returns the executing program number. This may be the main program or a sub program. |
|
Program Stop (M0) [Focas.program_stop] |
Returns True if the program has stopped due to an M0 code |
|
PMC Address Bit Value [Focas.pmc_address_bit_value] {PMC ADDRESS,BIT (0-7)} |
Returns a 1 or a 0 for the specified bit |
|
PMC Address Value [Focas.pmc_address_value] {PMC START ADDRESS,PMC END ADDRESS}} |
Returns the content of the selected PMC range. You can also enter in one address to return a single value. Please note that when using PMC address as a result within an expression you must use parenthesis for example: [PCSDB.send_part_start] {([Focas.pmc_address_value]{D52,D54}))} |
|
Rapid Override [Focas.rapid_override] |
Returns the percentage of the rapid traverse override |
|
Single Block Status [Focas.single_block_status] |
0 = Single Block off, 1 = Single Block On |
|
Spindle Load Meter [Focas.spindle_load_meter] {SPINDLE NUMBER} |
Returns the load on the specified spindle |
|
Spindle Override [Focas.spindle_override] |
The active spindle override as a percentage |
|
Spindle Speed [Focas.spindle_speed] {SPINDLE NUMBER} |
Returns the speed of the specified spindle |
The following variables hold the value for the previous poll from the Control.
|
Variable Name |
Syntax |
Active Tool (Previous) |
[Focas.prev_active_tool] |
|
Alarm Code (Previous) |
[Focas.prev_alarm_code] |
|
Alarm Detail (Previous) |
[Focas.prev_alarm_detail] |
|
Alarm Status (Previous) |
[Focas.prev_alarm_status] |
|
Axis Feed Rate (Previous) |
[Focas.prev_axis_feed_rate] |
|
Connect Time (Previous) |
[Focas.prev_connect_time] |
|
Connected Time (Previous) |
[Focas.prev_connected_time] |
|
Current Block (Previous) |
[Focas.prev_current_block] |
|
Cycle Status (Previous) |
[Focas.prev_cycle_status] |
|
Emergency Status (Previous) |
[Focas.prev_emercency_status] |
|
Feed Hold (Previous) |
[Focas.prev_feed_hold_status] |
|
Feed Rate Override (Previous) |
[Focas.prev_feedrate_override] |
|
Macro Variable (Previous) |
[Focas.prev_macro_variable]{VARIABLE} |
|
Mode Selection (Previous) |
[Focas.prev_mode_selection] |
|
Optional Stop (M1) (Previous) |
[Focas.prev_optional_stop] |
|
Part Count (Previous) |
[Focas.prev_part_count] |
|
Part Number (Previous) |
[Focas.prev_part_number] |
|
Part Number Active (Previous) |
[Focas.prev_part_number_active] |
|
Program Number (Previous) |
[Focas.prev_program_number] |
|
Executing Program (previous) |
[Focas.prev_program_number_executing] |
|
Program Stop (M0) (Previous) |
[Focas.prev_program_stop] |
|
Rapid Override (Previous) |
[Focas.rapid_override] |
|
Single Block Status (Previous) |
[Focas.prev_single_block_status] |
|
Spindle Load Meter (Previous) |
[Focas.prev_spindle_load_meter] {SPINDLE NUMBER} |
|
Spindle Override (Previous) |
[Focas.prev_spindle_override] |
|
Spindle Speed (Previous) |
[Focas.prev_spindle_speed] {SPINDLE NUMBER} |
Focas Constants
|
Constant Name |
Syntax |
Idle |
[Focas.IDLE] |
|
Cycling |
[Focas.CYCLING] |
|
MDI Mode |
[Focas.MDI] |
|
Memory Mode |
[Focas.MEM] |
|
Edit Mode |
[Focas.EDIT] |
|
Jog Mode |
[Focas.JOG] |
|
Focas Target Commands
|
Focas Command Name |
Syntax |
Send ON byte |
[Focas.send_on_byte] |
|
Send OFF byte |
[Focas.send_off_byte] |
The byte that will be set is determined by the target specified for the expression.
The information in the curly brackets are parameters that must be filed out to specify additional detail about the data being acquired.