Pro codes · Fanuc

POPEN / DPRNT / PCLOS — Write data out of a macro (Fanuc)

Write data out of a macro. Sends text and variables from a running program to the RS-232 port or another output device set in the parameters. Used to log probe results, offsets or part counts to…

By cnccode · Updated
On this page
  1. What it does
  2. Example
  3. Tips
  4. More: macro and system variables
  5. Frequently asked questions
PropertyValue
CodePOPEN / DPRNT / PCLOS
ControlFanuc
TopicMacro and system variables
SyntaxPOPEN · DPRNT[TEXT*#100[33]] · PCLOS

What it does

Sends text and variables from a running program to the RS-232 port or another output device set in the parameters. Used to log probe results, offsets or part counts to a PC without extra software. The format [#100[33]] means 3 digits before and 3 after the decimal point.

Example

Fanuc
POPEN
DPRNT[PART*#3901[40]*DIA*#140[33]]
PCLOS

Tips

  • Spaces are written as *. The output device is chosen with parameters (I/O channel).

Options, numbers and parameters depend on the control model, the software version and the options the machine builder installed. Check the operator and parameter manual of your machine before you use a code for the first time, and run it in single block with low overrides.

Try it without a machine

The Macro B simulator runs variables, G65 calls, #3000 alarms, G10 and system variables block by block.

Open the Macro B simulator

More: macro and system variables

Frequently asked questions

What is POPEN / DPRNT / PCLOS on Fanuc?
Write data out of a macro. Sends text and variables from a running program to the RS-232 port or another output device set in the parameters. Used to log probe results, offsets or part counts to a PC without extra software. The format [#100[33]] means 3 digits before and 3 after the…
Was this page helpful?