I want to print out at the beginning of in my .mpf file these strings:
; Program name: ...
; Star of program
G642 G40 ect..
but I do not know how to set up my ugpost routine in the correct way.
Is there any list/array of fixture_offset_value that I can handle my example?
Thanks in advance
Solved! Go to Solution.
Depending on what you are doing with your MCS's the following can (in some cases) get the current fixture offset while running.
global mom_csys_matrix mom_machine_csys_matrix
set v(0) [expr $mom_csys_matrix(9)-$mom_machine_csys_matrix(9)] set v(1) [expr $mom_csys_matrix(10)-$mom_machine_csys_matrix(10)] set v(2) [expr $mom_csys_matrix(11)-$mom_machine_csys_matrix(11)]
This is for the case where you have a local MCS set to use main special purpose (with parent main MCS.)
The problem is that at the beginning of the posted file you don't know the offsets you need (there are ways to predict it with shop doc functions but that is quite a bit of code.) So - what some may do is create a list of offsets while running and go back to the top and write the list. Also - if a table rotary moves and there is no dynamic offset to account for it - you may have to change the perspective of the offset (part won't match the cam orientation) with some transformation math.
Thanks so much that is I wanted to know.
I prefer to collect a list of offsets while running and print out at the end of the process, as you suggested. How can I "go back to the top and write the list" ? Is there any proc?
There is no such procedure.
You will have to write the information out to a separate "header" file and concatenate the main and header after the post run has finished.
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk Testing: NX12.0
How to Get the Most from Your Signature in the Community