Showing results for 
Search instead for 
Do you mean 
Reply

Lock code for R parameters

Good morning.

I get your all expertise for my issue. I currently the the probing system to probe a numbers of holes and save the center locations of these holes into R-parameters and make a macro program to call those locations. I am worried that some body will alter, change, or delete those values by accident. Anybody out there know the commands so I can use to lock/ protect those data and unprotect after I finish the project.

 

Thanks a lot in advance.

 

Robert

7 REPLIES

Re: Lock code for R parameters

from the Fanuc manual

 

- Write protection of a common variable
Multiple common variables (#500 to #999) can be protected (their attributes are set to READ only) by
setting variable numbers in parameters No.6031 and No.6032. This protection is enabled for both
Input/All Clear by MDI on the macro screen and write operation by a macro program. If the NC program
specifies WRITE operation (used in the left side) for a common program in the set range, an alarm
PS0116 is issued.

Jake Hardwick
CNC Programmer
Senior Aerospace AMT
Production NX8.5.3.3 Beta testing NX10.0.1.4

Re: Lock code for R parameters

Hi Jake,

Thank you for your thread. Do you have any idea for Siemens?

Re: Lock code for R parameters

Many of the Sinumerik manuals are on line at http://www.automation.siemens.com/doconweb/

 

Mark Rief
Retired Siemens

Re: Lock code for R parameters

You can make a backup of R parameters by writing them to a file.
In the 840d controller You have the option to write to a file.

File ="_N_test"
IF ($P_SEARCH==FALSE)
DELETE(VARNUM1,file)
IF VARNUM1
IF VARNUM1<>3
MSG ("ERROR WITH DELETE COMMAND: "<<VARNUM1)
M0 ;ERROR WITH DELETE, ZIE DIAGNOSE > MESSAGES
ENDIF
ENDIF
WRITE(VARNUM1,file,"MEETTASTER")
WRITE(VARNUM1,file,"DATE: "<<VARTXT1)'
ENDIF
Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.0

Re: Lock code for R parameters

Hi Patrick,

In the siemense advanced manual, it says something about APR n and APW n for the level protection. Do you have any idea about these and how they work?

Re: Lock code for R parameters

Never used the APW APR things.

I always use the WRITE for writing all my probing results. You can write the results in a CSV format -so you can open them in Excel- or you can write it in a SPF format so you can execute it later. This gives you the possibility to store and recall corrections, even after you ran another program on another pallet or after a machine shutdown/reboot

 

Here's an example where these two opions are combined.

 

VARTXT1=$A_DAY<<"-"<<$A_MONTH<<"-"<<$A_YEAR<<"/"<<$A_HOUR<<":"<<$A_MINUTE<<":"<<$A_SECOND
VARTXT2="_N_PROBE_RESULTS_S2_"<<$A_DAY<<"_"<<$A_MONTH<<"_"<<$A_YEAR
IF ($P_SEARCH==FALSE)
   DELETE(VARNUM1,VARTXT2)
   IF VARNUM1
      IF VARNUM1<>3
         MSG ("ERROR WITH DELETE COMMAND: "<<VARNUM1)
         M0 ;ERROR WITH DELETE, ZIE DIAGNOSE > MESSAGES
      ENDIF
   ENDIF
   WRITE(VARNUM1,VARTXT2,"PROBE RESULTS")
   WRITE(VARNUM1,VARTXT2,"NC program; 220000130101_S2_R01")
   WRITE(VARNUM1,VARTXT2,"DATE: "<<VARTXT1)
   WRITE(VARNUM1,VARTXT2,"=== start ===")
   IF VARNUM1
      MSG ("ERROR WITH WRITE COMMAND: "<<VARNUM1)
      M0 ;ERROR WITH WRITE, ZIE DIAGNOSE > MESSAGES
   ENDIF
ENDIF
...
IF ($P_SEARCH==FALSE)
  Probing code point
  ...
  WRITE(VARNUM1,VARTXT2,"Z-Axis-CORRECTION;Nominal;154.1477;Actual;"<<R200<<";Difference;"<<R201)
  R212=$P_ACTFRAME[Z,TR]+$P_ACTFRAME[Z,FI]+R201 ;Z Zero correction
ENDIF
...
IF ($P_SEARCH==FALSE)
  Probing code hole
  ...
  WRITE(VARNUM1,VARTXT2,"XY-POS-HOLE;Xnom;395.827;Xact;"<<R202<<";Xdiff;"<<R205)
  WRITE(VARNUM1,VARTXT2,";Ynom;807.141;Yact;"<<R203<<";Ydif;"<<R206)
  WRITE(VARNUM1,VARTXT2,";Dnom;20.01;Dact;"<<R204<<";Ddiff;"<<R207)
  R210=$P_ACTFRAME[X,TR]+$P_ACTFRAME[X,FI]+R205 ;X Zero correction
  R211=$P_ACTFRAME[Y,TR]+$P_ACTFRAME[Y,FI]+R206 ;Y Zero correction
ENDIF
...
;Probing and reporting is done. Now write the Zero corrections to a SPF format, so the corrections can be restored later.
...
VARTXT1=$A_DAY<<"-"<<$A_MONTH<<"-"<<$A_YEAR<<"/"<<$A_HOUR<<":"<<$A_MINUTE<<":"<<$A_SECOND
VAERTXT2="_N_PRO_220000130101_S2_R01_SPF"
IF ($P_SEARCH==FALSE)
   DELETE(VARNUM1,VAERTXT2)
   IF VARNUM1
      IF VARNUM1<>3
         MSG ("Error with DELETE command: "<<VARNUM1)
         M0 ;Error with DELETE, Zie Diagnose > Messages
      ENDIF
   ENDIF
   WRITE(VARNUM1,VAERTXT2,";Zero offset correction")
   WRITE(VARNUM1,VAERTXT2,";Date: "<<VARTXT1)
   WRITE(VARNUM1,VAERTXT2,"R210="<<R210<<" ;X corrected")
   WRITE(VARNUM1,VAERTXT2,"R211="<<R211<<" ;Y corrected")
   WRITE(VARNUM1,VAERTXT2,"R212="<<R212<<" ;Z corrected")
   WRITE(VARNUM1,VAERTXT2,"R213="<<R213<<" ;B corrected")
   WRITE(VARNUM1,VAERTXT2,"STOPRE")
   WRITE(VARNUM1,VAERTXT2,"$P_UIFR[1]=CTRANS(X,R210,Y,R211,Z,R212,A,0,B,R213)")
   WRITE(VARNUM1,VAERTXT2,"M17")
   IF VARNUM1
      MSG ("Error with WRITE command: "<<VARNUM1)
      M0 ;Error with WRITE, Zie Diagnose > Messages
   ENDIF
ENDIF
STOPRE
...
...
;(*** Read External Zero PRO_220000130101_S2_R01
CALL "/_N_WKS_DIR/_N_XXX_WPD/_N_PRO_220000130101_S2_R01_SPF"
...


 Output is

  • a report "PROBE_RESULTS_S2_date" witch after rename from .MPF to .CSV can be opened in Excel

  • a NC program that can be executed so Zero correction is restored.

 

Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.0

Re: Lock code for R parameters

Robert,

 

I would define your own parameters into the GUDs.

I do this for holding values that I do not want anyone to change. They are still accessible but the chance of an operator finding them and altering your own specific parameters would have to be mailcious!

You can create your own GUD or add your variables to an existing GUD by defining them inside the Definition file of that GUD.

As with any Siemens work Archive before and after your changes!!!!

 

Thanks,

Craig.

Learn online





Solution Information