<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4020.12">
  <POU Name="PRG_ReadWriteRPar" Id="{a2153bc1-1387-4770-8951-58695d949088}" SpecialFunc="None">
    <Declaration><![CDATA[PROGRAM PRG_ReadWriteRPar
VAR

	FB_WriteRPar: FB_WriteRParams;
	FB_ReadRPar:FB_ReadRParams;
	
	breadRPar: BOOL;
	bWriteRPar: BOOL;
END_VAR
]]></Declaration>
    <Implementation>
      <ST><![CDATA[(*=====================================================
	nRParamRead:					ARRAY [1..nMaxNumberOfNciChannels, nStartIndexReadRParam..nEndIndexReadRParam] OF LREAL;	(* elements of RParam are read every second *)
	nRParamWrite:					ARRAY [1..nMaxNumberOfNciChannels, nStartIndexWriteRParam..nEndIndexWriteRParm] OF LREAL;	(* elements of RParam are write every second *)
R变量的读写已经在全局变量里预定义好了数组

================================================================*)




nRParamWrite[1,0]:=arrAxis_Ref[1].NcToPlc.ActPos;
nRParamWrite[1,1]:=arrAxis_Ref[2].NcToPlc.ActPos;
nRParamWrite[1,2]:=arrAxis_Ref[3].NcToPlc.ActPos;

//bWriteRPar:=bMFunc[1, 50] ;


FB_WriteRPar(
	bExec:=bWriteRPar , 
	bBusy:= , 
	nChan:=1 , 
	nErrId=> , 
	bErr=> );	
	
FB_ReadRPar(
	bExec:=breadRPar , 
	bBusy:= , 
	nChan:=1 , 
	nErrId=> , 
	bErr=> );]]></ST>
    </Implementation>
    <LineIds Name="PRG_ReadWriteRPar">
      <LineId Id="3" Count="14" />
      <LineId Id="40" Count="0" />
      <LineId Id="18" Count="12" />
      <LineId Id="2" Count="0" />
    </LineIds>
  </POU>
</TcPlcObject>