ACI_PStatus_Params

Top  Previous  Next

typedef struct tagACI_PStatus_Params

{

 UINT   Size;                // (in)  Size of structure, in bytes

  UINT  SiteNumber;       // (in) For the Gang mode: site number to get status of, otherwise ignored

 BOOL   Executing;           // (out) The function started by ACI_StartFunction() is executing

 UINT   PercentComplete;     // (out) Percentage of the function completion, valid id Executing != FALSE

 UINT   DeviceStatus;        // (out) Device/socket status, see the ACI_DS_XXX constants

 BOOL   NewDevice;           // (out) New device inserted, no function has been executed yet. Valid if DeviceAutoDetect is ON.

 BOOL   FunctionFailed;      // (out) TRUE if last function failed

 CHAR   FunctionName[128];   // (out) Name of a function being executed if Executing != FALSE. If a function is under a sub-menu, function name will be like this: "Lock Bits^Bit 0"

 CHAR   ErrorMessage[512];   // (out) Error message string if FunctionFailed != FALSE

} ACI_PStatus_Params;

 

 

SiteNumber

If the ChipProgUSB was launched in the Gang mode (with the command line key /gang) and controls either the gang programmer or a cluster of single programming machines, then before starting the ACI_GetStatus function the SiteNumber parameter must contain the ordinal number of the programming site (socket) for which the status is required. The site numbers begin from #0.

Executing

This parameter is TRUE while the ChipProg operation, launched by the ACI_StartFunction, is in progress.

PercentComplete

While the Executing == TRUE this parameter represents a percentage of the function completion - from 0 to 100.

DeviceStatus

This structure member defines insertion of the device into the programmer ZIF socket if the device insertion auto detection function is enabled. See the description of the ACI_DS_XXX* constants in the aciprog.h file. See the matrix below:

 

Status

Description

ACI_DS_OK

The device is in the socket and the device's leads are reliably gripped by the programmer's ZIF socket's sprung contacts.

ACI_DS_OUT_OF_SOCKET

There is no device in the programmer's ZIF socket.

ACI_DS_SHIFTED

The device's leads are reliably inserted into the socket but the device is incorrectly positioned in the socket (shifted or inserted upside down). The same status may indicate that the device type selected in the Select Device does not correspond to the type of chip in the programmer's socket.

ACI_DS_BAD_CONTACT

The device's leads are not reliably gripped by the socket's sprung contacts. In most cases this is an intermediate situation while an operator is inserting the chip to the socket or is removing it.

ACI_DS_UNKNOWN

It is impossible to detect the status because the device insertion auto detection feature is disabled or this feature is not supported by this programmer at all.

NewDevice

This structure member is a flag that acknowledges replacing a programmed device in the programmer's socket by a new, presumably a blank device. It works only when the device insertion auto detection function is enabled. The NewDevice == FALSE while the already programmed chip is still in the socket and has not been replaced by a new one. After removing the programmed device from the socket the NewDevice toggles to TRUE.

FunctionFailed

This is an indicator of the function execution's result. It is set to FALSE when the ACI_StartFunction launches a programming operation and remains FALSE while the operation is in progress. If the programming operation fails and the parameter Executing becomes FALSE the FunctionFailed flag toggles to TRUE.

FunctionName

This is either the name of the programming operation (function) being currently executed or the name of the failed function, if the FunctionFalied == TRUE.

ErrorMessage

The destination of the error message if the function fails, i.e. the FunctionFalied == TRUE.

 

This is the bit definition from the aciprog.h header file:

 

*// ACI Device Status

#define ACI_DS_OK                                0  // Device detected, pin contacts are ok

#define ACI_DS_OUT_OF_SOCKET        1  // No device in the socket

#define ACI_DS_SHIFTED                    2  // Wrong device insertion is detected (shifted or inserted upside down)

#define ACI_DS_BAD_CONTACT              3  // Bad pin contact(s)

#define ACI_DS_UNKNOWN                    4  // Unknown (Auto Detect is probably off)

 

See also: ACI_ExecFunction, ACI_StartFunction, ACI_GetStatus