admin管理员组文章数量:1531374
2024年6月29日发(作者:)
三菱PLC编程口通信C语言源代码 - 三菱
plc
fxnew.h
#define DELAY_TIMES 30000L
#define TRUE 1
#define FALSE 0
#define TRUE 1
#define FALSE 0
#define FORCE_ON 0x37
#define FORCE_OFF 0x38
void init_plc(void);
int check_plc(void);
int _read_data_register(unsigned int uAddress,unsigned int
number);
int _read_mdata_register(unsigned int uAddress,unsigned int
number);
int _write_data_register(unsigned int uAddress,unsigned int
number);
int _force_m_contact(unsigned int uAddress,unsigned char
ucOn_off);
int read_data_register(unsigned int uAddress,unsigned int
1
number);
int read_mdata_register(unsigned int uAddress,unsigned int
number);
int write_data_register(unsigned int uAddress,unsigned int
number);
int force_m_contact(unsigned int uAddress,unsigned char
ucOn_off);
int _read_m_register(unsigned int uAddress,unsigned int
number);
int read_m_register(unsigned int uAddress,unsigned int
number);
int TESTING=0;
unsigned int uRead_value[25];
unsigned int uWrite_value[25];
unsigned int COMM_PORT=1;
unsigned int STATS_PORT=0x2fd;
unsigned int DATA_PORT=0x2f8;
void init_plc(void)
{ _AX=0xfa;
_DX=COMM_PORT;
geninterrupt(0x14);
while((inportb(STATS_PORT)1)!=0)inportb(DATA_PORT);
2
版权声明:本文标题:三菱PLC编程口通信C语言源代码三菱plc 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1719622988a788172.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论