Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hello Programmer,
I need your help.
I found some sequences that Creo has generated “ROTATE” in the CL data (like following pictures), therefore, these sequences need to exchange GOTO positions by using FIL when Creo was posted tap file. Meanwhile, I also have some sequences that Creo has no generate “ROTATE” in CL data which are unnecessary to exchange GOTO positions. Therefore, I want to write FIL (conditionals control) to determine which sequence need to exchange GOTO position or not exchange.
Could you please teach me how to write a conditionals control in the FIL (IF….THEN….) to switch it when Creo was generated “ROTATE”?
I wrote following FIL but Creo couldn’t work, just for your reference.
CIMFIL/ON,GOTO
WR=TEXT(ROTATE/CAXIS,INCR)
IF(WR.(ON))THEN
DMY=POSTF(20)
I1=POSTF(7,11)
J1=POSTF(7,9)
K1=POSTF(7,10)
V1=VECTOR/I1,J1,K1
M2D=DATA/CAM,2,V1 $$ USE VECTOR
$$M2D=DATA/CAM,2,I1,J1,K1 $$ SAME AS ABOVE LINE
TRANS/M2D
ENDIF
DMY=POSTF(21)
DMY=POSTF(13)
CIMFIL/OFF
Thanks so much
Have a good day!!
Mark Rao
The first thing you need to do is search for documentation of the FIL command language. You can't guess at the syntax for commands and expect them to work. For example, to define a variable WR that contains text, the correct syntax is
WR = TEXT/'I want WR to contain this text'
As for "WR.(ON)", where did this come from? That's not a logical construct I'm familiar with at all.
Processing of the CL file by the FIL code is akin to a tape reader. The CL file is parsed in a sequential fashion, so knowing if a C or B axis rotation has been set means you need to set a flag when the rotate commands are encountered. You need to do something like:
CIMFIL/ ON, ROTATE
$$ Set your flag based on which axis, maybe save the angle, etc.
CIMFIL/ OFF
Hello Ken,
Thanks for your reply.
Let me do more clear explain in my question, please take a look following explain, thanks!!
I use Mill-Turn type to create mfg file, in Mill-Turn type "Operation" setting, the coordinate Z point direction needs to be set Horizontal, but I found the sequence coordinate only allow Z point direction for vertical. Therefore, the Mill-Turn type needs to create a coordinate which should be different with operation coordinate, because both Z point direction are different which caused coordinate positions are wrong in tap file.
Therefore, I wrote FIL (as I following FIL shown) in the Gpost to exchange GOTO X and Z position, and then Creo can post coordinate in the right position in the tap file.
CIMFIL/ON,GOTO
DMY=POSTF(20)
I1=POSTF(7,11)
J1=POSTF(7,9)
K1=POSTF(7,10)
V1=VECTOR/I1,J1,K1
M2D=DATA/CAM,2,V1
TRANS/M2D
DMY=POSTF(21)
DMY=POSTF(13)
CIMFIL/OFF
But I still study FIL to switch different situation when Creo posted tap file, because Mill-Turn has two situations, one situation has no need to exchange GOTO position, but another one situation is need, please take a look following two situation pictures.
As I know, the first situation has "ROTATE/CAXIS" in the CL data, the second situation has no "ROTATE/CAXIS" in CL data, therefore, I want to write a conditional control to switch both situation when I posted different situations.
Could you please teach me how to write correct FIL to switch it? Thanks!!
Have a good day!!
Mark Rao