Retrieval of setup data and configuration – Yokogawa PC-Based MX100 User Manual

Page 406

Advertising
background image

7-8

IM MX190-01E

Retrieval of Setup Data and Configuration

Program Example 2

This program executes the following two items. This program contains both items,
but each item can be written and executed separately.

• Retrieval of setup data
• Setting a DC voltage range to the channel

//////////////////////////////////////////////////////////////
// DARWIN sample for configuration
#include <stdio.h>
#include "DAQDARWIN.h"////////////////////////////////////////
//////////////////////
int main(int argc, char* argv[])
{
int rc; //return code
CDAQDARWIN daqdarwin; //class
int flag;
char line[BUFSIZ];
int len;
//connect
rc = daqdarwin.open("192.168.1.11");
//get
rc = daqdarwin.talkOperationData(0, 1, 0, 2);
do {
rc = daqdarwin.getSetDataByLine(line, BUFSIZ, &len,
&flag);
} while (! (flag & DAQDARWIN_FLAG_ENDDATA));
//range
rc = daqdarwin.setVOLT(DAQDARWIN_RANGE_VOLT_20MV, 0, 1, 2,
0, 0, 0, 0, 0);
//disconnect
rc = daqdarwin.close();
return rc;
}
//////////////////////////////////////////////////////////////

7.3 Programming - DARWIN/Visual C ++ -

Advertising