VTI Instruments Corp.
122
EX10xxA Programming
E
XAMPLE
P
ROGRAM
#include <stdio.h>
#include <windows.h>
#include <vtex10xxA.h>
#define INSTR_RESRC_STR"TCPIP::192.168.0.127::INSTR"
#define TYPE_V
VTEX10XXA_CONV_MV
#define TYPE_T
VTEX10XXA_CONV_THERMO_TYPE_T
#define TYPE_E
VTEX10XXA_CONV_THERMO_TYPE_E
#define NUM_CHANNELS
11
#define NUM_V_CHANNELS
2
#define NUM_E_CHANNELS
4
#define NUM_T_CHANNELS
5
#define TRIG_TIMER
0.2
/* (5 readings per sec) */
#define MAX_SCANS
1000
#define MAX_DATA
(NUM_CHANNELS * MAX_SCANS)
int main( int argc, char **argv )
{
ViSession
vi;
ViStatus
status;
/* scanlist entries for EX1032A */
/* channel 0 - 15: voltage channels, 16 - 47: thermocouple channels */
ViInt32
channels[NUM_CHANNELS] = {0,1,3,6,10,15,24,30,31,32,35};
ViInt32
v_channels[NUM_V_CHANNELS] = {0,1};
ViInt32
e_channels[NUM_E_CHANNELS] = {3,6,10,15};
ViInt32
t_channels[NUM_T_CHANNELS] = {24,30,31,32,35};
ViInt32
i, j;
ViReal64
ts_secs[MAX_SCANS], ts_fsecs[MAX_SCANS];
ViInt32
numscans;
ViReal64
data[MAX_DATA];
ViInt32
numdata;
/* open a session */
status = vtex10xxA_init(INSTR_RESRC_STR, VI_ON, VI_ON, &vi);
if(status != VI_SUCCESS)
{
printf("ERROR OPENING CONNECTION\n");
return -1;
}
printf("Connection opened to %s\n", INSTR_RESRC_STR);
/* configure the scan list */
status = vtex10xxA_set_scanlist(vi, channels, NUM_CHANNELS);
if(status != VI_SUCCESS)
{
printf("ERROR CONFIGURING SCAN LIST\n");
return -1;
}
/* configure the EU conversions */
status = vtex10xxA_set_channel_conversion(vi, v_channels, NUM_V_CHANNELS, TYPE_V);
if(status != VI_SUCCESS)
{
printf("ERROR CONFIGURING EU CONVERSIONS\n");
return -1;
Summary of Contents for EX1000A
Page 28: ...VTI Instruments Corp 28 EX10xxA Introduction EX1044 DIAGRAM ...
Page 29: ...www vtiinstruments com EX10xxA Introduction 29 FIGURE 1 5 EX1044 TABLE TOP USAGE ...
Page 34: ......
Page 56: ......
Page 74: ......
Page 130: ......
Page 282: ......