You are not logged in.
Hello all,
Here is a situation:
a CNC operator has a number of NC programs as well as workpieces and a horizontal mill with a rotary table. Because the choice of which piece of steel would be going to the particular fixture side is entirely up to the CNC operator it means it is up to the operator to make something of this kind:
G90B0
G54.1P1000
M198P1000
G90B180
G54.2P1000
M198P1001
to run O1000 on 0deg fixture side and to run O1001 on 180deg side.
I was wondering if it possible to use Vericut 'SETUP PLAN' to output a text
file which would list a fixture side (setup name? active coordinate system?) and an associated NC program preferebly in a G-Code format?
In this case an operator would prototype the process in a Vericut session and would have a nice G-Code scheduling program to run the job.
TIA.
Feliks.
Offline
Hi Feliks_tk
sorry for the long post reply,
Setup Plan does not have an output capability, but there is another method:
I am not familiar with G54.1P1000/G54.2P1000. The usual format for Fanuc-like controls is G54.1P1/G54.1P2 where the P is the work offset index. What control is it?
If you are using a Fanuc control, see the additional step. This solution is for the standard Fanuc.
This solution will work in 6.2 and up:
1) Open in Samples, tombstone_work_offsets_multiple_parts.vcproject
2) add Work Offset table 1 and 2:
Projects> Processing Options > G-Code > Setings..., Tables tab
highlight register:54
Add/Modify
Register = 1
Modify, Close
highlight register:55
Add/Modify
Register = 2
Modify, Close
OK
3) configure the control file to output a text file with the defined work offsets
The library control for Fanuc will set the system variables for the work offsets defined in the tables.
- the variables 7001-7009 will be set for work offset index 1
- the variables 7021-7029 will be set for work offset index 2
(54-59) will also set 5221...
It is set in Configuration > Adv. Options... > Events tab, AutoSetTableAxisVars
We added in 6.2 the ability to write to a text file to support the DPRINT functions. We will use this function to write the variables to a text file:
in Configuration > Adv. Options... > Events tab
Highlight --> End of Processing
Add/Modify
from the macro list, select --> FanucPopen
Override Text = offsets.txt (this is the name of the text files that will be created)
Add/Modify
from the macro list, select --> FanucDprint
Override Text = offset 1, X value = {#7001}
Add
---leave the window open
Override Text = offset 1, Y value = {#7002}
Add
Override Text = offset 1, Z value = {#7003}
Add
Override Text = offset 1, B value = {#7005}
Add
Override Text = offset 2, X value = {#7021}
Add
Override Text = offset 2, Y value = {#7022}
Add
Override Text = offset 2, Z value = {#7023}
Add
Override Text = offset 2, B value = {#7025}
Add
Close
Highlight --> End of Processing
Add/Modify
from the macro list, select --> FanucPclose
Add
Close (this will close the text file)
Save the control file
Run the NC program, at the end of the simulation (note that the simulation will no be correct unless you edit the NC program replacing G54 for G54.1P1 and G55 for G54.1P2)
The text file will be written with the offset values. the file is located in your Working directory.
4) additional step for G54.1P1000/G54.2P1000
in Configuration > Adv. Options... > Substitute tab
Add
Input Text = G54.1P1000
Output Text = G54.1P1
Add
Input Text = G54.2P1000
Output Text = G54.1P2
OK
Save the control file
Offline
Serge, thank you very much. It helps.
You are correct, the syntax is G54.1P1, I should've typed G54.1P#100.
One more question. What is the name of the variable which stores the NC program name ( O number) associated to a workpiece?
Basicaly the output.txt file would look something like this:
offset 1, X = ...
offset 1, Y = ...
...
offset 2, B = ...
I would like the text file to have this (if possible):
offset 1, NC Program = O1234
offset 2, NC Program = O5678
TIA.
Feliks.
Offline
If you look in the Word/Address, the word O assigns the variable #4115.
If you add this to the end of processing, you will only get the number of the second NC program. We need to modify the above steps a bit.
1) move FanucPopen from End of Processing to Start of Processing.
This will open the text file for the duration of the simulation.
2) Configuration > Word/Address expand Registers, expand P *, below the condition (G 54 54.1), with the macro WorkCoordIndex selected, right-click Add/Modify
in the field below the Macroname, type dprint (as you type the macro will appear in the list above), select FanucDprint
Override Text = Offset {$}, NC Program = O{#4115}
the $ will pass the value assigned to P, for example:
O1234
...
G54.1P100
will generate the following in the text file:
Offset 100, NC Program = O1234
Offline