Very brief instructions for hsicom32.dll use The hsicom32.dll is written in "C" and compiled as a 32 bit dll for use with Windows 95. To use it include the supplied hsicom32.h file in the C source files which will use the hsicom32.dll supplied functions. Link the file hsicom32.lib with the application. The application must be able to locate the hsicom32.dll file at run time. There are various strategies to accomplishing this. Check the documentation with the Windows development package or either put it in the same path as your application or in the windows/system path. All of the functions in the hsicom32.dll have the same interface as their counterparts in the non-Windows (DOS) hsicomm.c file. See the documentation on using the non-Windows hsicomm.c. The functions that differ from the non-Windows hsicomm.c functions are: int HsiCommInit(unsigned IOBaseAddr,const char *FirmwareFile); unsigned IOBaseAddr - Base IO address of HSI-24 system. Use the value zero here. Using a value of zero will cause the dll to use the default HSI-24 address of 0x310. See notes below if an I/O bus conflict exists with the address 0x310. const char *FirmwareFile - Pointer to the name (including path if not in the application's directory) of the firmware file. The firmware file is the file with a name like "PCA10C.BIN". The HsiCommInit function will set the IO address as given and attempt access to the HSI-24 board. If the access fails the HsiCommInit function will attempt to locate the given firmware file and load it into the HSI-24 board. Return value is zero if firmware loaded OK. void HsiMsgBox(int Enable); int Enable - Value of zero (FALSE) disables the error dialog box. Value of one (TRUE) enables the error dialog box. The HsiMsgBox function enables/disables a dialog box which appears whenever there is an error detected in an hsicomm command. The dialog box translates the interface error code into a brief descriptive (hopefully) error message. The enabling/disabling of the error dialog box does not affect the error codes returned by the hsicomm functions. int HsiFirmware(char *FirmwareVersion); char *FirmwareVersion - pointer to char array 40 bytes long. The HsiFirmware() function will copy the version stamp read from the firmware file to the area pointed to by the parameter. This function always returns 0; int HsiDLL(char *DLLVersion); char *DLLVersion - pointer to char array 20 bytes long. The HsiDLL() function will copy the version stamp from the DLL file to the area pointed to by the parameter. This function always returns 0; Typical use: STEP 1 - Initialize . . . int HsiLoadStatus=0; . . . // load firmware HsiLoadStatus = HsiCommInit(0,"pca10c.bin"); if(HsiLoadStatus==0){ HsiSetScanTime(100); // scan time set to 10.0 ms // scan time must be set or it will default // to zero (meaning no scanning) HsiStartScan(); } . . . STEP 2 - if using HSI-24 channels, program formulae into channels TimerID = SetTimer(NULL,0,400,NULL); HsiDefineChannel(1,"t1+t2"); HsiDefineChannel(2,"max(t1+t2)"); HsiDefineChannel(3,"min(t1+t2)"); STEP 3 - read values . . float values[3]; . . HsiReadChannel(1,&values[0]); // pass adr of space for float HsiReadChannel(2,&values[1]); // pass adr of space for float HsiReadChannel(3,&values[2]); // pass adr of space for float . . // display or store values . . // to reset max/min/tir functions used in formulae call HsiResetMM() if(ResetPushedMessage) HsiResetMM(); NOTES (Don't be too concerned with this - in 10 years this has only been an issue once.) I/O Address Conflicts The HSI-24 uses I/O addresses 0x0310 through 0x0313 inclusive. It decodes all 16 bits of the I/O address so it will not reappear at intervals throughout the I/O address space. Other values can be used if a conflict exists on the ISA bus where the HSI-24 is installed. Using other address values to resolve bus conflicts requires that the addressing jumpers on the HSI-24 board be changed. REVISION HISTORY hsicom32.dll 12-2-98 change HsiReadDirect for 'short int **' 7-29-98 added entry for HsiFirmware() 7-29-98 added entry for HsiDLL() 6-28-97 changes for 32 bit mode dll calls to HsiSetScanTime(100); & HsiStartScan(); added with firmware load Error window status preserved through Init call 6-24-95 firmware loader added to DLL Firmware loader derived from hsildr V5.2 Mar 03, 1993