RTP Series API Programming Reference  1.2.1
Scpi Functions

Functions

EXPORT int PwrSnsr_SendSCPICommand (SessionID Vi, const char *Command)
 Send a SCPI command to the instrument. More...
 
EXPORT int PwrSnsr_ReadSCPI (SessionID Vi, int ValueBufferSize, long *ValueActualSize, char Value[], int Timeout)
 Read a SCPI string response from the instrument. More...
 
EXPORT int PwrSnsr_SendSCPIToNamedParser (SessionID Vi, const char *name, const char *Command)
 Send a SCPI command to the instrument using a named SCPI parser. More...
 
EXPORT int PwrSnsr_ReadSCPIFromNamedParser (SessionID Vi, const char *name, int ValueBufferSize, long *ValueActualSize, char Value[], int Timeout)
 Read a SCPI string response from the instrument. More...
 
EXPORT int PwrSnsr_SendSCPIBytes (SessionID Vi, int CommandBufferSize, char Command[])
 Send a SCPI command as a byte array. More...
 
EXPORT int PwrSnsr_ReadSCPIBytes (SessionID Vi, int ValueBufferSize, char Value[], long *ValueActualSize, int Timeout)
 Read a SCPI byte array response from the instrument. More...
 

Detailed Description

SCPI command functions

Function Documentation

◆ PwrSnsr_ReadSCPI()

EXPORT int PwrSnsr_ReadSCPI ( SessionID  Vi,
int  ValueBufferSize,
long *  ValueActualSize,
char  Value[],
int  Timeout 
)

Read a SCPI string response from the instrument.

Parameters
ViThe SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session.
ValueBufferSizeNumber of elements in Value.
ValueActualSizeNumber of elements actually written to Value.
ValueThe string returned from the instrument SCPI interface.
TimeoutTime out in milliseconds for the read operation. Use -1 for infinite and -2 to use the existing time out value.
Returns
Success (0) or error code.

◆ PwrSnsr_ReadSCPIBytes()

EXPORT int PwrSnsr_ReadSCPIBytes ( SessionID  Vi,
int  ValueBufferSize,
char  Value[],
long *  ValueActualSize,
int  Timeout 
)

Read a SCPI byte array response from the instrument.

Parameters
ViThe SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session.
ValueBufferSizeNumber of elements in Value.
ValueThe byte array returned from the instrument SCPI interface.
ValueActualSize
TimeoutTime out in milliseconds for the read operation. Use -1 for infinite and -2 to use the existing time out value. Time out in milliseconds for the read operation. Use -1 for infinite and -2 to use the existing time out value.
Returns
Success (0) or error code.

◆ PwrSnsr_ReadSCPIFromNamedParser()

EXPORT int PwrSnsr_ReadSCPIFromNamedParser ( SessionID  Vi,
const char *  name,
int  ValueBufferSize,
long *  ValueActualSize,
char  Value[],
int  Timeout 
)

Read a SCPI string response from the instrument.

Parameters
ViThe SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session.
nameName of the parser. If parser doesn't exist, returns PWR_SNSR_ERROR_NULL_POINTER. PwrSnsr_SendSCPIToNamedParser can be used to create a named parser.
ValueBufferSizeNumber of elements in Value.
ValueActualSizeNumber of elements actually written to Value.
ValueThe string returned from the instrument SCPI interface.
TimeoutTime out in milliseconds for the read operation. Use -1 for infinite and -2 to use the existing time out value.
Returns
Success (0) or error code.

◆ PwrSnsr_SendSCPIBytes()

EXPORT int PwrSnsr_SendSCPIBytes ( SessionID  Vi,
int  CommandBufferSize,
char  Command[] 
)

Send a SCPI command as a byte array.

Parameters
ViThe SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session.
CommandBufferSizeNumber of elements in Command.
CommandCommand to send.
Returns
Success (0) or error code.

◆ PwrSnsr_SendSCPICommand()

EXPORT int PwrSnsr_SendSCPICommand ( SessionID  Vi,
const char *  Command 
)

Send a SCPI command to the instrument.

Parameters
ViThe SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session.
Command
Returns
Success (0) or error code.

◆ PwrSnsr_SendSCPIToNamedParser()

EXPORT int PwrSnsr_SendSCPIToNamedParser ( SessionID  Vi,
const char *  name,
const char *  Command 
)

Send a SCPI command to the instrument using a named SCPI parser.

Parameters
ViThe SessionID handle that you obtain from the PwrSnsr_init function. The handle identifies a particular instrument session.
nameName of the parser. Creates a new parser if the name is not already used.
Command
Returns
Success (0) or error code.