GpCnvCvi

image\BLTLRGSQ.gifBoards that Support the Function image\SETUP.gif image\SANBTN.gif

 

 

image\head10.gif Operation             2-bytes binary data is changed into short(Integer) value.

 

image\head10.gif Format                 

(VB.NET)

Dim Ret As Integer

Dim Str(2) As Byte

Dim ShtData As Short

Ret = GpCnvCvi(Str, ShtData)

 

(C)

DWORD Ret;

BYTE Str[2];

short ShtData;

Ret = GpCnvCvi(Str, &ShtData);

 

(C#)

uint Ret;

byte[] Str = new byte[2];

short ShtData;

Ret = gpib.CnvCvi(Str, out ShtData);

 

(Python)

Ret = ctypes.c_ulong()

Str = (ctypes.c_ubyte * 2)()

ShtData = ctypes.c_short()

Ret.value = GpibPy.GpCnvCvi (Str, ctypes.byref(ShtData))

 

image\head10.gif Mode                   Master mode / Slave mode

 

image\head10.gif Parameters          Str           :  Binary data arrangement to change.

Specifies 2-bytes binary data

ShtData    :  Changed short value array(Integer value in VB, return value)

Ret          :  Return value

0     :  Normal completion

255  :  Illegal call

(See "Return Values" for details.)

 

image\head10.gif Notes                   1 Binary data set up in this function must be satisfied the following conditions.

-Have 2 bytes even if it is the worst. A movement isn't assured in the case as the under 2 bytes.

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 Changed data are only 2 bytes. Data on 3 bytes and more are ignored from the head.

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.