//#include "TURBO_PMAC2_AddrAndParamConfigure.h" ;
//#include "ZP350_IMConfig.h" ;
//#include "ZP350_AppDef.h"
//#include "ZP350_Param.h"
//#include "ZP350_ControlKeyPLC.pmc";
#define SIC0Ch1ADCA M105//Y
#define SIC0Ch2ADCA M305//Z
#define SIC0Ch3ADCA M205//A
//#define SIC0Ch4ADCA M405
#define LED20 M0
#define LED40 M2
#define LED60 M4
#define LED80 M5
#define LED100 M6
CLOSE ;
OPEN PLC2 ;
CLEAR
#1j/
#2j/
#3j/
#4j/
//滤波增量
rAxisYFilterInc = 0
rAxisZFilterInc = 0
rAxisAFilterInc = 0
rFeedRate = 1;
rFeedRateKeyState = FALSE;
//初始化速度设置
LED20 = TRUE;
LED40=FALSE;
LED60=FALSE;
LED80=FALSE;
LED100=FALSE;
//对采集缓存初始化
rCountWhile = 0
While (rCountWhile < ControlPanel_SAMPLE_NUM)
P(AxisYFilterPointer + rCountWhile) = 0;
P(AxisZFilterPointer + rCountWhile) = 0;
P(AxisAFilterPointer + rCountWhile) = 0;
rCountWhile = rCountWhile+1;
EndWhile
While (rbControlpanelFlag = TRUE)
//=============================读取ADC=================================
P(AxisYFilterPointer + rAxisYFilterInc) = SIC0Ch1ADCA-SIC0Ch1ADCAOffset;/CONTROL_PANEL_Y_MAX_VALUE*100
P(AxisZFilterPointer + rAxisZFilterInc) = SIC0Ch2ADCA-SIC0Ch2ADCAOffset;/CONTROL_PANEL_Z_MAX_VALUE*100
P(AxisAFilterPointer + rAxisAFilterInc) = SIC0Ch3ADCA-SIC0Ch3ADCAOffset;/CONTROL_PANEL_A_MAX_VALUE*100
//============================读取ADC结束==============================
rAxisYFilterInc = rAxisYFilterInc+1;
rAxisZFilterInc = rAxisZFilterInc+1;
rAxisAFilterInc = rAxisAFilterInc+1;
//===========================&