![Mitsubishi Electric CR750 Series Скачать руководство пользователя страница 620](http://html.mh-extra.com/html/mitsubishi-electric/cr750-series/cr750-series_instruction-manual_238840620.webp)
Appendix-600
Real-time external control function
7Appendix
JOINT jnt2; // JOINT type [mm/rad] .
PULSE pls2; // PULSE type [mm/rad] or Integer type [% / non-unit].
long lng2[8];// Integer type [% / non-unit] .
} dat2;
unsigned short RecvType3;// Reply data-type specification 3 .
unsigned short reserve3; // Reserved 3
union rtdata3 {// Monitor data 3 .
POSE pos3;// XYZ type [mm/rad] .
JOINT jnt3;// JOINT type [mm/rad] .
PULSE pls3;// PULSE type [mm/rad] or Integer type [% / non-unit].
long lng3[8];// Integer type [% / non-unit] .
} dat3;
} MXTCMD;
b)Source file sample.cpp
// sample.cpp
#include <windows.h>
#include <iostream.h>
#include <winsock.h>
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <math.h>
#include "strdef.h"
#define NO_FLAGS_SET 0
#define MAXBUFLEN 512
INT main(VOID)
{
WSADATA Data;
SOCKADDR_IN destSockAddr;
SOCKET destSocket;
unsigned long destAddr;
int status;
int numsnt;
int numrcv;
char sendText[MAXBUFLEN];
char recvText[MAXBUFLEN];
char dst_ip_address[MAXBUFLEN];
unsigned short port;
char msg[MAXBUFLEN];
char buf[MAXBUFLEN];
char type, type_mon[4];
unsigned short IOSendType;// Send input/output signal data designation
unsigned short IORecvType;// Reply input/output signal data designation
unsigned short IOBitTop=0;
unsigned short IOBitMask=0xffff;
unsigned short IOBitData=0;
cout << " Input connection destination IP address (192.168.0.1) ->";
cin.getline(dst_ip_address, MAXBUFLEN);
if(dst_ip_address[0]==0) strcpy(dst_ip_address, "192.168.0.1");
cout << " Input connection destination port No. (10000) -> ";