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

Page 48

Advertising
background image

1 - 34

IP

N 07

4-

45

4-

P1

B

XTC/3 Communications Library Operating Manual

1.3.2.20 getOutAll

int getOutAll (OutAllData *val, char* ErrMsg, unsigned short *len, BOOL TCP);

Description

There are NUM_OF_RELAYS relays and NUM_OF_TTLs TTLs in the XTC/3
instrument. Each relay and TTL can be programmed to react to a certain event.
This function will fill the OutAllData structure with these events from the XTC/3
instrument. See User’s Guide document for event numbers and description.

Arguments

OutAllData * val:

This structure will contain each relay or TTL event
(XTC3_NUM_OF_OUTPUTS bytes). See User’s Guide document for event
numbers and description.

char* ErrMsg

BOOL TCP

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);
OutAllData val;
unsigned short len = 0;
getOutAll(&val, ErrStr, &len, TRUE);
if(*ErrStr == 0)
{

printf("Data Transfer successful\n");
printf("Relay Events are:\n");
for(int i = 0; i < NUM_OF_RELAYS; i++)

printf("%d\n",val.m_Data[i]);

printf("TTL Events are:\n");
for(; i < XTC3_NUM_OF_OUTPUTS ; i++)

printf("%d\n",val.m_Data[i]);

}
else

printf(ErrStr);

CloseSocket();

}

Advertising