Herunterladen Inhalt Inhalt Diese Seite drucken

Mitsubishi Electric MELFA CR750 Bedienungs- Und Programmieranleitung Seite 783

Industrieroboter
Inhaltsverzeichnis

Werbung

Programmfunktionen und -beispiele
switch(msg[0]) {
}
cout << " Input head bit No. (0 to 32767)-> ";
cin.getline(msg, MAXBUFLEN);
if(msg[0]!=0) IOBitTop = atoi(msg);
else IOBitTop = 0;
if(IOSendType==MXT_IO_OUT) { // Nur für Ausgangssignal
}
}
cout <<" --- Input the data type of command. --- \n";
cout <<"[0: None / 1: XYZ / 2:JOINT / 3: PULSE]\n".;
cout <<" -- please input the number -- [0] - [3]->";
cin.getline(msg, MAXBUFLEN);
type = atoi(msg);
for(int k=0; k<4; k++) {
sprintf (msg," --- input the data type of monitor ( %d-th ) --- \n", k); .
cout << msg;
cout << "[0: None]\n";
cout << "[1: XYZ / 2:JOINT / 3: PULSE] Command value \n";
cout << "[4: XYZ/ 5: JOINT/ 6: PULSE] Command value after the filter process \n";
cout << "[7: XYZ/ 5:JOINT/ 6:PULSE] Feedback value. \n";
cout << "[10: Electric current value / 11: Electric current feedback] ... Electric current value. \n";
cout << "Input the numeral [0] to [11] -> ";
cin.getline(msg, MAXBUFLEN);
type_mon[k] = atoi(msg);
}
sprintf(msg, "IP=%s / PORT=%d / Send Type=%d / Monitor Type0/1/2/3=%d/%d/%d/%d"
, dst_ip_address, port , type
, type_mon[0], type_mon[1], type_mon[2], type_mon[3]);
cout << msg << endl;
cout << "[Enter]= End / [d]= Monitor data display";
cout << "[z/x]= Increment/decrement first command data transmitted by the delta amount. ";
cout << " Is it all right? [Enter] / [Ctrl+C] ";
cin.getline(msg, MAXBUFLEN);
// Initialisierung der Windows-Socket-DLL
status=WSAStartup(MAKEWORD(1, 1), &Data);
if (status != 0)
cerr << "ERROR: WSAStartup unsuccessful" << endl;
CR750/CR751
case 'O'://Ziel für das Ausgangssignal setzen
case 'o':
IOSendType = MXT_IO_OUT;
IORecvType = MXT_IO_OUT;
break;
case 'I':// Ziel für das Einganssignal setzen
case 'i':
default:
IOSendType = MXT_IO_NULL;
IORecvType = MXT_IO_IN;
break;
cout << "Input bit mask pattern for output as hexadecimal (0000 to FFFF)-> ";
cin.getline(msg, MAXBUFLEN);
if(msg[0]!=0) sscanf(msg,"%4x",&IOBitMask);
else IOBitMask = 0;
cout << "Input bit data for output as hexadecimal (0000 to FFFF)-> ";
cin.getline(msg, MAXBUFLEN);
if(msg[0]!=0) sscanf(msg,"%4x",&IOBitData);
else IOBitData = 0;
Beispielprogramme
11 - 17

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis