Mitsubishi Electric CR800 Series Ethernet Function Instruction Manual page 138

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

Advertisement

4 Appendix
union rtdata2 {
POSE
JOINT jnt2;
PULSE pls2;
long
} dat2;
unsigned short
union rtdata3 {
POSE
JOINT jnt3;
PULSE pls3;
long
} dat3;
} MXTCMD;
■ Source file sample.cpp
// sample.cpp
// Change the definition in the "strdef.h" file by the S/W version of the controller.
// Refer to the "strdef.h" file for details.
//
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
#include <iostream>
#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
using namespace std;
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
char msg[MAXBUFLEN];
char buf[MAXBUFLEN];
char type,type_mon[4];
unsigned short IOSendType=0;
unsigned short IORecvType=0;
unsigned short IOBitTop=0;
4-18
pos2;
lng2[8];
RecvType3;
pos3;
lng3[8];
port;
// Monitor data 2
// XYZ type [mm/rad]
// JOINT type [mm/rad]
// PULSE type [mm/rad] or Integer type [% / non-unit]
// Integer type [% / non-unit]
// Reply data-type specification 3
// Monitor data 3
// XYZ type [mm/rad]
// JOINT type [mm/rad]
// PULSE type [mm/rad] or Integer type [% / non-unit]
// Integer type [% / non-unit]
// Send input/output signal data designation
// Reply input/output signal data designation

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr751 seriesCr750 series

Table of Contents