TCHAR sztestitem_scpi [200].
Int nLength=lstrlen (sztestitem_scpi);
Status=viWrite (instr, (ViBuf) (sztestitem_scpi), (ViUInt32) lstrlen (ztestitem_scpi), & amp; WriteCount);
Send normal during this time, continue to send
Strcpy_s (stringinput, ": price: ERR? \n");
Status=viWrite (instr, ViBuf stringinput, (ViUInt32) strlen (stringinput), & amp; WriteCount);
Equipment according to instructions error,
The
Char sztestitem_scpi [200].
Int nLength1=strlen (sztestitem_scpi);
Status=viWrite (instr, ViBuf sztestitem_scpi, (ViUInt32) strlen (sztestitem_scpi), & amp; WriteCount);
If (the status & lt; VI_SUCCESS)
{
Printf (" Error writing to the device % d. \ n ", I +/* */1);
Status=viClose (instr);
}
Strcpy_s (stringinput, ": price: ERR? \n");
Status=viWrite (instr, ViBuf stringinput, (ViUInt32) strlen (stringinput), & amp; WriteCount);
There is no problem.
I want to ask why is this? NLength1 and length nLength, would affect accuracy of instruction? And last request to end with a newline SCPI command, when I was in hair also didn't add "\ n" at the end of the instructions how to is correct, and I'm a little don't understand, consult
CodePudding user response:
Char sztestitem_scpi [200].Int nLength1=strlen (sztestitem_scpi);
Strings are not initialized, the DEBUG version and RELEASE version will show different results.
To set breakpoints, estimation is an empty string, no send out
UNICODE use char, char * CStringA
CodePudding user response: