/* */ #pragma once #include "KDefine.h" class KMachine { public: KMachine::KMachine(); KMachine::~KMachine(); stKMem KMem; double StartTime; int nScanCount = 0; int ProgTrace[2048] = { 0 }; stBinProg1 BinProgs[2000]; int nBinProgSteps = 0; int m_bPlcRunning = 0; double GetTimemS(); int GetTick100uS(); int Init(); int Download(stBinProg1 * pBinrog, int nBinSteps); int Upload(); int StartPLC(); int StopPLC(); int AddMonitor(); int ClearMonitor(); int DoMonitor(); int GetCoilValue(int nCoilType, int nCoilAddr); int SetCoilValue(int nCoilType, int nCoilAddr, int nCoilValue); int GetVarData(int nDataType, int nDataAddr); int SetVarData(int nDataType, int nDataAddr, int nDataValue); int InitTimer(int nIndex, int nType); int RunTimer(int nIndex, int SV); int StopTimer(int nIndex); int ResetTimer(int nIndex); int SetTimerValue(int nIndex, int bSet, int SV); int ProcessTimer(int nIndex); int IsTimerOn(int nIndex); int GetTimerSV(int nIndex); int GetTimerEV(int nIndex); int PushInVal(void); int PopOutVal(void); // int ProcessPLCProg(const stProg * prog, int nSize); int ProcPLC(); int ProcessPLCBinProg(const stBinProg1 * pBinprog, int nSize); };