beautypg.com

INFICON XTC/3 Thin Film Deposition Controller Communications Library Operating Manual User Manual

Page 74

background image

1 - 60

IP

N 07

4-

45

4-

P1

B

XTC/3 Communications Library Operating Manual

Example

#include "XTC3Lib.h"
void main()
{

if(StartSocket()==0)

printf("Socket could not be initialized.");

if(!ConnectSocket("10.211.70.209"))

printf("Socket could not be connected!");

char ErrStr[256];
memset(ErrStr,0,256);
ProcInfoData val;
unsigned short len = 0;
getProcInfo(&val, 1, ErrStr, &len, TRUE);
if(*ErrStr == 0)
{

printf("Data Transfer successful\n");
int freq = 0;
memcpy(&freq,val.m_Data + 5, 4);
printf("The frequency at this time is: %2.6f\n",
0.0034924596 * freq);

}
else

printf(ErrStr);

CloseSocket();

}