EasyManua.ls Logo

Mitsubishi Electric CR800 Series - Page 138

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-18
union rtdata2 { // Monitor data 2
POSE pos2; // XYZ type [mm/rad]
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
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;
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 port;
char msg[MAXBUFLEN];
char buf[MAXBUFLEN];
char type,type_mon[4];
unsigned short IOSendType=0; // Send input/output signal data designation
unsigned short IORecvType=0; // Reply input/output signal data designation
unsigned short IOBitTop=0;

Table of Contents

Other manuals for Mitsubishi Electric CR800 Series

Related product manuals