is there any way to get the currently set PCS (product Coordinate System) of a running cnc-Program ?
Of course it is possible to save it from the CNC-Program to the PLC, but this is not a very nice implementation.
I am currently not aware of a functionality which provides you this access, to real time Data.
To use a PathSynchronous PLC Variable in the CNC Program is the best Alternative-Solution i know to this.
Some hints to the use of AIL: The given Parameter to SET_PCS is a Frame-Constant not a String, so you do not have access there to a name, but only to a Number-Referencing the Frame.
Lets Wait for the ideas of other Members.
More Details: What i have Checked
The first way is to look if a ProcessParam would be available… but in this case we only have a ProcessConfig. → No Access to real time data.
Try to use the Parameter.Component input to set the axesgroup and transform a zero position from MCS to PCS (or vice versa) to compute the distance between the two frames.
thanks a lot for your idea. That is solving the problem.
As we know all offsets for all possible Coordinate systems (stored in a structure), we can search the correct Coordinatesystem by comparing the output of the FB and the Offsets in the Coordinatesystem-Array.
It is also possible to get the offset by reading the current position (readcyclicposition-FB) in MCS and PCS and then calculate the offset on your own.
Some more information, as I had troubles implementing this (without MC_BR_TransformPosition FB):
In my case it was not possible to compare the Output of ReadCyclicPosition-FB, with different Input for CoordinateSystem, to get the currently set PCS.
It worked in most cases, but in some cases I had trouble and was not able to identify the PCS correctly. I dont know the reason.
As a result I switched from evaluating the current PCS to track the current PCS via pathsync-Var in out *.cnc-File. This variable is alwys refreshed when the command SET_PCS is executed. Initially I wanted to avoid this solution, but in the end this is the most robust solution.
sadly also the solution with a pathsync-variable has its limitations.
At least this is what we experience with our project.
In rare cases the pathsync Var is set before the Blocknumber of the SET_PCS-Cmd is executed.
This results in wrong information, that we use to restart a robotprg from a given (last executed ) Blocknumber with a given (last active) PCS.
Anybode experienced the same issues ?
To give some more detailed information here is the part of the CNC-Prg where this concept does not work:
The saved Blocknumber is N155 and the saved sPrgRestartPCS =‘PlaceCoordinate1’, even if Block 200 was not yet executed. The correct Information would be sPrgRestartPCS = ‘PlaceCoordinate1’.
When restarting the robotprg with this information, the robot returns an out of workspace-error, because the wrong PCS is selected.