SCSI Driver for Pictor 416

© Steve Hill, 2002

Information

This dynamic link library uses the ASPI library (wnaspi32.dll) from Adaptec. This must be installed on your system for the library to work correctly. Clearly, you must have a working SCSI installation for the library to work correctly.

The dll has been tested under Windows 98 with an Adaptec 1480A Ultra SCSI card and a Pictor 416XT, firmware revision 3.11. If your set-up is different from this, then the software may not work.

I am grateful to Rick Hudson for his invaluable documentation on the Pictor SCSI commands without which this project would never have started.

See main.cpp for example code.

Exported Functions

Connect

typedef int (__cdecl *pfnConnect)(char **message);

Call this function to establish and check the SCSI link. Returns 1 if successful, 0 if failed.

In the case of a failure, message contains a reason:

"Missing wnaspi32": this means that the wnaspi32.dll has not been found (normally in Windows\System). Install the latest version library from the Adaptec site.

"Corrupt wnaspi32": this means that although the wnaspi32.dll has been found, there is something wrong with it. Re-install the library.

"Camera not found": a communications problem. Check that camera is on and that the cables are properly connected. Make sure that you power on the camera before turning on the computer (subsequently you may be able to power the camera on and off without a reboot, but it is important that the computer sees the camera when its starts up).

Disconnect

typedef int (__cdecl *pfnDisconnect)(void);

Call this function to disconnect from the camera.

SetTemperature

typedef void (__cdecl *pfnSetTemperature)(int tenths);

Call this function to set the required chip temperature. Parameter is in tenths of a degree centigrade.

GetTemperature

typedef int (__cdecl *pfnGetCoolingInfo)(int *power);

Call this function to obtain the current chip temperature. Returns temperature in tenths of a degree.

The power parameter is set to the cooling power (0-100%).

Expose

typedef int (__cdecl *pfnExpose)(int expTime, int dark, int bin, int w, int h, int x, int y);

Initiates an exposure. Returns immediately that the exposure has been started.

expTime -- time in milliseconds

dark -- 0 for normal exposure, 1 for dark frame

bin -- 0 for unbinned exposure, 1 for 2x2 binning

w, h -- width and height of image in absolute pixels

x, y -- offset of image in absolute pixels

NOTE: in binned mode, a full image is still given as 768 x 512 i.e. pixels are still measured as for a non-binned image.

NOTE: in binned mode x, y, w and h must be even.

Returns 0 if failed (due to invalid region etc.)

Returns 1 if successful.

Download

typedef int (__cdecl *pfnDownload)(unsigned char *buffer);

Copy the image data into the buffer. Buffer must be big enough to accommodate the data. Data is 16 bits organised MSB LSB MSB LSB ...

Ready

typedef int (__cdecl *pfnReady)();

Inquire the status of the camera. Returns 1 if ready, 0 if not.

Support

Whilst I will endeavour to eliminate bugs, I cannot guarantee to support this software. The software functions correctly in my environment, but I am unable to test it on any other machines and am unlikely to have time to enter into prolonged remote debugging correspondences.

Legal

© Steve Hill 2002

This library is supplied "as is" with no warranty express or implied as to its fitness for any purpose whatsoever. Use it at your own risk. I accept no responsibility for any damage or hurt to persons or equipment suffered as a result of using this software.

This library does not use any information supplied by Meade (they do not supply information on the SCSI protocol), nor is it based on any disassembly or other reverse engineering of copyrighted software.

Redistribution is permitted, so long as this file is included in the distribution.

Contact

I hope you find this library useful. It’s the only way I have to communicate with my camera via SCSI.

Donations to the Steve Hill telescope fund always welcome :-)

Mail Me