Home > Software engineering >  VC how to give IO int data sent via VISA
VC how to give IO int data sent via VISA

Time:10-07

From. TXT file to read out data stored in an array of type int, [0163] 83, now want to put these data through VISA command viPrintf (vi, char * CMD) issued to the IO, how to implement?

CodePudding user response:

Write the code before
Int * down=new int [1024].//store integers between 0 and 16383
Char strbuf [4].//
Cstrings tempstr CMDSTR;
for(int i=0; i<1024; I++) {
Memcpy (strbuf, & amp; The down [I], 4);
Tempstr. The Format (" % s "2, strbuf);
CMDSTR=CMDSTR + tempstr;//the connection string
}
Char * CMD=(LPCTSTR) CMDSTR (char *);
ViPrintf (vi, CMD);//send commands to the VISA
This short code in the down import is a square wave signal data performed successfully, but I am wrong for linear frequency modulation signal, VIprintf return "format string format identifier is invalid", how to return a responsibility? O teach


CodePudding user response:

VS IDE, in don't understand the symbol viPrintf point on the right mouse button, choose to define,
  • Related