![Mitsubishi Electric CR750 Series Скачать руководство пользователя страница 621](http://html.mh-extra.com/html/mitsubishi-electric/cr750-series/cr750-series_instruction-manual_238840621.webp)
7Appendix
Real-time external control function
Appendix-601
cin.getline(msg, MAXBUFLEN);
if(msg[0]!=0) port=atoi(msg);
else port=10000;
cout << " Use input/output signal?([Y] / [N])-> ";
cin.getline(msg, MAXBUFLEN);
if(msg[0]!=0 && (msg[0]=='Y' || msg[0]=='y')) {
cout << "What is target? Input signal/output signal([I]nput / [O]utput)-> ";
cin.getline(msg, MAXBUFLEN);
switch(msg[0]) {
case 'O':// Set target to output signal
case 'o':
IOSendType = MXT_IO_OUT;
IORecvType = MXT_IO_OUT;
break;
case 'I':// Set target to input signal
case 'i':
default:
IOSendType = MXT_IO_NULL;
IORecvType = MXT_IO_IN;
break;
}
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) { // Only for output signal
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;
}
}
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);