laoxu_plc/编译型/PLC51(V1.06)/PLC51/input.C

107 lines
6.4 KiB
C++
Raw Normal View History

2018-11-13 21:59:08 +08:00
/*----------------------------------------------------------------------------------------------------*/
/* */
/* PLC <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD>룩ת 51 C <20><><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
/* */
/* Ϊ<><CEAA>ֹ PLC ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> C <20><><EFBFBD>Թؼ<D4B9><D8BC>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ع涨<D8B9><E6B6A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PLC ָ<><D6B8>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>»<EFBFBD><C2BB><EFBFBD>"_"<22><><EFBFBD><EFBFBD><EFBFBD>е㣨BIT<49>ͣ<EFBFBD> */
/* ǰ<><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>»<EFBFBD><C2BB><EFBFBD>"_"<22><><EFBFBD><EFBFBD><EFBFBD>е㣨WORD<52>ͣ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>»<EFBFBD><C2BB><EFBFBD>"_"<22><>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC><EFBFBD>","<22>ָ<EFBFBD><D6B8><EFBFBD> */
/* <20><>ʾ<EFBFBD><CABE> C <20><><EFBFBD>Թؼ<D4B9><D8BC><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><D3A6> AVR<56><52>STM8<4D><38>NEC<45><43>PIC<49><43>H8<48><38>STM32......<2E><><EFBFBD>κε<CEBA>Ƭ<EFBFBD><C6AC><EFBFBD><EFBFBD> */
/* δʹ<CEB4><CAB9> 51<35><31>Ƭ<EFBFBD><C6AC><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> bit <20><><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>ȳ<EFBFBD><C8B3><EFBFBD><EFBFBD>޸<EFBFBD><DEB8>ȶ<EFBFBD><C8B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>Ż<EFBFBD><C5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3AC><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD>ٶȣ<D9B6> */
/* ʹ֮<CAB9><D6AE><EFBFBD>ʺ<EFBFBD> 51<35><31>Ƭ<EFBFBD><C6AC><EFBFBD><EFBFBD>ʹ<EFBFBD>á<EFBFBD> */
/* */
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD>ֻ<EFBFBD><D6BB>ϱ<EFBFBD><CFB1>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD> PLC ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>п<EFBFBD><D0BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> C <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4A3AC><EFBFBD><EFBFBD> C <20><><EFBFBD>Թ淶<D4B9>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䡣 */
/* <20><>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD>еĵ<D0B5><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>öϵ㣬<CFB5><E3A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0B2BD><EFBFBD><EFBFBD><EFBFBD>٣<EFBFBD><D9A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD>ٵ<EFBFBD><D9B5>ֶε<D6B6><CEB5><EFBFBD> PLC <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĺͼ<C4BA><CDBC><EFBFBD> */
/* PLC <20><>Ԫ<EFBFBD><D4AA>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>ʹ֮<CAB9><D6AE><EFBFBD>ʺϹ<CABA><CFB9><EFBFBD><EFBFBD><EFBFBD>Ƭ<EFBFBD><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>á<EFBFBD> */
/* */
/* Ŀǰ֧<C7B0><D6A7><EFBFBD><EFBFBD><EFBFBD>е<D0B5><E3A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD> */
/* _X0_---_X57_<37><5F>_Y0_---_S57_<37><5F>_M0_---_M255_<35><5F>_S0_---_S255_<35><5F>_T0---_T31<33><31>_C0---_C31<33><31>_D0---_D31; */
/* */
/* Ŀǰ֧<C7B0>ֳ<EFBFBD><D6B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD> */
/* K <20><>Χ<EFBFBD><CEA7>-32768---32767; H <20><>Χ<EFBFBD><CEA7>0---FFFFH; */
/* */
/* Ŀǰ֧<C7B0><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD> */
/* _M8000_<30><5F>_M8001_<31><5F>_M8002_<32><5F>_M8003_<33><5F>_M8004_<34><5F>_M8011_<31><5F>_M8012_<32><5F>_M8013_<33><5F>_M8014_<34><5F> */
/* _M8020_<30><5F>_M8021_<31><5F>_M8022_<32><5F> */
/* */
/* Ŀǰ֧<C7B0><D6A7><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><D0BB><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չָ<D5B9><EFBFBD><EEA3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD> */
/* _LD,_LDI,_AND,_ANI,_OR,_ORI,_INV,_OUT(_OUT_T,_OUT_C),_SET,_RST,_ANB,_ORB,_LDP,_LDF,_ANDP,_ANDF, */
/* _ORP,_ORF,_PLS,_PLF,_MPS,_MRD,_MPP,_NOP,END,_ADD,_SUB,_MUL,_DIV,_INC,_DEC,_WAND,_WOR,_WXOR, */
/* _NEG,_ALT,_MOV,_CML,_XCH,_BCD,_BIN,_LD>=,_LD<=,_LD>,_LD<,_LD<>,_LD=,_AND>=,_AND<=,_AND>,_AND<, */
/* _AND<>,_AND=,_OR>=,_OR<=,_OR>,_OR<,_OR<>,_OR=; */
/* */
/* <20><><EFBFBD><EFBFBD> C<><43><EFBFBD><EFBFBD><EFBFBD>޷<EFBFBD>ʶ<EFBFBD><CAB6><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><D0B7>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>д<EFBFBD><D0B4>ʾ<EFBFBD><CABE> */
/* <20><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>(>=) _GE<47><45>С<EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>(<=) _LE<4C><45><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(>) _GT<47><54>С<EFBFBD><D0A1>(<) _LT<4C><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<>) _NE<4E><45><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(=) _EQ; */
/* <20><>ָ<EFBFBD><EFBFBD><EEBCAF>_LD>=,_LD<=,_LD>,_LD<,_LD<>,_LD=,_AND>=,_AND<=,_AND>,_AND<,_AND<>,_AND=, */
/* _OR>=,_OR<=,_OR>,_OR<,_OR<>,_OR=; */
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD>д<EFBFBD><D0B4>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PLC <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD> */
/* _LD_GE,_LD_LE,_LD_GT,_LD_LT,_LD_NE,_LD_EQ,_AND_GE,_AND_LE,_AND_GT,_AND_LT,_AND_NE,_AND_EQ, */
/* _OR_GE,_OR_LE,_OR_GT,_OR_LT,_OR_NE,_OR_EQ; */
/* */
/* */
/* CPU : 51ϵ<31>е<EFBFBD>Ƭ<EFBFBD><C6AC> */
/* <20><><EFBFBD><EFBFBD> : 11.0592MHz */
/* <20><><EFBFBD><EFBFBD> : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
/* <20>汾 : V1.01 */
/* <20><><EFBFBD><EFBFBD> : 2009.6.18 */
/* <20><>Ȩ : ourDEV.cn */
/* */
/*----------------------------------------------------------------------------------------------------*/
#include "plc_start.h"
//-------------------------------------------------------------------------------------//
// PLC ִ<>г<EFBFBD><D0B3><EFBFBD> //
//-------------------------------------------------------------------------------------//
void main_PLC(void)
{
_LD (_M8002_)
_RST (_D0)
_LDP (_X0_)
_MOV (1,_D0)
_LDP (_X1_)
_MOV (2,_D0)
_LDP (_X2_)
_MOV (3,_D0)
_LDP (_X3_)
_MOV (4,_D0)
_LDP (_X4_)
_MOV (5,_D0)
_LDP (_X5_)
_MOV (6,_D0)
_LDP (_X6_)
_MOV (7,_D0)
_LDP (_X7_)
_MOV (8,_D0)
_LDP (_X10_)
_MOV (9,_D0)
_LDP (_X11_)
_MOV (10,_D0)
_LDP (_X12_)
_MOV (11,_D0)
_LDP (_X13_)
_MOV (12,_D0)
_LDP (_X20_)
_MOV (13,_D0)
_LDP (_X21_)
_MOV (14,_D0)
_LDP (_X22_)
_MOV (15,_D0)
_LDP (_X23_)
_MOV (16,_D0)
_LDP (_X24_)
_MOV (17,_D0)
_LDP (_X25_)
_MOV (18,_D0)
_LDP (_X26_)
_MOV (19,_D0)
_LDP (_X27_)
_MOV (20,_D0)
_LD (_M8000_)
_BCD (_D0,_D31)
_END
}