GpCnvFltArrayToStr

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

 

 

image\head10.gif Operation             It is changed into one ASCII characters that it has the numerical value arrangement given to it divided on the condition specified by the GpCnvSettings function, the GpCnvSettingsToStr function with separator. The default of separator is "," (comma).

 

image\head10.gif Format                 

(VB.NET)

Dim StrSize, ArraySize, Ret As Integer

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

Dim FltData(xxxx) As Single ' (xxxx is Max value of number data)

Ret = GpCnvFltArrayToStr(Str, StrSize, FltData, ArraySize)

 

(C)

DWORD StrSize, ArraySize, Ret;

char *Str;

float *FltData;

Ret = GpCnvFltArrayToStr(Str, &StrSize, FltData, ArraySize);

 

(C#)

uint StrSize, ArraySize, Ret;

string Str;

float[] FltData = new float[xxxx]; /* (xxxx is Max value of number data) */

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

 

(Python)

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

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

FltData = (ctypes.c_float * xxxx)() # (xxxx is Max value of number data)

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

 

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       :    Array of Float value to change (In VB, Single value)

 

ArraySize    :   The size of the array of FltData

 

Ret             :   Return value

0      :  Normal completion

244   : The length of the characters of the changed result exceeded 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. And the space isn't put before and behind separator.

*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)

Separator                                 : ","(Comma)

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 and FltData array that it was secured.
A movement can't be assured when it is set up beyond the size of the Str charactor array and FltData array.