EasyManua.ls Logo

Mitsubishi Electric CR800 Series - Page 139

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-19
unsigned short IOBitMask=0xffff;
unsigned short IOBitData=0;
cout << " Input connection destination IP address (192.168.0.20) ->";
cin.getline(dst_ip_address, MAXBUFLEN);
if(dst_ip_address[0]==0) strcpy(dst_ip_address, "192.168.0.20");
cout << " Input connection destination port No. (10000) -> ";
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";

Table of Contents

Other manuals for Mitsubishi Electric CR800 Series

Related product manuals