Download ChartScan/1400 User`s Manual
Transcript
Configure for 12 Channels with Continuous Binary Upload using CONTIN_D.BAS This program configures the ChartScan for 12 Channels and allows the system to continuously upload binary data to disk when the buffer is 75% full. 'Establish communication with the DRIVER488 OPEN "\DEV\IEEEOUT" FOR OUTPUT AS #1 IOCTL #1, "BREAK" PRINT #1, "RESET" OPEN "\DEV\IEEEIN" FOR INPUT AS #2 PRINT #1, "TIMEOUT 5" PRINT #1, "ERROR ON" PRINT #1, "FILL ERROR" PRINT #1, "TERM IN LF EOI" OPEN "Chrtscan.DAT" FOR OUTPUT AS #3 'output data file Dimensions s! = 4096 'number of bytes to be transferred at a time DataBuffer$ = SPACE$(s!) DIM DataBuffer$(s!) DEF FNPEEKW (addr) = PEEK(addr) + 256 * PEEK(addr + 1) 'find the pointer to DataBuffer$ for DMA transfer buffseg% = VARSEG(DataBuffer$) DX% = VARPTR(DataBuffer$) buffoff% = FNPEEKW(DX% + 2) 'Program the ChartScan to power on with Factory default PRINT #1, "CLEAR 07" PRINT #1, "OUTPUT 07;*S1X" 'Reset ChartScan and make sure it is ready CLS : PRINT SLEEP WHILE PRINT INPUT WEND PRINT "The ChartScan is resetting.." #1, "OUTPUT 07;*RX" 3 (sp% AND 4) = 0 #1, "SPOLL 07" #2, sp% 'Setup SRQ handling ON PEN GOSUB UploadHandler PEN ON PRINT #1, "ARM SRQ" 'Program ChartScan to assert an SRQ on a Buffer 75% Full condition PRINT #1, "OUTPUT 07;N64XM32X" 'Setup the ChartScan for line cycle integration mode PRINT #1, "OUTPUT 07;M#0X" PRINT #1, "OUTPUT 07;W#32X" 'Setup ChartScan for 12 channels TC type T PRINT #1, "OUTPUT 07;C1-12,14X" 'Program Scan Counts and a fast timebase PRINT #1, "OUTPUT 07;Y0,1,0X" PRINT #1, "OUTPUT 07;I00:00:00.0,00:00:00.0X" 'Program a trigger start on @ and stop on @ PRINT #1, "OUTPUT 07;Q7,0,0,0,0X T1,1,0,0X" 'Wait for trigger event and Acquisition complete D-16 958296 ChartScan User’s Manual