Boards that Support the Function
Operation ASCII string divided with separator specified by the GpCnvSettings function is changed into the Double value, and stored for the arrangement. The default of separator is "," (comma).
Format
(VB.NET)
Dim ArraySize, Ret As Integer
Dim Str As String
Dim DblData(xxxx) As Double ' (xxxx is the string length)
Ret = GpCnvStrToDblArray(Str, DblData, ArraySize)
(C)
DWORD ArraySize, Ret;
char *Str;
double *DblData;
Ret = GpCnvStrToDblArray(Str, DblData, &ArraySize);
(C#)
uint ArraySize, Ret;
string Str;
double[] DblData = new double[xxxx]; /* (xxxx is the string length) */
Ret = gpib.CnvStrToDblArray(Str, DblData, out ArraySize);
(Python)
ArraySize, Ret = ctypes.c_ulong(), ctypes.c_ulong()
Str = ctypes.create_string_buffer(xxxx) # (xxxx is the string length)
DblData = (ctypes.c_double * xxxx)() # xxxx is max of data number
Ret.value = GpibPy.GpCnvStrToDblArray(Str, DblData, ctypes.byref(ArraySize))
Mode Master mode / Slave mode
Parameters
Str : A string to change.
A string to change into the
Double value is specified.
There is no problem even if a header is contained in this string.
And, a capital letter, small letter is judged as the same one character.
DblData : Changed Double value is arranged. (return value)
ArraySize : The number that the size (return value) of the arrangement of (input value) DblData actually stored data.
Ret :Return value
0 : Normal completion
244 : There is a data block divided with separator beyond ArraySize.
255 : Illegal call
(See "Return Values" for details.)
Notes
1 This function does a change on the following condition.
There is no problem even if more than one space is being inserted before and behind
*separator when there is "a line" + string numerical value or "the string which shows numerical value" and they are divided with separator.
* Refer to the complement of GpCnvStrToDbl() for the details of the condition that it faces in each data block.
2 It can be used even if this function doesn't carry out GpIni().
The condition of [1] is applicable to each data block when it is removed when a header and so on is set up by [3] GpCnvSettings function.
Prevent the value of [4]
ArraySize from your exceeding the size
of the DblData arrangement that it was secured.
A movement can't be assured when it is set up beyond the size of the DblData
arrangement.