View Full Version : create text file in macro


Osmanselim
07-09-2008, 11:07 AM
how can we create text file which includes some variables, with macro on cnc ?

Andre' B
07-09-2008, 12:05 PM
If you mean to create a text file on a computer that contains data from the CNC control. The only (standard) way, standard being relative, is to have the computer connected to the control thru the serial port. And have a program running on the computer that will take input from the serial port and put it in a file. Then on the control you use the POPEN, BPRNT or DPRNT, and PCLOSE commands to output the data.

In the days of DOS the computer could be told to accept any input from the serial port as if it were coming from the keyboard in which case you would not need a program running on the computer, but I would have to dig deep to figure out how to do that, something with the mode command I think.

Osmanselim
07-09-2008, 05:18 PM
Thank you very much for interesting
I have Solved
Problem is [54]

Who bady know What is the meaning [54]

Correct writing for me

:7777
#500=#3901
#501=#3011
#502=#3012
#503=#4115
POPEN

DPRNT[#500[54]]
PCLOS

M30

My Control is Fanuc 21 i TB

Thank you very much

padobranac
10-17-2008, 03:25 AM
Thank you very much for interesting
I have Solved
Problem is [54]

Who bady know What is the meaning [54]

Correct writing for me

:7777
#500=#3901
#501=#3011
#502=#3012
#503=#4115
POPEN

DPRNT[#500[54]]
PCLOS

M30

My Control is Fanuc 21 i TB

Thank you very much

[54] means that there will be punched out 5 characters befor decimal point and 4 characters after decimal point

So if you have in variable 123456789.123456789
youl will get out 56789.1234