FANUC - DPRNT

Started by CNCAppsJames, April 18, 2024, 02:46 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

CNCAppsJames

That's not a typo. DPRNT is the function to export data through the active I/O Channel.

For a refresher the I/O Channels are as follows;
0 and 1 = RS-
4 = Compact Flash Card slot
5 = Dataserver
9 = FTP
17 = USB

Legal; I'm not responsible for what you do to your machine. YOU are! If you have questions, ask and we'll do the best we can to assist. Some machine tool builders lock down certain things. If that is the case on your machine contact your local machine tool dealer/builder and explain what you're trying to do and they may have to give you some guidance.

I reccommend the following settings, again YMMV... :coffee:

(On a FANUC 30i Series)
#929=1 (Data through FTP is forced to be ASCII)
#3207.5=1 (DIsplay #500-#549 Variable Name)
#6001.3=1 (Output ALL MACRO variables on punch)
#6001.6=1 (#100-#199 not cleared on reset)
#6008.3=1 (POPEN closed on reset)
#6019.0=1 (Output MACRO variables as decimal number)
#6019.3=0 (File format of ourput file = PRNTnnnn.DAT - nnnn = numbers beteeen 0000 and 9999)
#6019.7=1 (PRNTnnnn output file number is memorized. Will reset to 0000 after 9999)

The above parameters should be relatively benign. If you have ANY questions about this consult your machine tool dealer/builder or maybe even your probe/tool measurement system integrator. We always run straigt Renishaw installations - nothing off-book and we don;t have any issues. Some builders may do weird stuff.


And away we go.

To write to the I/O Channel on the fly in case there is a need;

G90G10L52(WRITING TO PARAMETERS)
N20R17(CHANGE TO USB STICK - CHANGE R NUMBER TO DESIRED I/O CHANNEL)
G11(FINISH WRITING TO PARAMETERS)

Commands;
POPEN = This opens the I/O Channel. If you do not have cable plugged in (RS-232 - 0/1, or FTP - 9), or a CF Card (4), a DATA SERVER(5), or a USB stick (17) plugged in you'll get an alarm.

DPRNT = Output formatted text and/or data

* = Space

[nn] = Number format. FOr example if I have [13] this will format the data 1 decimal place to the left and 3 to the right. [35] will format 3 decimal places to the left and 5 to the right.

PCLOS = closes the I/O channel and closes the file so it can be read.

Now for some examples;
Let's pretend I just ran a single probing cycle. Data would be stored in the following variables (assuming a standard Renishaw InspectionPlus, EasySet or GoProbe Cycle). The actual data stored will depend on the cycle run. For further information consult your Renishaw InspectionPlus manual's Output Variable Table 1 or Putput Variable Table 2 for further details.

(DATA CAPTURED IMMEDIATELY AFTER PROBING)
(THIS IS DATA CAPTURED WHAT A PROBING CYCLE IS RUN)
#135=5.8895 (X POSITION)
#136=.0003 (Y POSITION)
#137=.0 (Z POSITION)
#138=1.7507 (SIZE)
#139=.0 (X SURFACE ANGLE/4TH ANGLE/ANGLE)
#140=.0005 (X ERROR)
#141=.0007 (Y ERROR)
#142=.0 (Z ERROR/Y SURF ANGLE)
#143=.0007 (SIZE ERROR)
#144=.0 (X ANGLE ERROR/ERROR)
#145=.00172 (TRUE POS. ERROR)
#146=0. (METAL CONDITION)
#147=0. (DIRECTION INDICATOR)
#148=0. (OUT OF TOLERANCE FLAG 1-7)
#149=0. (PROBE ERROR FLAG)

To get that data out of the machine in a formatted manner woudl look like this;
N100 POPEN (OPEN COMM CHANNEL)
N135 DPRNT[X*POSITION*IS*#135[24]]
N136 DPRNT[Y*POSITION*IS*#136[24]]
N137 DPRNT[Z*POSITION*#137[24]]
N138 DPRNT[DIAMETER/SIZE*#138[24]]
N139 DPRNT[X*SURFACE*ANGLE/4TH*ANGLE/ANGLE*#139[24]]
N140 DPRNT[X*ERROR*#140[24]]
N141 DPRNT[Y*ERROR*#141[24]]
N142 DPRNT[Z*ERROR/Y*SURF*ANGLE*#142[24]]
N143 DPRNT[SIZE*ERROR*#143[24]]
N144 DPRNT[X*ANGLE*ERROR/ERROR*#144[24]]
N145 DPRNT[TRUE*POS.*ERROR*#145[24]]
N146 DPRNT[METAL*CONDITION*#146[24]]
N147 DPRNT[DIRECTION*INDICATOR*#147[24]]
N148 DPRNT[OUT*OF*TOLERANCE*FLAG*1-7*#148[24]]
N149 DPRNT[PROBE*ERROR*FLAG*0-2*#149[24]]
N200 PCLOS (CLOSE COMM CHANNEL)

You would add this to your code immediately following a probing cycle and for each POPEN and PCLOS cycle, you will get a new *.DAT file.

Now, a feature that has been available for years in Renishaw's Inspection Plus software. On any MEASUREMENT cycle, put a "W1." argument on the line and you will get a preformatted feature output. The output is defined in the O9730(REN*PRINT) MACRO program.

You're pretty much only limited to your imagination. If you need to do math to get the desired data, this needs to be done NOT on a DPRNT line. So you could do MACRO math in between two DPRNT lines.

Hope this helps you in your journey to getting more useful information out of your machine.

As always, if you have questions, by all means please ask.

:cheers:
Like Like x 2 Thank  You Thank You x 2 View List
"That bill for your 80's experience...yeah, it's coming due. Soon." Author Unknown

Inventor Pro 2026 - CAD
CAMplete TruePath 2026 - CAV and Post Processing
Fusion360 and Mastercam 2026 - CAM

TSmcam

As always, quality and informative information James. Your sharing is appreciated.
Like Like x 1 View List
CNC Softwares own 'lil piece of Poison Ivy.
TopSolid for the Win :)

CNCAppsJames

#2
A sample outputting parameter data;

#191=850

#[#191+30.]=PRM[19700]
#[#191+31.]=PRM[19701]
#[#191+32.]=PRM[19702]
#[#191+33.]=PRM[19703]
#[#191+34.]=PRM[19704]
#[#191+35.]=PRM[19705]

#[#191+50.]=[#[#191+20.]-#[#191+30.]]
#[#191+51.]=[#[#191+21.]-#[#191+31.]]
#[#191+52.]=[#[#191+22.]-#[#191+32.]]
#[#191+53.]=[#[#191+23.]-#[#191+33.]]
#[#191+55.]=[#[#191+25.]-#[#191+35.]]

POPEN
N698DPRNT[KINEMATIC*REPORT*FOR*MAM72-35V*SN* 22888 ]
N699DPRNT
N700DPRNT[NOTE*ALL*UNITS*IN*MM*BELOW]
N800DPRNT[PARAMETER*19700*X*ERROR*IS*#[#191+50.][13]]
N801DPRNT[PARAMETER*19701*Y*ERROR*IS*#[#191+51.][13]]
N802DPRNT[PARAMETER*19702*Z*ERROR*IS*#[#191+52.][13]]
N804DPRNT[PARAMETER*19703*1/2*OFFSET*X*ERROR*IS*#[#191+53.][13]]
N805DPRNT[PARAMETER*19705*1/2*OFFSET*Z*ERROR*IS*#[#191+55.][13]]
N807DPRNT
N9000DPRNT[CORRECTIONS*TO*MAKE*NOTED*BELOW]
N9002DPRNT[IF*EZ-5*IS*RUN*FROM*THE*BUTTON*THE*FOLLOWING*CHANGES*WILL*BE*MADE]
N19700DPRNT[PARAMETER*19700*WILL*BE*CHANGED*FROM*#[#191+30.][33]]
DPRNT[**********************************TO*#[#191+20.][33]]
N19701DPRNT[PARAMETER*19701*WILL*BE*CHANGED*FROM*#[#191+31.][33]]
DPRNT[**********************************TO*#[#191+21.][33]]
N19702DPRNT[PARAMETER*19702*WILL*BE*CHANGED*FROM*#[#191+32.][33]]
DPRNT[**********************************TO*#[#191+22.][33]]
N19703DPRNT[PARAMETER*19703*WILL*BE*CHANGED*FROM*#[#191+33.][33]]
DPRNT[**********************************TO*#[#191+23.][33]]
N19704DPRNT[PARAMETER*19704*N/A*TO*B/C*MACHINES]
N19705DPRNT[PARAMETER*19705*WILL*BE*CHANGED*FROM*#[#191+35.][33]]
DPRNT[**********************************TO*#[#191+25.][33]]
PCLOS




You cannot view this attachment.
Thank  You Thank You x 1 View List
"That bill for your 80's experience...yeah, it's coming due. Soon." Author Unknown

Inventor Pro 2026 - CAD
CAMplete TruePath 2026 - CAV and Post Processing
Fusion360 and Mastercam 2026 - CAM