Multi API-DLL Functions
These functions operate on meta-data within the Multi API-DLL and help manage the underlying API-DLL instances. These functions do not directly program target devices. Use these functions to initialize the desired number of FPAs, selected all or one FPA(s), read FPA serial numbers, or clean-up resources used by Elprotronic’s DLLs.
Once the desired FPAs have been successfully opened, use Generic Functions to initialize the FPAs, and configure them for the target device(s) being programmed.
- 1 1. F_OpenInstancesAndFPAs
- 2 2. F_CloseInstances
- 3 3. F_Set_FPA_index
- 4 4. F_Get_FPA_index
- 5 5. F_Check_FPA_index
- 6 6. F_Enable_FPA_index
- 7 7. F_Disable_FPA_index
- 8 8. F_LastStatus
- 9 9. F_Multi_DLLTypeVer
- 10 10. F_Get_FPA_SN
- 11 11. F_Get_FPA_Label
- 12 12. F_Get_FPA_List
- 13 13. F_GetProgressBar
- 14 14. F_GetLastOpCode
- 15 15. F_CancelAction
- 16 16. F_Trace_File
- 17 17. F_Trace_Comment
- 18 18. F_Trace_ON
- 19 19. F_Trace_OFF
1. F_OpenInstancesAndFPAs
General Description
Multi API-DLL scans USB ports or LAN for connected FPAs listed in the setup file, or input string. When an FPA listed in the setup file is found, the corresponding API-DLL is copied on disk if necessary, and loaded. F_Initialization should be called for each FPA after this function succeeds.
Syntax
INT_X F_OpenInstancesAndFPAs( char * FileName )Input
char * FileName : path to setup file, or list of serial numbers.
Valid FPAs-setup.ini setup file lists FPAs and SN pairs.
FPA-1 20150003
FPA-2 20180134
--or--
FPA-1 20090123
FPA-2 * //any serial number (can only be done at last line)Valid FPAsIPs.ini, setup file lists FPAs by IP address:
FPAETH-IP-1 192.168.0.101
FPAETH-IP-2 192.168.0.102
FPAETH-IP-3 192.168.0.103
FPAETH-IP-4 192.168.0.104Invalid example:
FPA-1 * //this line will be read
FPA-2 * //this line will be ignoredValid list of serial numbers as a string:
"*# FPA-1 20090123 FPA-2 20090346"translates to:
FPA-1 20090123
FPA-2 20090346input string: "*# *" translates to:
FPA-1 *In both cases, for the setup file and the input string, if a specified FPA is missing then it will not
affect subsequent entries. Therefore, a setup file with these contents:
FPA-1 20090123
FPA-2 20090346
FPA-3 20090222
FPA-4 20090245and with FPA-3 missing (not connected, etc.) will initialize the Multi API-DLL to:
FPA-1 20090123
FPA-2 20090346
FPA-3 empty
FPA-4 20090245Output
INT_X : number of instances opened successfully
0 - failed
2. F_CloseInstances
General Description
All FPAs terminate communication with target devices and close target devices according to configuration settings (power setting, adapter line states, etc.). Finally, the USB/Ethernet connections to the FPAs are terminated and API-DLL instances are freed. The Multi API-DLL can now be used to open a new set of FPAs using the function F_OpenInstancesAndFPAs.
Syntax
INT_X F_CloseInstances ( void );Input
none.
Output
INT_X : success or failed
TRUE (1) - success
FALSE (0) - failed
3. F_Set_FPA_index
General Description
Select desired FPA index to perform specific tasks (access specific API-DLL instance).
Syntax
INT_X F_Set_FPA_index ( BYTE fpa );Input
BYTE fpa : desired FPA index, 1 to 64, or 0 for all
Output
INT_X : success or error
TRUE (1), used FPA index is valid
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with Multi API-DLL Functions | F_OpenInstancesAndFPAs or index out of range
IMPORTANT
Other functions that try to access this FPA index will also return FPA_INVALID_NO if this function was not called with a proper parameter.
4. F_Get_FPA_index
General Description
Get current FPA index.
Syntax
BYTE F_Get_FPA_index( void );Input
none.