Home > Back-end >  Visa programming cannot output command
Visa programming cannot output command

Time:09-24

Filter model is siglent sds3054
Specific code is very simple
.
Status=viPrintf (instr, "BandWidth_Limit? \n");
Status=viScanf (instr, "% t," outputBuffer);
If (status{
Printf (" viRead failed with the error code: % x \ n ", status);
ViClose (defaultRM);
} the else
{
Printf (" \ ndata read from device: % * s \ n ", 0, outputBuffer);
}
.
To filter send BandWidth_Limit? And the rest of the instructions will appear when
The data read from the device: WARNING: the CURRENT REMOTE CONTROL INTERFACE IS TCPIP, IS not I want to return values,
But send the * idn? Instructions were able to get the desired results
The data read from the device: LECROY SDS3054, SDS300B21443023, 7.9.2

CodePudding user response:

This is the previous code

Status=viOpenDefaultRM (& amp; DefaultRM);

//printf (" x "status: %, status);
If (status{
Printf (" Could not open a session to the VISA the Resource Manager! \n");
}
/*
Splicing IP address and connection,
*/
Char head [256]="TCPIP0..." "
Char tail []=": : INSTR";
Char resource [256].
Strcat (head, pIP);
Strcat (a head, tail);
Status=viOpen (defaultRM, head, VI_LOAD_CONFIG VI_NULL, & amp; Instr);
  • Related