Fluke Norma 4000 User Manual page 170

Guide for remote control for power analyzer
Hide thumbs Also See for Norma 4000:
Table of Contents

Advertisement

Remote Control
Users Guide
6-12
* Use function viSetAttribute to change the timeout value (default is 10
sec).
*/
#include <visa.h>
#include <stdio.h>
#define INTFC_RS232 1
#define INTFC_GPIB
2
#define INTFC_LAN
3
#define INTFC_USB
4
#if 1
#define INTFC
INTFC_RS232
#elif 1
#define INTFC
INTFC_GPIB
#elif 1
#define INTFC
INTFC_LAN
#else
#define INTFC
INTFC_USB
#endif
#if INTFC == INTFC_RS232
#
define RSRC_NAME
#
define RSRC_ATTR_BAUD
#
define RSRC_ATTR_FLOW_CNTRL VI_ASRL_FLOW_RTS_CTS
#elif INTFC == INTFC_GPIB
#
define RSRC_NAME
#elif INTFC == INTFC_LAN
#
define RSRC_NAME
#elif INTFC == INTFC_USB
#
define RSRC_NAME
#else
#error 'INTFC': unsupported value
#endif
ViSession
rm,
vi;
ViChar
buffer[512];
ViUInt32
retCnt;
ViUInt16
opStat;
#if WIN32
#include <windows.h>
static void Delay(double seconds)
{
Sleep((DWORD)(seconds * 1000));
}
#endif
int main(int argc,char *argv[])
{
#define CHECK_STATUS(cond,func,status)
if ( cond )
{
/* RS-232 interface */
/* GPIB / IEEE 488.2 interface */
/* ethernet / IEEE 802.3 interface */
/* USB interface (Virtual COM Port) */
"ASRL1"
115200
"GPIB::5"
"TCPIP::192.168.2.251::23::SOCKET"
"ASRL2"
// Default resource manager session
// VISA session
// buffer to hold instrument response
// number of bytes read from the instrument
{
/* COM1 */
/* baud rate */
/* flow control */
/* COM2 */
\
\
\

Advertisement

Table of Contents
loading

This manual is also suitable for:

Norma 5000

Table of Contents