Boards
that Support the Function
Operation 2-bytes
binary data is changed into short(Integer) value, and stored for the array.
Format
(VB.NET)
Dim Ret As Integer
Dim Str(xxxx) As Byte ' (xxxx specifies the size of binary data.)
Dim ShtData(xxxx) As Short ' (xxxx specifies the size of changed data.)
Dim ArraySize As Integer
Ret = GpCnvCviArray(Str, ShtData, ArraySize)
(C)
DWORD Ret;
BYTE *Str;
short *ShtData;
DWORD ArraySize;
Ret = GpCnvCviArray(Str, ShtData, ArraySize);
(C#)
uint Ret;
byte[] Str = new byte[xxxx]; /* (xxxx specifies the size of binary data.) */
short[] ShtData = new short[xxxx]; /* (xxxx specifies the size of changed data.) */
uint ArraySize;
Ret = gpib.CnvCviArray(Str, ShtData, ArraySize);
(Python)
Ret = ctypes.c_ulong()
Str = (ctypes.c_ubyte * xxxx)() #(xxxx specifies the size of binary data.)
ShtData = (ctypes.c_short * xxxx)() #(xxxx specifies the size of changed data.)
ArraySize = ctypes.c_ulong()
Ret.value = GpibPy.GpCnvCviArray(Str, ShtData, ArraySize)
Mode Master
mode / Slave
mode
Parameters
Str : Binary data arrangement to change.
Specifies 2-bytes
binary data.
It must be continuous 2-bytes binary data in the array.
ShtData : Changed short value array(Integer value in VB, return value)
ArraySize : Size of ShtData array
Ret : Return value
0 : Normal completion
255 : Illegal call
(See "Return Values" for details.)
Notes
1 Binary data set up in this function must be satisfied the following conditions.
- 2-bytes data block continue, and it is in.
- Size of Str needs over (ArraySise * 2). A movement isn't assured in the case doesn't conform to this condition.
2 Data on the first byte in the data
are changed by the default as an upper.
Use GpCnvCvSettings when you want to change
data on the second byte as an upper.
3 This function does a change by the
value of ArraySize.
Be careful that it doesn't get mixed
up with size of Str.
The relation between Size of Str array and ArraySize, must be following.
Size of Str array >= ArraySize * 2
In other words, a change is done for only 2 bytes first if ArraySize is set up in 1 even if there is size of the Str array 20 bytes.
4 This function can be used even if it isn't called a GpIni.
5 This function provides the function which is about equal to the CVI function of QuickBasic.