Check for DPRNT:
If you have “User Macro B” in your Fanuc control, you can use the POPEN, DPRNT, and PCLOSE statements. On any Fanuc control, if you go to EDIT mode and type: POPEN then press INSERT, the CNCs that have the option will display the word just like it is shown. If it puts spaces between each letter, like this:
P O P E N
then the CNC doesn’t recognize the POPEN key word, and you don’t have the option.
At the start of your program:
Before your part counter executes: