1902 function library for Labview 6.1 - Tim Pragnell, University of Oxford -------------------------------------------------------------------------- This is based on the library provided by Patrick Haggard of UCL. I have expanded the whole thing for my own purposes and addressed a number of problems with the basic driver software: 1. Reads and writes are optimised to be much faster - they do not wait a fixed time, but return as soon as a command has produced a result. 2. There was a problem with resetting or initialising the 1902 when driven by labview serial port drivers. It could become unaddressable after a non-existant channel was addressed or if it happened to power up in that state. This has been solved by providing a library routine '1902 Kick'. 3. All relevant library routines can address combinations of 1902 channels. We use dual 1902s with half of them labelled channels 0 and 1 and half labelled 2 and 3. The software will enable 2&3 modules to be addressed as if they were 0&1 modules, or to be addressed as channels 0 to 3 when two dual modules are connected together with a dual rs232 lead. 4. A number of higher-level library routines have been provided e.g. 'set closest gain'. 1902set.ctl is a front panel control which can be used for setting basic 1902 parameters. 1902.llb is a labview 6.1 library. The higher level Vis in it are: 1902Kick.vi Initialises serial port and looks for amplifier channels. Reports back if 1902 not found. 1902SetInputParameters.vi Sets up input source, coupling, and filtering using 1902set.ctl. 1902SetClosestGain.vi Sets the closest gain to the one requested and outputs the actual gain value. 1902SetClosestOffset.vi Sets the closest offset to the one requested and outputs the actual offset value. 1902IncrOrDecGain.vi Set the gain to the next allowed value. 1902IncrOrDecOffset.vi Set the offset to the next allowed value. GainToYRange.vi A simple VI to set the vertical axis of graphs given the 1902 gain and the DAQ card input range. Other Vis are subroutines of the above, or can be used on their own or in combination. 1902ctl.vi is an all-purpose standalone VI for controlling the 1902. 1902SetChannel sets the current channel and does that clever bit where dual amplifiers labelled channels 2 and 3 can be addressed as if they were channels 0 and 1 (unless requested not to).