Programming with GPIB Commands
2-19 User Level Calibration Commands
MG369xC GPIB PM
PN: 10370-10374 Rev. F
2-51
The following is an example program for saving and recalling user level calibration tables. This program
uses the National Instruments NI-288.2 C language interface library (mcib. lib) and header (decl. h).
#include <stdio. h>
#include “decl. h”
void gpiberr(char *);
#define BOARD_ID 0
#define USER_LVL_SAVE 1
#define USER_LVL_RECALL 2
#define USER_LVL_NUM_BYTES 8232
void main()
{
Addr4882_t source_addr = 5
device_addr[2] = {5, NOADDR};
unsigned char user_lvl_tables[USER_LVL_NUM_BYTES];
init user_lvl_received,
user_input;
FILE *fp_user_lvl_data:
/** Clear the bus and take control.
**/
SendIFC(BOARD_ID);
if(ibsta & ERR)
gpiberr(“SendIFC error”);
/** Set the remote enable line.
**/
EnableRemote(BOARD_ID, device_addr);
if(ibsta & ERR)
gpiberr(“EnableRemote error”);
/** Prompt the user to save or recall the data.
**/
printf(“1. Save the data from the source\n”);
printf(“2. Recall the data to the source\n”);
printf(“Option: ”);
scanf(“%d”,&user_input);
if(user_input == USER_LVL_SAVE)
{
NOTE:
This program is continued on the next page.
Figure 2-14.
Programming Example of Saving and Recalling User Level Calibration Tables (1 of 3)
Содержание MG369 C Series
Страница 2: ......
Страница 6: ...Contents 4 PN 10370 10374 Rev F MG369xC GPIB PM ...
Страница 262: ...A 34 PN 10370 10374 Rev F MG369xC GPIB PM ...
Страница 264: ...Index 2 PN 10370 10374 Rev F MG369xC GPIB PM ...
Страница 265: ......