cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Translate the entire conversation x

Add spaces in Fil macro (text command)

RJ_FR
12-Amethyst

Add spaces in Fil macro (text command)

Hello,

 

I try to output my fixture offsets with a fil macro given by KenFarley on an other topic but when i try :

 

CIMFIL/ON,SET,OFSETL
OFSTYP=POSTF(6,5)
OFSREG=POSTF(7,5)
IF(OFSTYP.EQ.1)THEN
IF(OFSREG.GE.54.AND.OFSREG.LE.59)THEN
$$CURREG=OFSREG
OFSCMD = TEXT/'G90 G',CONVI,OFSREG,2,';'
INSERT/ OFSCMD
ENDIF
ENDIF
CIMFIL/OFF

 

On my machine file i have :

 

...

N0054 ( / SEQUENCE TYPE : PROFILE MILLING);
N0056G90G55;
N0058 G0 Y5.232;

...

 

No spaces before G90 and between G90 and G55.

What is the command for output spaces ?

 

Thanks in advance.

ACCEPTED SOLUTION

Accepted Solutions
KenFarley
21-Topaz II
(To:RJ_FR)

Here's a thing that you should check that might be doing this nonsense:

Tools->NC Post Processor

Pick the option file for the machine you're trying to fix up.

Click on Operator Messages

Make sure Retain spaces in INSERT statements is checked.

View solution in original post

10 REPLIES 10
KenFarley
21-Topaz II
(To:RJ_FR)

When I output text like this to be subsequently output into the code file, I always end the TEXT/ stuff with a

, '$'

which is comma space single quote dollarsign quote

I think the GPOST interpreter sees that dollarsign as a sort of end-of-line character. It doesn't output it to the file.

Otherwise, I have noticed some weird stuff with spaces in some of the GPOST results. Seems like it is trying to make the code smaller by removing the spaces. I know they are not necessary, the machine strips them all out when I read the programs into memory, but I like them because they make the code infinitely more readable by us poor humans.

See if adding the '$' makes things behave. You might even try ending the line with ';$" since you seem to need a semicolon to end your code lines.

RJ_FR
12-Amethyst
(To:KenFarley)

Hello,

 

Thanks for your answer. This is what i tried :

 

OFSCMD = TEXT/'G90 G',CONVI,OFSREG,2, ' ; ' , ' $ '

No changes, the $ is not print

N0054 ( / SEQUENCE TYPE : PROFILE MILLING);
N0056G90G55;
N0058 G0 Y5.232;

 

OFSCMD = TEXT/'G90 G',CONVI,OFSREG,2, ' $ '

N0054 ( / SEQUENCE TYPE : PROFILE MILLING);
N0056G90G55$N0058 G0 Y5.232;
N0060 G1 Z-1. F621.;

 

OFSCMD = TEXT/'G90 G',CONVI,OFSREG,2, ' ; $ '

No changes, the $ is not print

RJ_FR
12-Amethyst
(To:RJ_FR)

When i pass through a PPRINT commande spaces no longer disappear..

 

OFSCMD = TEXT/CONVI,OFSREG,2,';$'
TTT = TEXT/ 'G90 G'
INSERT/TTT, OFSCMD
PPRINT/TTT

 

N0078 ( / SEQUENCE TYPE : PROFILE MILLING);
N0080G90G56;
N0082 (G90 G);
N0084 G0 Y5.232;

 

KenFarley
21-Topaz II
(To:RJ_FR)

Here's a thing that you should check that might be doing this nonsense:

Tools->NC Post Processor

Pick the option file for the machine you're trying to fix up.

Click on Operator Messages

Make sure Retain spaces in INSERT statements is checked.

RJ_FR
12-Amethyst
(To:KenFarley)

It wasn't, obviously!
Thank you very much

KenFarley
21-Topaz II
(To:RJ_FR)

Yeah, I'm not a big fan of the Options Editor. It's kind of like being an archeologist sifting through a bunch of stuff to find the one thing I want. Guessing what it's categorized as, then flipping through the different tabs, etc.

Good to know that was it, though. I must have set that years and years ago.

BF_14259101
4-Participant
(To:KenFarley)

ITSBIT 1869 Controls blank spaces in INSERT statements.  
Default= 00 - Suppress blanks from INSERT statement.
Range= 00 - Suppress blanks from INSERT statement. 
01 - Allow blanks from INSERT statement to be output.

Where is this? In options editor? Obscure FIL code?

BF_14259101
4-Participant
(To:KenFarley)

It's in the MillCom.txt file.  On my computer it is stored in C:\anc\camsys\ncjlibs\com\austinnc\documents\MillCom.txt

 

When building posts, I just open options file in text editor and directly change the values, so I pretty much always have this text file open.

 

I like to default set INTCOM(1869) to 1 in options file (add blanks to insert statements) then turn this off as needed in FIL.  For example (part of my FIL which handles automatic clamping)  P.S.  I hate how this forum removes the tab/space formatting making this code look really ugly...

 

IF(AUTCLM .EQ. 1)THEN
XX=POSTF(2,1,1869,0) $$SUPPRESS BLANKS
IF(CURA .NE. LASTA) THEN
IF(ACLMP .NE. AXCLOF)INSERT/'M',AXCLOF,'$'
ACLMP=AXCLOF
ELSEIF(CURA .EQ. LASTA) THEN
IF(ACLMP .NE. AXCLON)INSERT/'M',AXCLON,'$'
ACLMP=AXCLON
ENDIF
IF(CURB .NE. LASTB) THEN
IF(BCLMP .NE. BXCLOF)INSERT/'M',BXCLOF,'$'
BCLMP=BXCLOF
ELSEIF(CURB .EQ. LASTB) THEN
IF(BCLMP .NE. BXCLON)INSERT/'M',BXCLON,'$'
BCLMP=BXCLON
ENDIF
XX=POSTF(2,1,1869,1) $$UNSUPPRESS BLANKS
ENDIF

 

 

If you want to post code and have it retain its "proper" formatting, you should just use the "</>" or "Insert/Edit Code Sample" to put it in its own little box. That tool uses a monospaced font so code that is indented looks good.

Announcements

Top Tags