EasyManua.ls Logo

Mitsubishi Electric CR800 Series - Releasing Brake of One Axis; Releasing Brakes of Multiple Axes

Mitsubishi Electric CR800 Series
146 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4 Appendix
4-24
if(loop==1) {
memcpy(&pls_now, &MXTrecv.dat.pls, sizeof(PULSE));
loop = 2;
}
if(disp) {
PULSE *l=(PULSE*)DispData;
sprintf(buf, "Receive (%ld): TCount=%d
Type(PULSE/OTHER)=%d¥n %ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld (%s)"
,MXTrecv.CCount,MXTrecv.TCount,DispType
,l->p1, l->p2, l->p3, l->p4, l->p5, l->p6, l->p7, l->p8, str);
cout << buf << endl;
}
break;
case MXT_TYP_NULL:
if(loop==1) {
loop = 2;
}
if(disp) {
sprintf(buf, "Receive (%ld): TCount=%d Type(NULL)=%d¥n (%s)"
,MXTrecv.CCount,MXTrecv.TCount, DispType, str);
cout << buf << endl;
}
break;
default:
cout << "Bad data type.¥n" << endl;
break;
}
counter++; // Count up only when communication is successful
retry=0; // Leave reception loop
}
else { // Reception timeout
cout << "... Receive Timeout! <Push [Enter] to stop the program>" << endl;
retry--; // No. of retries subtraction
if(retry==0) loop=0; // End program if No. of retries is 0
}
} /* while(retry) */
} /* while(loop) */
// End
cout << "/// End /// ";
sprintf(buf, "counter = %ld", counter);
cout << buf << endl;
// Close socket
status=closesocket(destSocket);
if (status == SOCKET_ERROR)
cerr << "ERROR: closesocket unsuccessful" << endl;
status=WSACleanup();
if (status == SOCKET_ERROR)
cerr << "ERROR: WSACleanup unsuccessful" << endl;
return 0;
}

Table of Contents

Other manuals for Mitsubishi Electric CR800 Series

Related product manuals