嗨,我正在使用C#,visa32和LAN Connection。基于签证帮助文档,使用的函数可以是这样的,public static extern int viPrintf(int vi,string writeFmt,byte [] arr);我的代码看起来像byte [] buffer; // length = 8972 viError = visa32.viPrintf(session,“MMEM:TRAN d:\\ demofile.txt#48972%b”,缓冲区); //%b是否正确? viError = visa32.viPrintf(session,“\ n”); // END终结器它返回错误-1073807297(VI_ERROR_INV_FMT),似乎writeformat字符串不正确。我的问题是,应该使用哪种修饰符和格式代码? 1)“%b”? 2)“%y”?非常感谢,如果有人可以分享您如何使用写入块数据格式化viprintf的经验。谢谢! 以上来自于谷歌翻译 以下为原文Hi, I am using C#, visa32 and LAN Connection. Base on visa help doc, the function used could be this, public static extern int viPrintf(int vi, string writeFmt, byte[] arr); and my code looks like, byte[] buffer; //length = 8972 viError = visa32.viPrintf(session, "MMEM:TRAN d:\\demofile.txt#48972%b", buffer); //is %b correct? viError = visa32.viPrintf(session, "\n");//END Terminator it returns error-1073807297 (VI_ERROR_INV_FMT),seems writeformat string is not correct. My question is, which modifier and format code should be used?1) " %b " ? 2) " %y " ? Very appreciated if anyone can share your experiences on how to format viprintf with writing block data. Thanks!
2018-11-22 10:48