FTA Software Development Kit 
The FTA Version 3.0 Software Development Kit ( SDK ) makes software integration with the Fruit Texture Analyser quick and easy.  The control functions are compiled into a standard Windows DLL file and enables your software to capture data direct from the FTA .  The functions in the DLL will take care of all the serial communication protocol and handshaking while the relevant firmness, size or bar code readings will be available through a single function call.  Updating QA software, maturity indexing programs, etc., should not take longer than two hours.  Example codes for MS Visual C, Borland CBuilder and Borland Delphi are included. Regularly refer to this page for more sample codes in other programming languages. 
 
 
The following items are included in the SDK ( FTA32DLL.zip
Description 
File Location 
DLL files:  FTA_DLL.dll and borlndmm.dll - Copy to the working directory or to the windows system directory. 
Demo applications: 
VC_DEMO.zip (Microsoft Visual C++ Ver 4.00 example), 
BCB_DEMO.zip (Borland CBuilder Ver 4.00 example), 
DELPHI_DEMO.zip (Borland CBuilder Ver 4.00 example). 
Application Notes: 
FTA_DLL.pdf 

 

FTA32  Windows DLL Function Summary 
Function 
Parameters 
Return 
value 
Description 
void FTAInit() 
none 
none 
Install the FTA interface and establish a link with the FTA via the serial port. A red "LED" will show as a tray icon.  If a FTA is connected and communicating through this interface, the tray icon will be green. 
void FTAQuit() 
none 
none 
Disconnect the FTA interface and make the serial port available to the system. 
void FTASetup() 
none 
none 
This function will display the setup dialog . Select the serial port with this dialog.  Operating settings on the FTA can be set: 
Trigger threshold
When the probe registers a firmness (force) reading higher than this value, the probe speed will slow down to  "Measure speed". 
Forward speed
The probe speed until it comes into contact with the sample. 
Measure speed
The probe speed while penetrating the sample tissue. 
Reverse speed
The load cell carriage speed when returning to the top location  (on completion of the firmness measurement). 
Measure distance
The test depth when penetrating the sample tissue. 
int FTAStatus() 
none 
integer 
The return value will be referred to as " status word ".  Each bit of the 16-bit word indicates a specific status: 
Bit no. 
 Description 
1 - 
A new firmness reading is available. 
2 - 
A new size reading is available. 
3 - 
The FTA interface is connected to a serial port. 
4 - 
A new bar code is available. 
5
The FTA is at TOP position. 
6 - 
The FTA is at BOTTOM position. 
7~15 
Reserved: (mask bits 7~15 when evaluating the status word ). 
int FTABitStatus(int) 
integer 
integer 
The parameter must be the bit number (from the status word - refer to description above) to evaluate.  If the specific bit is high, the return value will be "1" else "0" will be returned. 
This function was added to accommodate programming languages that cannot do bit manipulation. 
float FTAReadSize() 
none 
float 
If bit #2 of FTAStatus() is true, a valid size reading will be returned. After one call to this function, bit #2 will be reset. A call to this function when bit #2 is not true, will return a value of -1 (minus one). 
float FTAReadMaxFirmness() 
none 
float 
If bit #1 of FTAStatus() is true, a valid maximum firmness reading will be returned. After one function call, status bit #1 will be reset. A call to this function when the status bit is not true, will return a value of -1 (minus one). 
float FTAReadLastFirmness() 
none 
float 
If bit #1 of FTAStatus() is true, a valid last firmness reading will be returned.  A call to this function when the status bit is not true, will return a value of -1 (minus one).  This function does not reset the status bit. 
float FTAReadEnergy() 
none 
float 
When bit #1 of FTAStatus() is true, a valid energy reading will be returned.  A call to this function when status bit #1 is not true, will return a value of -1 (minus one).  This function does not reset the status bit. 
void FTACancel() 
none 
none 
Cancel any operation on the FTA. 
void FTADoFirmnessReading() 
none 
none 
Enable the FTA for one firmness test cycle.  The FTA will sound a short beep - indicating readiness.  On completion, status bit #1 will be set to a high state. 
LPSTR FTAReadBarCode() 
none 
string 
When bit #4 of FTAStatus() is true, a valid bar code will be returned. After one function call, status bit #4 will be reset. A call to this function when the status bit is not true, will return an empty string. 
void FTABack() 
none 
none  Instruct the FTA to return to the top position.  Use this function when the operator wants to change the preset return distance. 
int  FTAGetCoordCnt(int) 
integer 
integer 
Determine the size of the buffer needed to hold the XY coordinates for the firmness curve. 
The function will return the number of coordinates in the graph. 
The function parameter  must be in the range 0 to 2 and will set the the displacement (X-axis) resolution. 
The following are the corresponding resolutions: 
0 = 0.5mm; 
1 = 0.1mm; 
2 = 0.01mm 
int FTAGetGraphCoord(float*,float*,int) 
float pointer
integer  The two pointer parameters must point to the buffers for holding the X and Y coordinates respectively. The integer parameter must indicate the size of the buffer. It should be more than the required value (previously obtained with FTAGetCoordCnt ). 
The return value will confirm the number of coordinate pairs successfully stored in the buffers
 
Typical calling sequence 
A typical application to read the firmness and/or size from the FTA may look like the following snippet: 

.... 
the code to load the dll (FTA_DLL.dll) and to map the functions should be implemented before this line. "Borlndmm.dll" will automatically be called from the functions in FTA_DLL.dll 
 
COMMENT 
.... 
FTAInit();  // Initialize the FTA interface 
while(TestTrue)  // A loop to continue reading the status, firmness, size, energy, etc. 
if(FTAStatus()&1)  // Check bit  #1 of the "status word" 
   { 
   iFirmness = FTAReadMaxFirmness();  // If bit  #1 is true, read firmness 
   FTADoFirmnessReading();  // Instruct the FTA to do next test (if required) 
   ....  // Do something with the firmness reading 
   } 
if(FTAStatus()&2)  // Check bit #2 of the "status word" 
   { 
   fSize = FTAReadSize();  // If bit #2 is true, read size reading 
   ...  // Do something with the size reading 
   } 
FTAQuit();  // When the FTA interface is no longer required, de-initialize 
// ... and that's that !! 
 

Configuration 
When calling  FTASetup(), the following window will appear: 
Use this dialog to select the correct serial port.  The software will save the new configuration to FTA_DLL.CFG. The field values will be shown (as in the illustration) when the interface is successfully connected to the FTA. 

The blue-colored fields can be used to enter new operating parameters for the FTA. To make the changes permanent, click on Save configuration to FTA. 

Download 
The SDK  is freely available and you may download it to test the DLL interface on your system.  Contact us for technical support. 
Support 
For more information e-mail: sdk@gusstoday.com