Skip to main content
12-Amethyst
June 10, 2025
Solved

Add spaces in Fil macro (text command)

  • June 10, 2025
  • 1 reply
  • 1308 views

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.

Best answer by KenFarley

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.

1 reply

21-Topaz II
June 10, 2025

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_FR12-AmethystAuthor
12-Amethyst
June 11, 2025

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_FR12-AmethystAuthor
12-Amethyst
June 11, 2025

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;