Mitsubishi Electric CR800 Series Ethernet Function Instruction Manual page 139

Electric industrial robot
Hide thumbs Also See for CR800 Series:
Table of Contents

Advertisement

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)
cout << " Input connection destination port No. (10000) -> ";
cin.getline(msg, MAXBUFLEN);
if(msg[0]!=0)
port=atoi(msg);
else
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':
case 'o':
IOSendType = MXT_IO_OUT;
IORecvType = MXT_IO_OUT;
break;
case 'I':
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) {
cout << " Input bit mask pattern for output as hexadecimal (0000 to FFFF)-> ";
cin.getline(msg, MAXBUFLEN);
if(msg[0]!=0)
else
cout << " Input bit data for output as hexadecimal (0000 to FFFF)-> ";
cin.getline(msg, MAXBUFLEN);
if(msg[0]!=0)
else
}
}
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";
strcpy(dst_ip_address, "192.168.0.20");
port=10000;
// Set target to output signal
// Set target to input signal
// Only for output signal
sscanf(msg,"%4x",&IOBitMask);
IOBitMask = 0;
sscanf(msg,"%4x",&IOBitData);
IOBitData = 0;
4 Appendix
4-19

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr751 seriesCr750 series

Table of Contents