![background image](http://html1.mh-extra.com/html/racal-instruments/3162a-b/3162a-b_user-manual_3132596065.webp)
User Manual 3162A/B
Using The Instrument 3-31
binary block. 2002 is not a multiple of 8, therefore the
generator will generate an error message if this segment
length is used.
The following program fragment shows an example of programming the 3162A
or the 3162B’s channel A.
#include <visa.h>
#include <ansi_c.h>
#include "ri3162.h"
#include <cvirte.h> /* Needed if linking in external compiler; harmless otherwise */
/*=========================================================================*/
/* Function: Load Arbitrary Data
*/
/* Location: ri3162.c
*/
/* Purpose: This function loads arbitrary data into the specified segment */
/*=========================================================================*/
ViStatus _VI_FUNC ri3162_load_arb_data (ViSession vi,
ViInt16 segment_number,
ViInt16 *data_pts,
ViInt32 number_of_points)
{
ViInt32 max_size;
ViStatus error;
ViUInt32 cnt;
ViJobId job;
ViEventType etype;
ViEvent event;
/* range check the parameters */
if (error = ri3162_int_range (segment_number, RI3162_MIN_SEG_NUMBER,
RI3162_MAX_SEG_NUMBER, VI_ERROR_PARAMETER2))
return( error );
max_size = ri3162_get_mem_size(vi);
if (error = ri3162_int32_range (number_of_points, RI3162_MIN_SEGMENT_SIZE,
max_size, VI_ERROR_PARAMETER4))
return( error );
/* select the arbitrary waveform segment */
if ((error = viPrintf(vi, "TRAC:SEL %d\n", segment_number)) < 0)
return( error );
if ((error = viPrintf(vi, ":SMEM:STATE OFF\n")) < 0)
return( error );
/* get the device ready to download via A24 space */
if ((error = viPrintf(vi, ":SMEM:MODE WRITE\n")) < 0)
return( error );
if ((error = viPrintf(vi, ":SMEM:STATE ON\n")) < 0)
return( error );
if ((error = viPrintf(vi, "*OPC?\n")) < 0)
return( error );
Summary of Contents for 3162A/B
Page 4: ...This page was left intentionally blank...
Page 10: ...3162A B User Manual vi Support Offices 6 2...
Page 12: ...3162A B User Manual viii This page was left intentionally blank...
Page 17: ...User Manual 3162A B Getting Started 1 5 Figure 1 2 The Front Panel...
Page 23: ...User Manual 3162A B Getting Started 1 11 Figure 1 7 WaveCAD Example...
Page 27: ...User Manual 3162A B Getting Started 1 15 This page was left intentionally blank...
Page 28: ......
Page 34: ...3162A B User Manual Configuring The Instrument 2 6 This page was left intentionally blank...
Page 78: ......