G-code: CNC_Table2
N01 G01 X20 Y20 F10 E100 E-100
Variable declaration section:
//FB instances
NCDecoder : PMC_NCDecoder;
Interpolator2D : PMC_ Interpolator2D;
//Variables
buf: ARRAY[0..10] OF SMC_GEOINFO; //Buffer for decoding
iSequence: : INT; //Execution control No.
Control section:
Case iSequence OF
1:
NCDecoder(nSizeOutQueue := SIZEOF(buf),pbyBufferOutQueue := ADR(buf),
ncprog := CNC_Table1,bExecute:= TRUE, bAppend:=TRUE);
Interpolator2D(Axisx:=X_Drive,Axisy:=Y_Drive,bExecute:=TRUE,
poqDataIn:=NCDecoder.poqDataOut,dwIpoTime:=1000,);
IF Interpolator2D.bDone THEN
iSequence:=2;
END_IF
2:
NCDecoder(nSizeOutQueue := SIZEOF(buf), pbyBufferOutQueue := ADR(buf),
ncprog := CNC_Table1, bExecute:= FALSE, bAppend:=TRUE);
Interpolator2D(Axisx:=X_Drive,Axisy:=Y_Drive,bExecute:=FALSE,
poqDataIn:=NCDecoder.poqDataOut,dwIpoTime:=1000,);
iSequence := 3;
3:
NCDecoder(nSizeOutQueue := SIZEOF(buf), pbyBufferOutQueue := ADR(buf),
ncprog := CNC_Table2, bExecute:= TRUE, bAppend:=TRUE);
Interpolator2D(Axisx:=X_Drive,Axisy:=Y_Drive,bExecute:=TRUE,
poqDataIn:=NCDecoder.poqDataOut,dwIpoTime:=1000,);
END_CASE
● The first CNC table is specified in PMC_NCDecoder, which is then executed together with
PMC_Interpolator2D.
●
After the first instance of PMC_NCDecoder is completed, the second CNC table is specified
in PMC_NCDecoder, which is then executed again.
■
Repeating CNC tables
● PMC_NCDecoder
Movements between each CNC table repeated are performed by C-point control.
11.5 Multi-axis Operation
WUME-GM1RTXOP-01 11-93