Acquire: Photometric Telescope Data Collection Software 6/06/90 Kurt Schwehr ------------------------------------------------------------------------------- DOCUMENTATION For Changes To ACQUIRE ------------------------------------------------------------------------------- GRAPHICS INTEGRATION TIME Est DEFAULT VALUES ------------------------------------------------------------------------------- FILES: Development Ver. Disk File name Use Lab versions ACQU-KGM.LAB AC15MUL.KRT In lab with multiplexer ACQU-KG3.LAB 3DVM15LB.KRT In lab with up to three DVM's Telescope version ACQU-KGM.TEL AC15MLKS.TEL With telescope and multiplexer ACQU-KG3.TEL 3DVM15KS.TEL With telescope and up to 3 DVM's ------------------------------------------------------------------------------- Description of operation (default values later) ------------------------------------------------------------------------------- Hooks to acquire for GRAPH -------------------------- There are three places in which the new routines act from within the ACQUIRE program. The first is where the graph function receives its data from. This is accomplished in the Extract subprogram. The data is copied from the Voltage array into one of three array's. Gvoltsclosed is used for dark data. [?,1] carries the previous set and [?,2] carries the current dark set. Gvolts carries the data with the shutter open. The second hook is for the new subroutines to run. This occurs between each data set as the system waits for the preamp to settle. Usually 5-6 sec. are available to the graph program. After ACQUIRE has saved the last data set in the Write_data subprogram it checks to see if the last set was with the shutter closed. If so, the graph program runs. This is to ensure that a front and back set of dark values are available to find the approx. line of the dark voltages. Upon exiting ACQUIRE checks the left over time and SLEEPs the remaining value. The time available(WAIT_TIME) can be set from the first menu. The third trap is for the runtime menu. The program has an ON KEY keyboard handling routine. This routine checks all key presses for "m" or "M." It marks a flag when it sees one. There are two locations in BEGIN ACQUIRING DATA that check this flag. When true, ACQUIRE is HALTED!!! Data taking pauses while the user is presented with a runtime menu. The user then can continue running ACQUIRE or quit. Plot Window Handling -------------------- There are two subroutines that handle the screen: Draw and Label, and Screen Clearing. Screen Clearing checks the location that data will be plotted on the screen. If the data enters the right half of the screen or wraps back to the left, it plots a black box to clear the half of the screen where the new data will go. It then calls Draw and Label. The purpose of draw and label is to place labels and axis's on the display. It uses GDU(device units) to place various information on screen. This part is relatively simple and should explain itself in the program. The WINDOW definition for the coordinates is a little funky. A horizontal line across the center would be at a Y value of 1. The top graph's center is located at Y=1.1 and the bottom is at Y=1.1. This is a result of the method I used in earlier versions. If it needs to be changed it won't be too hard. All graphing is done with two scale factors: one for the top and one for the bottom. 1 is subtracted from the ratio to center it around 0. Then it is multiplied by the scale factor. Then it is moved up to the graph by adding 1.1(or .9). One important factor in the use of graphics screens that I ran into was the display mode used. I initially developed the plotting routine on a machine equipped with and EGA card and monitor. This was very nice because I was able to use the 16 color palette to enhance the information on the screen. This was quite useful until I ran the software on a CGA system. Using color numbers of one to sixteen is impossible by the way TBASIC handles the 4 color graphics palette. The numbers effect both the color and line style, resulting in some lines being dashed and others being completely black! If the software will be used exclusively on an EGA+ system then it may be worth while to add some extra colors to make the information clearer. The command to do this is "SET COLOR n." Otherwise it is probably not worth the work. Menu Discription ---------------- Top Scale (1) This is the relative amount of change that will be represented by two ticks. The top graph shows what the light source is doing on this particular channel. See (12). Bottom Scale (2) This is the same deal as with the scale of the top graph. The information represented is the change of the ratio between each channel and the reference channel. One note is that sometimes the lower channel numbers are hidden by higher channel numbers. Example: 3 covers 2 completely so it can't be seen then later sticks partly out from behind the 3 later on. This might be fixed with some sort of XOR graphics. ----- # of Power Line Cycles (3) This a measure of the integration time used for each sample. The integration time routine is only set up to handle 1, 10, or 100 PLC. This is why is will only take these values. If you want to use a different number go ahead and change the program, but the integration program will only be able to make a guess which could be WAY off. Number of Channels (4) The MULTIPLEXER versions of ACQUIRE should be able to handle up to ten channels, but presently the multiple DVM programs only have the code for 3 channels. It should be fairly obvious in the program where this extra code need to be. Just add the extra addresses. Until then only use up to three channels. Number of readings ave. for mean (5) This number is how many samples will be averaged to produce a datum in ACQUIRE. Wait Interval (9) Wait_interval is a variable that is very important to the accuracy of the acquired data. Wait_interval defines the time in seconds that ACQUIRE waits between taking dark and light cycles. This time lets the system stabilize on a new voltage range. There is one warning if it is disired to be set low. The minimum rest time will not be able to reach zero seconds for the dark-to-light wait. This is because the graph and disk routines need time to run. This required time should not be a problem if the Wait_interval is greater than about 1 to 2 seconds. It may require more time if ACQUIRE is writting to a floppy disk or running on a 4.77 MHz CPU. Integration Time ---------------- 9-16-90 Kurt Schwehr This file is a command guide or "QUICK REFERENCE" for the commands used in the graph version of ACQUIRE ------------------------------------------------------------------------------- PRINT @Addr:"text" -- Send text commands to a DVM Addr is the address number of DVM (ex. 22,24,26,...) Watch case in text - usually upper only Use "?" after a command to get stus from DVM Ex. -> "DELAY?" asks trigger delay time INPUT @Addr:Variable -- Read text or number from DVM at address Uses after you tell DVM to return a value WRITE GPIB GET(Addr) -- Start sampling on DVM at Addr Addr -- 22, 24, & 26 are single channel 28 is multiplexer (only for current IB setup - numbers are changable) CALL S_out(X,Y) -- Sends data to port x-address y-data (769,8) - open shutter (769,0) - close relay (769,4) - close shutter SET DIALOG ON -- Return to pure text mode after graphics MUCH faster text display than in graphics mode SET DIALOG COLOR X,Y,Z --Set text,background,boarder colors in text mode SET TEXT COLOR X -- Set text color in graphics mode WARNING -- Colors are extremely funky in CGA graphics INIT GRAPH -- Resets all graphics parameters OPTION ANGLE X -- X is Degrees or Radias Sets angle units SET X STYLE Y -- Sets how X ( lines, area, or text) is drawn 0 is a safe value SET WINDOW X1,X2,Y1,Y2 -- Defines window coordinates 0,100,5,500 would be lower left (0,5) upright(100,500) TEXT AT X,Y:"text" -- Plots text at X,Y. For graph mode ON KEY GOSUB xxxx -- Traps a key hits. Allows one to right a key handler that does not stop the program. Ex. Menu in aquire. Flips variable when it finds an "M" or "m" which later activates menu screen.