Herunterladen Inhalt Inhalt Diese Seite drucken

Mitsubishi Electric MELSEC System Q Bedienungsanleitung Seite 443

Speicher programmierbare steuerungen
Vorschau ausblenden Andere Handbücher für MELSEC System Q:
Inhaltsverzeichnis

Werbung

An hang
hostdata.sin_fam ily=AF_INET;
hostdata.sin_port=sc.my_port;
hostdata.sin_addr.s_addr=sc.my_addr.s_addr;
if(bind(socketno,(LPSOCKADDR)&hostdata,sizeof(hostdata))!=SOCK_OK){
}
aj71e71.sin_fam ily=AF_INET;
aj71e71.sin_port=sc.aj_port;
aj71e71.sin_addr.s_addr=sc.aj_addr.s_addr;
if(con nect(socketno,(LPSOCKADDR)&aj71e71,sizeof(aj71e71))!=SOCK_OK){
}
Closeflag=FLAG_ON;
// Set to non-block ing mode
ulCmdArg = 1;
ioctlsocket(socketno, FIONBIO, &ulCmdArg);
//
strcpy((char *)(s_buf), "03FF000A4420000000000500112233445566778899AA");
strcpy((char *)(s_buf),"500000FF03FF00002C000A14010000D
length = strlen((char *)(s_buf));
if(send(socketno, (char *)(s_buf), length, 0) == SOCKET_ERROR) {
}
printf(„\n send data\n%s\n",s_buf);
(Fort set zung auf der nächs ten Seite)
MELSEC System Q Ethernet-Module
Sockerror(ERROR_BIND);
return(SOCK_NG);
Sockerror(ERROR_CON NECT);
return(SOCK_NG);
Sockerror(ERROR_SEND);
return (SOCK_NG);
Programmbeispiel für ein verbundenes Gerät
// Bind
// Error han dling
// Con nec tion (Active open)
// Error han dling
// Con nec tion com ple tion flag ON
// Set to non-block ing mode
// D0 to D4 batch write request (1E frame)
*0000000005112233445566778899AA");
// D0 to D4 batch write request (3E frame)
// Data send ing
// Error han dling
A - 53

Werbung

Inhaltsverzeichnis
loading

Diese Anleitung auch für:

Qj71e71-b2Qj71e71-b5Qj71e71-100

Inhaltsverzeichnis