p. 44 GFG-3015
Error Messages
Command Error
Error Code
SCPI Error Code/
//
/Explanation
-100 Command error
-102 Syntax error
Execution Error
Error Code
SCPI Error Code/
//
/Explanation
-220 Parameter error
-221 Settings conflict
-222 Data out of range
6.23 The Examples of the Communication Interface Software
/*
************************************************************************
* Microsoft Visual C++ 6.0 for RS-232
*
* This programming example shows how to communicate
* PC and instrument via RS232.
*
* "*IDN?\n" : Ask the Manufacturer, model number
* and firmware
* ":FREQuency 1000.0\n" : Set Frequency=1000Hz
*
**************************************************************************
*/
#include <stdio.h>
#include <windows.h>
HANDLE InitCom (int Error_Value);
char *Error_Message[6]={
"Error Create File\n",
"Error SetCommTimeous\n",
"Error SetCommState\n",
"Error SetupComm\n",
"Error GetCommState\n",
"Error EscapeCommFunction\n"
};
void main()
{
char command_line[100];
char Receive_Data[100];
char Read_Machine_Number[10] ={"*IDN?\n"};
DWORD dwcommand_len=0,dwWritten=0,dwRead=0;
int i,error_value=0;
HANDLE hComm;