05-22-2018 01:08 AM
In VB,the "VISA32.DLL" Declare is
Declare Function viRead Lib "VISA32.DLL" Alias "#256" (ByVal vi As Integer, ByVal Buffer As String, ByVal count As Integer, ByRef retCount As Integer) As Integer
and use like
viread(vi ,String,count ,retCount )
In VC,
#include <visa.h>
and use like
viRead(vi, (UCHAR *)buf(), bufSize, &actual);
Buffer in VB is a String,but in VC is a Integer array.
Why?
05-23-2018 11:01 AM
It may be related to language differences and how data transfer is optimized in the respective languages. For instance, if the buffer can be sent as either a string or integer array but VB handles strings better, strings will be used. Is there a specific reason that this information is required for your application?
05-24-2018 03:17 AM
thank you
I use
status = viRead(vi, strRes, 4096, retCount)
the result only 18 bytes, do you know why?
05-24-2018
10:10 AM
- last edited on
11-16-2024
05:20 PM
by
Content Cleaner
If you haven't yet, I would take a look at the examples for VISA reads for VC and VB. There are also examples that install when you install drivers on your computer.
Example VISA Message-Based Application
NI-DAQmx, NI-VISA, and NI-488.2 Visual C++ Example Locations