gclib  1.36.3
Communications API for Galil controllers and PLCs

◆ GFirmwareDownload()

GCLIB_DLL_EXPORTED GReturn GCALL GFirmwareDownload ( GCon  g,
GCStringIn  filepath 
)

Upgrade firmware.

Parameters
gConnection's handle.
filepathThe full file path to the Galil-supplied firmware hex file. See http://www.galil.com/downloads/firmware
Returns
The success status or error code of the function. See gclib_errors.h for possible values.
ec(GInfo(g, buf, sizeof(buf))); //get conntroller info
cout << buf << '\n'; //print the info
ec(GFirmwareDownload(g, "F:/1806.dmc/dmc-1806-r11a.hex"));
ec(GInfo(g, buf, sizeof(buf))); //get the info again
cout << buf << '\n';
// example output:
// GALILPCI1, DMC1846 Rev 1.1a-CM, 4232
// GALILPCI1, DMC1846 Rev 1.1a, 4232
GCLIB_DLL_EXPORTED GReturn GCALL GFirmwareDownload(GCon g, GCStringIn filepath)
Upgrade firmware.
GCLIB_DLL_EXPORTED GReturn GCALL GInfo(GCon g, GCStringOut info, GSize info_len)
Uses GUtility() and G_UTIL_INFO to provide a useful connection string.
Definition: gclibo.c:49