GpCnvFltToStr

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

 

 

image\head10.gif Operation             The numerical value given to it is changed into one ASCII characters on the condition specified by the GpCnvSettings function, the GpCnvSettingsToStr function.

 

image\head10.gif Format                 

(VB.NET)

Dim StrSize, Ret As Integer

Dim Str As New String("", xxxx) ' (xxxx is the string length)

Dim FltData As Single

Ret = GpCnvFltToStr(Str, StrSize, FltData)

 

(C)

DWORD StrSize, Ret;

char *Str;

float FltData;

Ret = GpCnvFltToStr(Str, &StrSize, FltData);

 

(C#)

uint StrSize, Ret;

string Str;

float FltData;

Ret = gpib.CnvFltToStr(Str, out StrSize, FltData);

 

(Python)

StrSize, Ret = ctypes.c_ulong(), ctypes.c_ulong()

Str = ctypes.create_string_buffer(xxxx) # (xxxx is the string length)

FltData = ctypes.c_double()

Ret.value = GpibPy.GpCnvFltToStr(Str, ctypes.byref(StrSize), FltData)

 

image\head10.gif Mode                   Master mode / Slave mode

 

image\head10.gif Parameters          Str          :   (OUT) Changed string.

StrSize    :   (IN) Length of "Str"

(OUT)Length of changed characters.

FltData    :    Float value to change (In VB, Single value)

Ret         :    Return value

0     : Normal completion

244  : There is a data block divided with separator beyond StrSize.

255  : Illegal call

(See "Return Values" for details.)

 

image\head10.gif Notes                   1 This function does a change on the following condition.

*One space is put between the temporary number part and the index number part.

*A header, a unit (footer) can be added before and behind the numerical value by the settlement of the GpCnvSettings function, the GpCnvSettingsToStr function. When a header, a unit (Footer) are set up, one space is put in each and the space of the numerical value.

*The default when the above function isn't carried out is as the next.

Header : ""(NULL)

Unit(Footer) : ""(NULL)

Display of "+": Indicated

The effective number of beams.: 5

Suffix : Not in use

2 This function can be used even if it doesn't call GpIni().

3 Prevent the value of ArraySize from your exceeding the size of Str charactor array that it was secured. A movement can't be assured when it is set up beyond the size of the Str charactor array.