Closed tukusejssirs closed 1 year ago
https://docs.ladder99.com/focas-api/misc/cnc_getpath.xml
Reads the current selected path number which is the target path of the Data window functions.
This function returns the currently targeted path for other functions which are path dependent, and returns the maximum number of paths for this machine.
According to that link, path_no
is counted from 0
; is that so in fanuc-driver
too or you add 1
?
I presume that maxpath_no
is counted from 1
.
A subquestion: is there a chance that fanuc/{machine}/sys_info/1
and fanuc/{machine}/sys_info/2
would provide different data in state.data
(besides axes
)? In all machines with two paths that I have access, are all of those properties in state.data
same (except for axes
).
Maybe I am too concerned, but I think fanuc-driver
provides the same data twice. IMHO all properties from state.data
(except for axes
) are properties (metadata) of the entire machine, not a path. Only axes
are path-related from the given properties.
It might be a good idea a provide a topic with the machine-related metadata (not related to a single axes or path or whatever else), like:
"data": {
"loader_control": false,
"i_series": true,
"compound_machining": false,
"transfer_line": false,
"model": "MODEL F",
"max_axis": 32,
"cnc_type": "Series 0i",
"mt_type": "Lathe",
"series": "D6G1",
"version": "34.0",
"max_paths": 2 // [fanuc/{machine}/paths].state.data.maxpath_no
// ... and probably some other metadata
}
state.data.maxpath_no
I call cnc_getpath
to get the total number of paths.
According to that link, path_no is counted from 0; is that so in fanuc-driver too or you add 1?
Paths start at 1.
It might be a good idea a provide a topic with the machine-related metadata
Yes, we should include output from cnc_sysinfo
somewhere.
Yes, we should include output from
cnc_sysinfo
somewhere.
As I already told you privately:
It contains some data which I call machine metadata. I think all machine-related information that never (or very rarely) changes should be in a single topic. So yes, I think it should be a separate topic.
Something like fanuc/{machine}/metadata
? Or choose a better name. :wink:
sys_info/1 can be treated as the topic to retrieve machine metadata.
On a machine with two paths (based on topics like
fanuc/{machine}/axis_names/1
andfanuc/{machine}/axis_names/1
having/{path}
appended), the payload offanuc/{machine}/paths
is as follows:state.data.path_no
in this payload is ambiguous: why does it have a value of1
, when obviously it should be2
? Is it counted from0
? Or should I takestate.data.maxpath_no
into account instead?This particular machine is Doosan PUMA 2600SYB II with Fanuc Series 0i-TD with the following data gathered using
fanuc/{machine}/sys_info/{path}
: