gclib  1.36.3
Communications API for Galil controllers and PLCs

◆ GArrayUpload()

GCLIB_DLL_EXPORTED GReturn GCALL GArrayUpload ( GCon  g,
const GCStringIn  array_name,
GOption  first,
GOption  last,
GOption  delim,
GBufOut  buffer,
GSize  buffer_len 
)

Uploads array data from the controller's array table.

Parameters
gConnection's handle.
array_nameNull-terminated string containing the name of the array to upload.
firstThe first element of the array for sub-array uploads. G_BOUNDS to omit.
lastThe last element of the array for sub-array uploads. G_BOUNDS to omit.
delimSets the delimeter between array elements in the returned data, G_CR specifies carriage return, G_COMMA specifies comma.
bufferBuffer to receive the uploaded data. The data will be null terminated unless function returns G_BAD_LOST_DATA due to the buffer being too small to hold the data.
buffer_lenThe length of the receive buffer.
Returns
The success status or error code of the function. See gclib_errors.h for possible values.

See x_arrays.cpp for an example.

Referenced by H_UploadArrayToList(), and write_array_to_file().