gclib 2.0.9
Communications API for Galil controllers and PLCs
 
Loading...
Searching...
No Matches

◆ GArrayDownload()

GCLIB_DLL_EXPORTED GReturn GCALL GArrayDownload ( GCon  g,
const GCStringIn  array_name,
GOption  first,
GOption  last,
GCStringIn  buffer 
)

Downloads array data to a pre-dimensioned array in the controller's array table.

Warning
The array must already exist on the controller and be sufficient dimension to hold the desired array data, e.g. via DM.
Parameters
gConnection's handle.
array_nameNull-terminated string containing the name of the array to download. Must match the array name used in DM.
firstThe first element of the array for sub-array downloads. G_BOUNDS to omit.
lastThe last element of the array for sub-array downloads. G_BOUNDS to omit.
bufferBuffer containing the null-terminated data to be sent to the controller. The array data may be separated with carriage return, carriage return + line feed, or a comma. No spaces.
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_DownloadArraysFromList(), and x_arrays().