12-21-2011 06:53 PM
How to write a huge byte array in NI VISA MessageBasedSession .Function similar to viWriteBuffer in VISA ?
Can i use viWriteBuffer cmd in NI VISA .My application is in C# .net .
12-22-2011 12:01 PM
Hey!
For simply resizing the buffer, you could use viSetBuf. I'd recommend referencing the following resources about VISA:
This is the VISA User-Manual. You'll want to focus on chapter 5. http://www.ni.com/pdf/manuals/370423a.pdf
Sometimes the easiest way to learn something is by looking at examples. This Knowledge Base article shows you where to find VISA example programs. http://digital.ni.com/public.nsf/allkb/F3CBBEBF8D846BF586256B450059E5EA
Finally, for an overview of using VISA calls in C#: http://zone.ni.com/devzone/cda/tut/p/id/2739#toc3
Hope this helps!
Ryan S.
12-22-2011 12:23 PM
Thanks for the Response.
I am working with NI.VisaNS and NI.Common ,Programming in C#. I want to write huge file in byte array to the instrument.
I used viBufWrite() in C ,in C# i tried to use mysession.Write(byte[]) which did not work.
How do i know the cmd similar to viBufWrite() in VisaNS.
Any document which have c version and c# version cmds comparision.Please help
Thanks
12-27-2011 03:40 PM
There really isn't a document for a straight comparison between the C and C# command calls. You'll have to look them up individually.
For C: Programs >> National Instruments >> NI-DAQ >> Text Based Code Support >> NI DAQ-mx C Reference Help
For C#: Programs >> National Instruments >> NI-DAQ >> Text Based Code Support >> NI DAQ-mx .NET Framework Help
Hope this helps!
Ryan S.