Boards that Support the Function
Operation 4-bytes binary data(IEEE format) is changed into Float(Single) value.
Format
(VB.NET)
Dim Ret As Integer
Dim Str(4) As Byte
Dim FltData As Single
Ret = GpCnvCvs(Str, FltData)
(C)
DWORD Ret;
BYTE Str[4];
float FltData;
Ret = GpCnvCvs(Str, &FltData);
(C#)
uint Ret;
byte[] Str = new byte[4];
float FltData;
Ret = gpib.CnvCvs(Str, out FltData);
(Python)
Ret = ctypes.c_ulong()
Str = (ctypes.c_ubyte * 4)()
FltData = ctypes.c_float()
Ret.value = GpibPy.GpCnvCvs(Str, ctypes.byref(FltData))
Mode Master mode / Slave mode
Parameters
Str : Binary data arrangement to change.
Specifies 4-bytes binary data (IEEE single precision format)
FltData : Changed Float value (Single value in VB, return value)
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.
- Specifies 4-bytes binary data (IEEE single precision format).
- Have 4 bytes even if it is the worst. A movement isn't assured in the case as the under 4 bytes.
2 Changed data are only 4 bytes. Data on 5 bytes and more are ignored from the head.
3 Data
on the first byte in the data are changed by the default as an
'Sign Bit'.
Use GpCnvCvSettings when you
want to change data on the last
byte as 'Sign
Bit'.
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 CVS function of QuickBasic.