GX5296, GX5961, GX5964
Loads a file to all the boards in the domain.
GtDio6xFileLoad(nHandle, pszFileName, dwFileStartStepOrVector, dwStartStepOrVector, dwNumOfStepsOrVectors, dwFlags, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Session identifier:● Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization. |
pszFileName |
PSTR |
Specifies the file to load ( use "\\" for paths), valid file extensions are:● HDF file format with *.dio6x as its extension. ● XML file format with *.dio6xml as its extension. |
dwFileStartStepOrVector |
DWORD |
File starting step or vector. This parameter depends on the dwFlags settings. If dwFlags is set to 0x10000 (GTDIO6X_FILE_SAVE_RANGE_OF_VECTORS), then it represents the starting vector number. Otherwise, it represents the starting step number. |
dwStartStepOrVector |
DWORD |
Domain starting step or vector. This parameter depends on the dwFlags settings. If dwFlags is set to 0x10000 (GTDIO6X_FILE_SAVE_RANGE_OF_VECTORS), then it represents the starting vector number. Otherwise, it represents the starting step number. |
dwNumOfStepsOrVectors |
DWORD |
The number of steps or vectors to load from the file to the domain. This parameter depends on the dwFlags settings. If dwFlags is set to 0x10000 (GTDIO6X_FILE_SAVE_RANGE_OF_VECTORS), then it represents the number of vectors to load. Otherwise, it represents the number of steps to load. |
dwFlags |
DWORD |
The dwFlags allows the user to control which sections in the file will be loaded to the boards in order to speed up the load process. Each bit in the represent a section in the file as follows: 0x00000: GTDIO6X_FILE_LOAD_ALL - The complete file will be loaded to the boards as follows:. ● Load the DIO file vector data to the DIO boards. ● Load all the DIO file channels settings to the DIO boards. ● Load all the DIO file steps settings to the DIO boards. ● Load all the DIO file timing settings to the DIO boards. ● Load all the DIO file general settings (e.g. sequencer settings, trigger settings) to the DIO boards. ● Unused channels by the DIO file, will be set to disable and no record. ● All domain's unused channels' data will be set to 'Z' (Disable channel). ● Reset the domain before loading the file. 0x00001: GTDIO6X_FILE_LOAD_VECTORS - Load the DIO file vector data to the DIO boards. 0x00002: GTDIO6X_FILE_LOAD_RECORD - Load the DIO file record data to the DIO boards. 0x00004: GTDIO6X_FILE_LOAD_CH_SETTINGS - Load all the DIO file channels settings to the DIO boards. 0x00008: GTDIO6X_FILE_LOAD_STEP_SETTINGS - Load all the DIO file steps settings to the DIO boards. 0x00010: GTDIO6X_FILE_LOAD_TIMING_SETTINGS - Load all the DIO file timing settings to the DIO boards. 0x00020: GTDIO6X_FILE_LOAD_GENERAL_SETTINGS - Load all the DIO file general settings (e.g. sequencer settings, trigger settings) to the DIO boards.0x00040: GTDIO6X_FILE_LOAD_DISABLE_UNUSED_CHANNELS - Unused channels by the DIO file, will be set to disable and no record. 0x00040: GTDIO6X_FILE_LOAD_DISABLE_UNUSED_CHANNELS - Unused channels by the DIO file, will be set to disable and no record. 0x00080: GTDIO6X_FILE_LOAD_RESET_DOMAIN - Reset the domain before loading the file. 0x00100: GTDIO6X_FILE_LOAD_RESET_UNUSED_CHANNELS_DATA - All domain's unused channels' data will be set to 'Z' (Disable channel). 0x00110: GTDIO6X_FILE_LOAD_AUX_CH_SETTINGS - Load Aux channels setting to the DIO file. 0x10000: GTDIO6X_FILE_LOAD_RANGE_OF_VECTORS - Load only the vector memory to the DIO boards, the dwStartStepOrVector parameter specifies the boards starting vector location, dwNumOfStepsOrVectors specifies number of vectors to write (cannot be combined with any other flag). |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
The function loads a configuration file that was saved using GtDio6xFileSave. The default file extension used for the file is dio6x. The file contains the domain settings, channel settings, vector memory, record memory, and Step memory. This function loads steps starting at dwStartStepOrVector in vector memory, until dwNumOfStepsOrVectors are loaded. This function will attempt to load as many channels and data vectors it can from the file for a given domain configuration. The configuration file supports two file formats:
● HDF file format: (*.dio6x as its extension default extension) uses the Hierarchical Data Format file format. This extension most suitable to handle fast load and save data.
● XML file format: (*.dio6xml as its extension) uses an XML schema, the data vector section of the file is compressed when stored in the XML file.
The following example loads 100 vectors from MyFile.dio6x to a board starting at offset 0:
SHORT nStatus;
GtDio6xFileLoad (nHandle, “C:\\MyFile.dio6x”, 0, 0, 100, GTDIO6X_FILE_LOAD_ALL, &nStatus);
GtDio6xFileOpen, GtDio6xFileClose, GtDio6xFileSetChannelCount, GtDio6xFileSetTimingBoardCount, GtDio6xFileLoad, GtDio6xFileSave, GtDio6xGetErrorString