20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 1 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0001 SUBROUTINE POPAD( IDV, AD_DATA, INTIME ) 0002 C 0003 C 1. Routine: POPAD 0004 C 0005 C Arguments: Device Number Integer*4 0006 C Data Array 16 element Integer*2 Array 0007 C Data Time Integer*4 0008 C 0009 C Use: INTEGER*4 IDEV, ITIME 0010 C INTEGER*2 IDATA(16) 0011 C 0012 C CALL POPAD( IDEV, IDATA, ITIME ) 0013 C 0014 C Data Returned to calling program: 0015 C 0016 C Data Array returns 16 values of type INTEGER*2 0017 C to the calling program. Data is raw information 0018 C provided by an AXV11 without any prior processing. 0019 C If raw data is converted to +/- voltage it will 0020 C fall in range of +/- 10volts. 0021 C 0022 C Data TIME returns a value of type INTEGER*4 to the 0023 C calling program. Data is in the form of 10 0024 C mili-second intervals since the beginning of the 0025 C day. This time is extracted from the VAX system 0026 C clock. 0027 C 0028 C Information Required by Routine: 0029 C 0030 C The Device Number is required for the routine to 0031 C return the Data Array and Time. The valid device 0032 C numbers are as follows: 0033 C 0034 C 1 Device AXA0, an AXV11 controller. 0035 C 2 Device AXB0, an AXV11 controller. 0036 C 0037 C 8 Pseudo Device pointer to data file. 0038 C 9 Pseudo Device pointer to data file. 0039 C 0040 C Rules for use of POPAD routine: 0041 C 0042 C Device 1 and/or 2 MUST have routines ASOC_EF and 0043 C DASOC_EF called. ASOC_EF must be called at the 0044 C beginning of the program being run. DASOC_EF 0045 C must be run just before the exit of the program. 0046 C 0047 C Device 8 and/or 9 MUST have routines AD_OPEN_FILE 0048 C and AD_CLOSE_FILE called. AD_OPEN_FILE must be 0049 C called at the beginning of the program being run. 0050 C AD_CLOSE_FILE must be run after all data has been 0051 C read by the program. 0052 C 0053 C Error conditions: 0054 C 0055 C For Device 1 and/or 2, there are no error conditions. 0056 C The routine retreives the last set of data written 0057 C to the ADDASYS shared real-time database. 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 2 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0058 C 0059 C For Device 8 and/or 9 the following conditions are 0060 C set when no more data, is readable from the data file. 0061 C 0062 C 1. The device number is returned as a 0063 C negative number. 0064 C 2. The data array is returned as 0's. 0065 C 3. The time is set to -8640000. 0066 C 0067 C The routine will not set any return variables but 0068 C will tell SYS$OUTPUT if the data file was not opened. 0069 C 0070 C Other Hints: 0071 C 0072 C The programmer when running this program with any 0073 C of the Device numbers should consider calling a 0074 C CONTROL-Y AST routine at the beginning of the program. 0075 C An example of this is contained in program ADDA_TAB. 0076 C 0077 C 0078 STRUCTURE /FILE_LIST/ 0079 UNION 0080 MAP 0081 INTEGER*2 DATA(120,16) 0082 INTEGER*4 TIME(120) 0083 END MAP 0084 END UNION 0085 END STRUCTURE 0086 RECORD /FILE_LIST/ FILE_BUFFER 0087 C 0088 INTEGER*4 IDV, INTIME, LOC_PNTR, IPNT, LUN 0089 C 0090 INTEGER*2 AD_DATA(16) 0091 C 0092 INCLUDE 'LIB4:[ADDASYS.SOURCE]ADDA_DATA_SHR.INC' 0234 C 0235 IF (IDV .EQ. 1) THEN 0236 LOC_PNTR = CUR_PNTR1 0237 IPNT = AD1_PNTR 0238 IF (AD1_PNTR .EQ. 0) THEN 0239 IPNT = 120 0240 IF (LOC_PNTR .EQ. 1) THEN 0241 LOC_PNTR = 2 0242 ELSE 0243 LOC_PNTR = 1 0244 ENDIF 0245 ENDIF 0246 C 0247 IF (LOC_PNTR .EQ. 1) THEN 0248 DO II = 1,16 0249 AD_DATA(II) = AD1_DATA1(IPNT,II) 0250 ENDDO 0251 INTIME = AD1_TIME1(IPNT) 0252 ELSE 0253 DO II = 1,16 0254 AD_DATA(II) = AD1_DATA2(IPNT,II) 0255 ENDDO POPAD 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 3 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0256 INTIME = AD1_TIME2(IPNT) 0257 ENDIF 0258 C 0259 ELSE IF (IDV .EQ. 2) THEN 0260 C 0261 LOC_PNTR = CUR_PNTR2 0262 IPNT = AD2_PNTR 0263 IF (AD2_PNTR .EQ. 0) THEN 0264 IPNT = 120 0265 IF (LOC_PNTR .EQ. 1) THEN 0266 LOC_PNTR = 2 0267 ELSE 0268 LOC_PNTR = 1 0269 ENDIF 0270 ENDIF 0271 C 0272 IF (LOC_PNTR .EQ. 1) THEN 0273 DO II = 1,16 0274 AD_DATA(II) = AD2_DATA1(IPNT,II) 0275 ENDDO 0276 INTIME = AD2_TIME1(IPNT) 0277 ELSE 0278 DO II = 1,16 0279 AD_DATA(II) = AD2_DATA2(IPNT,II) 0280 ENDDO 0281 INTIME = AD2_TIME2(IPNT) 0282 ENDIF 0283 C 0284 ELSE IF (IDV .EQ. 8) THEN 0285 C 0286 IF (AD8_PNTR .EQ. 0) THEN 0287 C 0288 IF (USE_LOGICAL8) THEN 0289 LUN = 50 + IDV 0290 READ(LUN,IOSTAT=IERR) FILE_BUFFER 0291 ELSE 0292 TYPE *,' %ERROR---> AD_FILE NOT OPEN FOR DEVICE 8.' 0293 RETURN 0294 ENDIF 0295 C 0296 IF (IERR .NE. 0) THEN 0297 IDV = -IDV 0298 INTIME = -864000 0299 DO KK = 1,16 0300 AD_DATA(KK) = 0 0301 ENDDO 0302 RETURN 0303 ENDIF 0304 C 0305 DO II = 1,120 0306 DO JJ = 1,16 0307 AD8_DATA1(II,JJ) = FILE_BUFFER.DATA(II,JJ) 0308 ENDDO 0309 AD8_TIME1(II) = FILE_BUFFER.TIME(II) 0310 ENDDO 0311 C 0312 ENDIF POPAD 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 4 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0313 C 0314 AD8_PNTR = AD8_PNTR + 1 0315 C 0316 INTIME = AD8_TIME1(AD8_PNTR) 0317 C 0318 DO KK = 1,16 0319 AD_DATA(KK) = AD8_DATA1(AD8_PNTR,KK) 0320 ENDDO 0321 C 0322 IF (AD8_PNTR .EQ. 120) AD8_PNTR = 0 0323 C 0324 ELSE IF (IDV .EQ. 9) THEN 0325 C 0326 IF (AD9_PNTR .EQ. 0) THEN 0327 C 0328 IF (USE_LOGICAL9) THEN 0329 LUN = 50 + IDV 0330 READ(LUN,IOSTAT=IERR) FILE_BUFFER 0331 ELSE 0332 TYPE *,' %ERROR---> AD_FILE NOT OPEN FOR DEVICE 9.' 0333 RETURN 0334 ENDIF 0335 C 0336 IF (IERR .NE. 0) THEN 0337 IDV = -IDV 0338 INTIME = -864000 0339 DO KK = 1,16 0340 AD_DATA(KK) = 0 0341 ENDDO 0342 RETURN 0343 ENDIF 0344 C 0345 DO II = 1,120 0346 DO JJ = 1,16 0347 AD9_DATA1(II,JJ) = FILE_BUFFER.DATA(II,JJ) 0348 ENDDO 0349 AD9_TIME1(II) = FILE_BUFFER.TIME(II) 0350 ENDDO 0351 C 0352 ENDIF 0353 C 0354 AD9_PNTR = AD9_PNTR + 1 0355 C 0356 INTIME = AD9_TIME1(AD9_PNTR) 0357 C 0358 DO KK = 1,16 0359 AD_DATA(KK) = AD9_DATA1(AD9_PNTR,KK) 0360 ENDDO 0361 C 0362 IF (AD9_PNTR .EQ. 120) AD9_PNTR = 0 0363 C 0364 ENDIF 0365 RETURN 0366 END POPAD 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 5 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 859 PIC CON REL LCL SHR EXE RD NOWRT LONG 1 $PDATA 84 PIC CON REL LCL SHR NOEXE RD NOWRT LONG 2 $LOCAL 4372 PIC CON REL LCL NOSHR NOEXE RD WRT LONG 3 ADDA_DATA 17352 PIC OVR REL GBL SHR NOEXE RD WRT LONG 4 ADDA_STORE 8656 PIC OVR REL GBL SHR NOEXE RD WRT LONG 5 ADDA_PNTRS 24 PIC OVR REL GBL SHR NOEXE RD WRT LONG 6 ADDA_LOGIC 20 PIC OVR REL GBL SHR NOEXE RD WRT LONG 7 ADDA_NMBR 2924 PIC OVR REL GBL SHR NOEXE RD WRT LONG Total Space Allocated 34291 ENTRY POINTS Address Type Name 0-00000000 POPAD VARIABLES Address Type Name Address Type Name Address Type Name Address Type Name 5-00000008 I*4 AD1_PNTR 5-00000014 I*4 AD2_PNTR 4-000010E0 I*4 AD8_PNTR 4-000021C8 I*4 AD9_PNTR 7-00000000 R*4 CLK_RATE 6-00000010 L*4 CLK_READY 5-00000004 I*4 CUR_PNTR1 5-00000010 I*4 CUR_PNTR2 7-00000018 I*4 CUR_TIME AP-00000004@ I*4 IDV ** I*4 IERR ** I*4 II AP-0000000C@ I*4 INTIME ** I*4 IPNT ** I*4 JJ ** I*4 KK ** I*4 LOC_PNTR ** I*4 LUN 7-00000014 I*4 NEWOPT 5-00000000 I*4 PRV_PNTR1 5-0000000C I*4 PRV_PNTR2 6-00000000 L*4 START_STOP1 6-00000008 L*4 START_STOP2 ** I*4 SYS$BINTIM ** I*4 SYS$SETIMR 6-00000004 L*4 USE_LOGICAL1 6-0000000C L*4 USE_LOGICAL2 4-000010E4 L*4 USE_LOGICAL8 4-000021CC L*4 USE_LOGICAL9 RECORDS Address Name Structure Bytes 2-00000000 FILE_BUFFER FILE_LIST 4320 ARRAYS Address Type Name Bytes Dimensions 3-00001E00 I*2 AD1_BUFFER 32 (16) 3-00000000 I*2 AD1_DATA1 3840 (120, 16) 3-00000F00 I*2 AD1_DATA2 3840 (120, 16) 3-00001E24 I*4 AD1_TIME1 480 (120) 3-00002004 I*4 AD1_TIME2 480 (120) 3-00003FE4 I*2 AD2_BUFFER 32 (16) 3-000021E4 I*2 AD2_DATA1 3840 (120, 16) 3-000030E4 I*2 AD2_DATA2 3840 (120, 16) 3-00004008 I*4 AD2_TIME1 480 (120) POPAD 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 6 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 3-000041E8 I*4 AD2_TIME2 480 (120) 4-00000000 I*2 AD8_DATA1 3840 (120, 16) 4-00000F00 I*4 AD8_TIME1 480 (120) 4-000010E8 I*2 AD9_DATA1 3840 (120, 16) 4-00001FE8 I*4 AD9_TIME1 480 (120) AP-00000008@ I*2 AD_DATA 32 (16) 7-00000004 I*4 AD_NUMBR 8 (2) 3-00001E20 I*2 DA1_BUFFER 4 (2) 3-00004004 I*2 DA2_BUFFER 4 (2) 7-0000000C I*4 DA_NUMBR 8 (2) RECORD ARRAYS Address Name Structure Bytes Dimensions 7-0000001C AD_CHNL AD_LIST 2560 (2, 16) 7-00000A1C DA_CHNL DA_LIST 336 (2, 2) 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 7 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0002 SUBROUTINE PUSHDA( IDEV, LOC_PNTR, IOUTDAT ) 0003 C 0004 C 2. Routine: PUSHDA 0005 C 0006 C Arguments: Device Number Integer*4 0007 C Channel Pointer Integer*4 0008 C Output Data Integer*2 0009 C 0010 C Use: INTEGER*4 IDEV, IPNTR 0011 C INTEGER*2 ODATA 0012 C 0013 C CALL PUSHAD( IDEV, IPNTR, ODATA ) 0014 C 0015 C Data Returned to calling program: 0016 C 0017 C No data is returned by the PUSHDA routine. The 0018 C routine purpose is post data to the ADDASYS real-time 0019 C database for output to a D/A channel. The MAINIO 0020 C program for the specific AXV11 device will handle 0021 C that function. 0022 C 0023 C Information Required by Routine: 0024 C 0025 C The Device Number is required for the routine to 0026 C return the Data Array and Time. The valid device 0027 C numbers are as follows: 0028 C 0029 C 1 Device AXA0, an AXV11 controller. 0030 C 2 Device AXB0, an AXV11 controller. 0031 C 0032 C The channel on the device needs to be specified. 0033 C There are two channels, Channel 0 and Channel 1. 0034 C Send the following to specify the channel: 0035 C 0036 C 1 For Channel 0 0037 C 2 For Channel 1 0038 C 0039 C The data to be written out the D/A channel must 0040 C be supplied. This data is in the format of 0041 C an INTEGER*2 variable. The data must be in the 0042 C format the the A/D converter would supply from 0043 C the POPAD routine. 0044 C 0045 C Rules for use of PUSHAD routine: 0046 C 0047 C No special rules. Just know what your test 0048 C configuration is so you don't set the wrong 0049 C channel on the AXV11 device. 0050 C 0051 C Error conditions: 0052 C 0053 C None returned. 0054 C 0055 C Other Hints: 0056 C 0057 C None. 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 8 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0058 C 0059 C 0060 C 0061 INTEGER*4 IDEV, LOC_PNTR 0062 C 0063 INTEGER*2 IOUTDAT 0064 C 0065 INCLUDE 'LIB4:[ADDASYS.SOURCE]ADDA_DATA_SHR.INC' 0207 C 0208 IF (IDEV .EQ. 1) THEN 0209 C 0210 DA1_BUFFER(LOC_PNTR) = IOUTDAT 0211 C 0212 ELSE IF (IDEV .EQ. 2) THEN 0213 C 0214 DA2_BUFFER(LOC_PNTR) = IOUTDAT 0215 C 0216 ENDIF 0217 C 0218 RETURN 0219 END PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 44 PIC CON REL LCL SHR EXE RD NOWRT LONG 3 ADDA_DATA 17352 PIC OVR REL GBL SHR NOEXE RD WRT LONG 4 ADDA_STORE 8656 PIC OVR REL GBL SHR NOEXE RD WRT LONG 5 ADDA_PNTRS 24 PIC OVR REL GBL SHR NOEXE RD WRT LONG 6 ADDA_LOGIC 20 PIC OVR REL GBL SHR NOEXE RD WRT LONG 7 ADDA_NMBR 2924 PIC OVR REL GBL SHR NOEXE RD WRT LONG Total Space Allocated 29020 ENTRY POINTS Address Type Name 0-00000000 PUSHDA VARIABLES Address Type Name Address Type Name Address Type Name Address Type Name 5-00000008 I*4 AD1_PNTR 5-00000014 I*4 AD2_PNTR 4-000010E0 I*4 AD8_PNTR 4-000021C8 I*4 AD9_PNTR 7-00000000 R*4 CLK_RATE 6-00000010 L*4 CLK_READY 5-00000004 I*4 CUR_PNTR1 5-00000010 I*4 CUR_PNTR2 7-00000018 I*4 CUR_TIME AP-00000004@ I*4 IDEV AP-0000000C@ I*2 IOUTDAT AP-00000008@ I*4 LOC_PNTR 7-00000014 I*4 NEWOPT 5-00000000 I*4 PRV_PNTR1 5-0000000C I*4 PRV_PNTR2 6-00000000 L*4 START_STOP1 6-00000008 L*4 START_STOP2 ** I*4 SYS$BINTIM ** I*4 SYS$SETIMR 6-00000004 L*4 USE_LOGICAL1 6-0000000C L*4 USE_LOGICAL2 4-000010E4 L*4 USE_LOGICAL8 4-000021CC L*4 USE_LOGICAL9 PUSHDA 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 9 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 ARRAYS Address Type Name Bytes Dimensions 3-00001E00 I*2 AD1_BUFFER 32 (16) 3-00000000 I*2 AD1_DATA1 3840 (120, 16) 3-00000F00 I*2 AD1_DATA2 3840 (120, 16) 3-00001E24 I*4 AD1_TIME1 480 (120) 3-00002004 I*4 AD1_TIME2 480 (120) 3-00003FE4 I*2 AD2_BUFFER 32 (16) 3-000021E4 I*2 AD2_DATA1 3840 (120, 16) 3-000030E4 I*2 AD2_DATA2 3840 (120, 16) 3-00004008 I*4 AD2_TIME1 480 (120) 3-000041E8 I*4 AD2_TIME2 480 (120) 4-00000000 I*2 AD8_DATA1 3840 (120, 16) 4-00000F00 I*4 AD8_TIME1 480 (120) 4-000010E8 I*2 AD9_DATA1 3840 (120, 16) 4-00001FE8 I*4 AD9_TIME1 480 (120) 7-00000004 I*4 AD_NUMBR 8 (2) 3-00001E20 I*2 DA1_BUFFER 4 (2) 3-00004004 I*2 DA2_BUFFER 4 (2) 7-0000000C I*4 DA_NUMBR 8 (2) RECORD ARRAYS Address Name Structure Bytes Dimensions 7-0000001C AD_CHNL AD_LIST 2560 (2, 16) 7-00000A1C DA_CHNL DA_LIST 336 (2, 2) 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 10 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0002 SUBROUTINE IO_CONTROL( IOPT, IDV ) 0003 C 0004 C 3. Routine: IO_CONTROL 0005 C 0006 C Arguments: Option INTEGER*4 0007 C Device Number INTEGER*4 0008 C 0009 C Use: INTEGER*4 IOPT, IDEV 0010 C 0011 C IOPT = 0 !Start the MAINIO program gathering 0012 C IDEV = 1 !Specify device AXA0. 0013 C 0014 C CALL IO_CONTROL( IOPT, IDEV ) 0015 C 0016 C Data Returned to calling program: 0017 C 0018 C None returned. 0019 C 0020 C Information Required by Routine: 0021 C 0022 C Option Value Meaning: 0023 C 0024 C 0 Start gathering A/D data 0025 C 1 0026 C 2 0027 C 3 Stop MAINIO program altogether 0028 C 0029 C Device Number: 0030 C 0031 C The Device Number is required for the routine to 0032 C know which MAINIO program to control. 0033 C 0034 C 1 Device AXA0, an AXV11 controller. 0035 C 2 Device AXB0, an AXV11 controller. 0036 C 0037 C Rules for use of IO_CONTROL routine: 0038 C 0039 C Generally this routine should not be called by 0040 C a user program. The control of the MAINIO 0041 C programs should be performed from the main 0042 C ADDASYS menu. 0043 C 0044 C Error conditions: 0045 C 0046 C None returned. 0047 C 0048 C Other Hints: 0049 C 0050 C None. 0051 C 0052 C 0053 C 0054 INTEGER*4 AD_LUN, STATUS, IOPT, IEFN, JEFN 0055 CHARACTER*11 ADDA_START 0056 LOGICAL LOC_USE, LOC_STAT 0057 C IO_CONTROL 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 11 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0058 INCLUDE 'LIB4:[ADDASYS.SOURCE]ADDA_DATA_SHR.INC' 0200 C 0201 C*** FIRST LET'S INDICATE THE OPTION TO THE SHARABLE IMAGE. 0202 C 0203 NEWOPT = IOPT 0204 C 0205 C*** IF WE ARE ACTING ON DEVICE ONE, THE SET LOGICALS ASSOCIATED. 0206 C 0207 IF (IDV .EQ. 1) THEN 0208 LOC_USE = USE_LOGICAL1 0209 IF (IOPT .EQ. 3) START_STOP1 = .TRUE. 0210 C 0211 C*** IF WE ARE ACTING ON DEVICE TWO, THE SET LOGICALS ASSOCIATED. 0212 C 0213 ELSE IF (IDV .EQ. 2) THEN 0214 LOC_USE = USE_LOGICAL2 0215 IF (IOPT .EQ. 3) START_STOP2 = .TRUE. 0216 ENDIF 0217 C 0218 C*** IF THE VALUE OF LOC_USE IS TRUE, THEN WE ARE FINISHED WITH OPERATIONS. 0219 C 0220 IF (LOC_USE) RETURN 0221 C 0222 C*** ASSOCIATE PROGRAM WITH THE EVENT FLAG CLUSTER. 0223 C 0224 CALL ASOC_EF 0225 C 0226 C*** DETERMINE IF WE ARE STOPPING ALL OPERATIONS, THEN SET EVENT FLAG. 0227 C 0228 IF (IOPT .EQ. 3) THEN 0229 C 0230 IEFN = 95 0231 STATUS = SYS$SETEF( %VAL(IEFN) ) 0232 IF (.NOT. STATUS) CALL LIB$SIGNAL( %VAL( STATUS )) 0233 C 0234 C*** NOT STOPPING ALL OPERATIONS SET DEFAULT EVENT FLAG 0235 C 0236 ELSE 0237 C 0238 C*** DEFINE THE EVENT FLAGS FOR OPERATIONS. 0239 C 0240 IEFN = 80 + IDV - 1 0241 JEFN = 81 + IDV + 1 0242 C 0243 C*** SET EVENT FLAG DEFINED. 0244 C 0245 STATUS = SYS$SETEF( %VAL(IEFN) ) 0246 IF (.NOT. STATUS) CALL LIB$SIGNAL( %VAL( STATUS )) 0247 C 0248 C*** WAIT FOR EVENT FLAG DEFINED. 0249 C 0250 STATUS = SYS$WAITFR( %VAL(JEFN) ) 0251 IF (.NOT. STATUS) CALL LIB$SIGNAL( %VAL( STATUS )) 0252 C 0253 C*** DEFINE THE LOGICAL UNIT NUMBER FOR OPERATIONS. 0254 C 0255 AD_LUN = 100 + IDV - 1 IO_CONTROL 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 12 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0256 C 0257 C*** DEFINE THE MAILBOX NAME FOR CONTROL OF THE MAINIO PROGRAM. 0258 C 0259 ADDA_START = 'ADDA_START'//' ' 0260 ENCODE(1,'(I1)',ADDA_START(11:11)) IDV 0261 C 0262 C*** OPEN MAILBOX AND PASS OPTION TO MAILBOX. 0263 C 0264 OPEN( UNIT = AD_LUN, FILE=ADDA_START, 0265 & CARRIAGECONTROL = 'LIST', STATUS = 'OLD' ) 0266 C 0267 WRITE(AD_LUN,50) IOPT 0268 50 FORMAT(I1) 0269 C 0270 CLOSE(UNIT=AD_LUN) 0271 C 0272 ENDIF 0273 C 0274 C*** WAIT FOR A BIT, THEN PROCEED. 0275 C 0276 CALL WAITABIT( 1.0 ) 0277 C 0278 C*** CLEAR EVENT FLAG VALUE. 0279 C 0280 STATUS = SYS$CLREF( %VAL(IEFN) ) 0281 IF (.NOT. STATUS) CALL LIB$SIGNAL( %VAL( STATUS )) 0282 C 0283 C*** DISASSOCIATE FROM EVENT FLAG CLUSTER. 0284 C 0285 CALL DASOC_EF 0286 C 0287 RETURN 0288 END IO_CONTROL 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 13 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 345 PIC CON REL LCL SHR EXE RD NOWRT LONG 1 $PDATA 21 PIC CON REL LCL SHR NOEXE RD NOWRT LONG 2 $LOCAL 144 PIC CON REL LCL NOSHR NOEXE RD WRT LONG 3 ADDA_DATA 17352 PIC OVR REL GBL SHR NOEXE RD WRT LONG 4 ADDA_STORE 8656 PIC OVR REL GBL SHR NOEXE RD WRT LONG 5 ADDA_PNTRS 24 PIC OVR REL GBL SHR NOEXE RD WRT LONG 6 ADDA_LOGIC 20 PIC OVR REL GBL SHR NOEXE RD WRT LONG 7 ADDA_NMBR 2924 PIC OVR REL GBL SHR NOEXE RD WRT LONG Total Space Allocated 29486 ENTRY POINTS Address Type Name 0-00000000 IO_CONTROL VARIABLES Address Type Name Address Type Name Address Type Name Address Type Name 5-00000008 I*4 AD1_PNTR 5-00000014 I*4 AD2_PNTR 4-000010E0 I*4 AD8_PNTR 4-000021C8 I*4 AD9_PNTR 2-00000000 CHAR ADDA_START 2-0000000C I*4 AD_LUN 7-00000000 R*4 CLK_RATE 6-00000010 L*4 CLK_READY 5-00000004 I*4 CUR_PNTR1 5-00000010 I*4 CUR_PNTR2 7-00000018 I*4 CUR_TIME AP-00000008@ I*4 IDV ** I*4 IEFN AP-00000004@ I*4 IOPT ** I*4 JEFN ** L*4 LOC_STAT 2-00000010 L*4 LOC_USE 7-00000014 I*4 NEWOPT 5-00000000 I*4 PRV_PNTR1 5-0000000C I*4 PRV_PNTR2 6-00000000 L*4 START_STOP1 6-00000008 L*4 START_STOP2 ** I*4 STATUS ** I*4 SYS$BINTIM ** I*4 SYS$SETIMR 6-00000004 L*4 USE_LOGICAL1 6-0000000C L*4 USE_LOGICAL2 4-000010E4 L*4 USE_LOGICAL8 4-000021CC L*4 USE_LOGICAL9 ARRAYS Address Type Name Bytes Dimensions 3-00001E00 I*2 AD1_BUFFER 32 (16) 3-00000000 I*2 AD1_DATA1 3840 (120, 16) 3-00000F00 I*2 AD1_DATA2 3840 (120, 16) 3-00001E24 I*4 AD1_TIME1 480 (120) 3-00002004 I*4 AD1_TIME2 480 (120) 3-00003FE4 I*2 AD2_BUFFER 32 (16) 3-000021E4 I*2 AD2_DATA1 3840 (120, 16) 3-000030E4 I*2 AD2_DATA2 3840 (120, 16) 3-00004008 I*4 AD2_TIME1 480 (120) 3-000041E8 I*4 AD2_TIME2 480 (120) 4-00000000 I*2 AD8_DATA1 3840 (120, 16) 4-00000F00 I*4 AD8_TIME1 480 (120) 4-000010E8 I*2 AD9_DATA1 3840 (120, 16) 4-00001FE8 I*4 AD9_TIME1 480 (120) 7-00000004 I*4 AD_NUMBR 8 (2) 3-00001E20 I*2 DA1_BUFFER 4 (2) IO_CONTROL 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 14 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 3-00004004 I*2 DA2_BUFFER 4 (2) 7-0000000C I*4 DA_NUMBR 8 (2) RECORD ARRAYS Address Name Structure Bytes Dimensions 7-0000001C AD_CHNL AD_LIST 2560 (2, 16) 7-00000A1C DA_CHNL DA_LIST 336 (2, 2) LABELS Address Label 1-00000007 50' FUNCTIONS AND SUBROUTINES REFERENCED Type Name Type Name Type Name Type Name Type Name Type Name ASOC_EF DASOC_EF FOR$CLOSE FOR$OPEN LIB$SIGNAL I*4 SYS$CLREF I*4 SYS$SETEF I*4 SYS$WAITFR WAITABIT 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 15 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0002 SUBROUTINE WAITABIT( SECS ) 0003 C 0004 C 4. Routine: WAITABIT 0005 C 0006 C Arguments: Seconds to Wait REAL*4 0007 C 0008 C Use: REAL*4 SECS 0009 C 0010 C SECS = 4.5 !wait 4.5 seconds then proceed. 0011 C 0012 C CALL WAITABIT( SECS ) 0013 C 0014 C Data Returned to calling program: 0015 C 0016 C None returned. 0017 C 0018 C Information Required by Routine: 0019 C 0020 C Routine requires only the number of seconds that 0021 C it should cause the program to pause during its 0022 C execution. The routine will enter a wait state 0023 C for that length of time, then return to the call- 0024 C ing routine for continued execution. 0025 C 0026 C Rules for use of WAITABIT routine: 0027 C 0028 C Routine can handle waits from 0.01 - 99.9 seconds. 0029 C 0030 C Error conditions: 0031 C 0032 C None. 0033 C 0034 C Other Hints: 0035 C 0036 C None. 0037 C 0038 C 0039 C 0040 REAL*4 SECS, RSEC 0041 INTEGER*4 STATUS_H, DELTA(2), TIMER_EF, SYS$BINTIM, 0042 & SYS$WAITFR, SYS$SETIMR 0043 CHARACTER SECONDS*5, MINUTE*2 0044 C 0045 RSEC = SECS 0046 C 0047 IF (RSEC .LT. 1.0) THEN 0048 ENCODE(4,8000,SECONDS) RSEC 0049 8000 FORMAT(F4.2) 0050 STATUS_H = SYS$BINTIM('0 00:00:'//SECONDS,DELTA) 0051 ELSE IF (RSEC .LT. 60.0) THEN 0052 ENCODE(5,8010,SECONDS) RSEC 0053 8010 FORMAT(F5.2) 0054 STATUS_H = SYS$BINTIM('0 00:00:'//SECONDS,DELTA) 0055 ELSE 0056 IMINUTE = RSEC/60 0057 RSEC = RSEC - (IMINUTE * 60.0) WAITABIT 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 16 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0058 ENCODE(5,8020,SECONDS) RSEC 0059 8020 FORMAT(F5.2) 0060 ENCODE(2,8030,MINUTE) IMINUTE 0061 8030 FORMAT(I2) 0062 STATUS_H = SYS$BINTIM('0 00:'//MINUTE//':'//SECONDS,DELTA) 0063 DELTA(1) = -DELTA(1) 0064 DELTA(2) = -DELTA(2) 0065 ENDIF 0066 STATUS_H = SYS$SETIMR(%VAL(TIMER_EF),DELTA,,) 0067 STATUS_H = SYS$WAITFR(%VAL(TIMER_EF)) 0068 C 0069 RETURN 0070 END PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 356 PIC CON REL LCL SHR EXE RD NOWRT LONG 1 $PDATA 20 PIC CON REL LCL SHR NOEXE RD NOWRT LONG 2 $LOCAL 108 PIC CON REL LCL NOSHR NOEXE RD WRT LONG Total Space Allocated 484 ENTRY POINTS Address Type Name 0-00000000 WAITABIT VARIABLES Address Type Name Address Type Name Address Type Name Address Type Name ** I*4 IMINUTE 2-0000000D CHAR MINUTE ** R*4 RSEC 2-00000008 CHAR SECONDS AP-00000004@ R*4 SECS ** I*4 STATUS_H 2-00000010 I*4 TIMER_EF ARRAYS Address Type Name Bytes Dimensions 2-00000000 I*4 DELTA 8 (2) LABELS Address Label Address Label Address Label Address Label 1-00000000 8000' 1-00000004 8010' 1-00000008 8020' 1-0000000C 8030' WAITABIT 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 17 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 FUNCTIONS AND SUBROUTINES REFERENCED Type Name Type Name Type Name I*4 SYS$BINTIM I*4 SYS$SETIMR I*4 SYS$WAITFR 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 18 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0002 SUBROUTINE WAITFLAG( IDV ) 0003 C 0004 C 5. Routine: WAITFLAG 0005 C 0006 C Arguments: Device Number INTEGER*4 0007 C 0008 C Use: INTEGER*4 IDEV 0009 C 0010 C IDEV = 1 !Wait for next data update on dev 1 0011 C 0012 C CALL WAITFLAG( IDEV ) 0013 C 0014 C Data Returned to calling program: 0015 C 0016 C No data returned, just allows program to continue 0017 C normal execution once it knows another data 0018 C point has been posted the the ADDASYS database. 0019 C Now the POPAD routine can be called. 0020 C 0021 C Information Required by Routine: 0022 C 0023 C Device Number: 0024 C 0025 C The Device Number is required for the routine to 0026 C know which Data array to wait for. 0027 C 0028 C 1 Device AXA0, an AXV11 controller. 0029 C 2 Device AXB0, an AXV11 controller. 0030 C 0031 C Rules for use of POPAD routine: 0032 C 0033 C No specific rules, just make sure MAINIO routine 0034 C for the specific device is running on the system, 0035 C and is activated to gather data. 0036 C 0037 C Error conditions: 0038 C 0039 C None returned. Will wait till next data point 0040 C is gathered. MAINIO must be in proper state. 0041 C 0042 C Other Hints: 0043 C 0044 C None. 0045 C 0046 C 0047 INTEGER*4 STATUS_W, IDV, IEFN, SYS$WAITFR, CEFN 0048 INTEGER*4 SYS$ASCEFC, SYS$DACEFC, SYS$CLREF 0049 C 0050 IEFN = 70 + IDV - 1 0051 C 0052 STATUS_W = SYS$WAITFR( %VAL(IEFN) ) 0053 IF (.NOT. STATUS_W) CALL LIB$SIGNAL( %VAL( STATUS_W )) 0054 C 0055 C STATUS_W = SYS$CLREF( %VAL(IEFN) ) 0056 C IF (.NOT. STATUS_W) CALL LIB$SIGNAL( %VAL( STATUS_W )) 0057 C WAITFLAG 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 19 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0058 RETURN 0059 END PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 45 PIC CON REL LCL SHR EXE RD NOWRT LONG 2 $LOCAL 16 PIC CON REL LCL NOSHR NOEXE RD WRT LONG Total Space Allocated 61 ENTRY POINTS Address Type Name 0-00000000 WAITFLAG VARIABLES Address Type Name Address Type Name Address Type Name Address Type Name ** I*4 CEFN AP-00000004@ I*4 IDV ** I*4 IEFN ** I*4 STATUS_W ** I*4 SYS$ASCEFC ** I*4 SYS$CLREF ** I*4 SYS$DACEFC FUNCTIONS AND SUBROUTINES REFERENCED Type Name Type Name LIB$SIGNAL I*4 SYS$WAITFR 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 20 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0002 SUBROUTINE ASOC_EF( ) 0003 C 0004 C 6. Routine: ASOC_EF 0005 C 0006 C Purpose is to associate the user program with 0007 C the proper event flags used by the MAINIO 0008 C programs run for each device. 0009 C 0010 C Arguments: None 0011 C 0012 C Use: 0013 C 0014 C CALL ASOC_EF 0015 C 0016 C Data Returned to calling program: 0017 C 0018 C None 0019 C 0020 C Information Required by Routine: 0021 C 0022 C None 0023 C 0024 C Rules for use of ASOC_EF routine: 0025 C 0026 C Must be run from same group as ADDASYS 0027 C MAINIO and FILER routines. This is 0028 C group 224 on the EPLAB MicroVAX. 0029 C 0030 C Error conditions: 0031 C 0032 C None returned. 0033 C 0034 C Other Hints: 0035 C 0036 C Should be run at the beginning of a user program. 0037 C 0038 C 0039 INTEGER*4 STATUS_W, CEFN 0040 INTEGER*4 SYS$ASCEFC 0041 C 0042 CEFN = 64 0043 C 0044 STATUS_W = SYS$ASCEFC( %VAL(CEFN), 'ADDA_DATA_GET', ,) 0045 IF (.NOT. STATUS_W) CALL LIB$SIGNAL( %VAL( STATUS_W )) 0046 C 0047 RETURN 0048 END ASOC_EF 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 21 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 38 PIC CON REL LCL SHR EXE RD NOWRT LONG 1 $PDATA 14 PIC CON REL LCL SHR NOEXE RD NOWRT LONG 2 $LOCAL 36 PIC CON REL LCL NOSHR NOEXE RD WRT LONG Total Space Allocated 88 ENTRY POINTS Address Type Name 0-00000000 ASOC_EF VARIABLES Address Type Name Address Type Name ** I*4 CEFN ** I*4 STATUS_W FUNCTIONS AND SUBROUTINES REFERENCED Type Name Type Name LIB$SIGNAL I*4 SYS$ASCEFC 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 22 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0002 SUBROUTINE DASOC_EF( ) 0003 C 0004 C 7. Routine: DASOC_EF 0005 C 0006 C Purpose is to de-associate the program from 0007 C the event flags being used by the MAINIO 0008 C programs used by each device. 0009 C 0010 C Arguments: None 0011 C 0012 C Use: 0013 C 0014 C CALL DASOC_EF 0015 C 0016 C Data Returned to calling program: 0017 C 0018 C None 0019 C 0020 C Information Required by Routine: 0021 C 0022 C None 0023 C 0024 C Rules for use of DASOC_EF routine: 0025 C 0026 C Should be run at the end of the user program 0027 C being run. Need only be run if ASOC_EF was 0028 C run in the routine, then DASOC_EF must be run. 0029 C 0030 C Error conditions: 0031 C 0032 C None returned. 0033 C 0034 C Other Hints: 0035 C 0036 C None. 0037 C 0038 C 0039 INTEGER*4 STATUS_W, CEFN, SYS$DACEFC 0040 C 0041 CEFN = 64 0042 C 0043 STATUS_W = SYS$DACEFC( %VAL(CEFN) ) 0044 IF (.NOT. STATUS_W) CALL LIB$SIGNAL( %VAL( STATUS_W )) 0045 C 0046 RETURN 0047 END DASOC_EF 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 23 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 37 PIC CON REL LCL SHR EXE RD NOWRT LONG 2 $LOCAL 16 PIC CON REL LCL NOSHR NOEXE RD WRT LONG Total Space Allocated 53 ENTRY POINTS Address Type Name 0-00000000 DASOC_EF VARIABLES Address Type Name Address Type Name ** I*4 CEFN ** I*4 STATUS_W FUNCTIONS AND SUBROUTINES REFERENCED Type Name Type Name LIB$SIGNAL I*4 SYS$DACEFC 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 24 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0002 SUBROUTINE AD_OPEN_FILE( IDV, AD_FILE ) 0003 C 0004 C 8. Routine: AD_OPEN_FILE 0005 C 0006 C Purpose is to open an existing file and to 0007 C associate that file with a device number 0008 C for use by a post-test data analsysis. 0009 C 0010 C Arguments: Device Number INTEGER*4 0011 C File name CHARACTER*64 0012 C 0013 C Use: INTEGER*4 IDEV 0014 C CHARACTER*64 FNAME 0015 C 0016 C IDEV = 8 !Associate file with device 8 0017 C FNAME = 'TEMPDATA.DAT' !Open existing file. 0018 C 0019 C CALL AD_OPEN_FILE( IDEV, FNAME ) 0020 C 0021 C Data Returned to calling program: 0022 C 0023 C None returned. 0024 C 0025 C Information Required by Routine: 0026 C 0027 C Device Number: Needed to associate the 0028 C file to be read with a 0029 C pseudo device so the POPAD 0030 C call can be used for either 0031 C real-time or post-test analyses. 0032 C 0033 C File Name: File name of the file to 0034 C associate with the device number. 0035 C 0036 C Rules for use of AD_OPEN_FILE routine: 0037 C 0038 C Place the name of the file to be opened in 0039 C a 64 Character string. Pass string to the 0040 C AD_OPEN_FILE routine. Use device number 8 0041 C or 9 with the file name. Only two files can 0042 C be opened at a time, one for each device. 0043 C 0044 C Error conditions: 0045 C 0046 C Informs user if file does not exist. 0047 C Informs user that device number 8 or 9 must 0048 C be used by this routine. 0049 C 0050 C Returns a negative device number if file 0051 C does not exist. 0052 C 0053 C Other Hints: 0054 C 0055 C None. 0056 C 0057 C AD_OPEN_FILE 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 25 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0058 INTEGER*4 IDV 0059 C 0060 CHARACTER*64 AD_FILE 0061 C 0062 INCLUDE 'LIB4:[ADDASYS.SOURCE]ADDA_DATA_SHR.INC' 0204 C 0205 IF ((IDV .LT. 8) .AND. (IDV .GT. 9)) THEN 0206 TYPE *,'Illegal device called. Use only device 8 or 9.' 0207 RETURN 0208 ENDIF 0209 C 0210 LUN = 50 +IDV 0211 C 0212 OPEN( UNIT = LUN, FILE=AD_FILE, ERR=9900, 0213 & STATUS = 'OLD', FORM='UNFORMATTED' ) 0214 C 0215 IF (IDV .EQ. 8) THEN 0216 AD8_PNTR = 0 0217 USE_LOGICAL8 = .TRUE. 0218 DO II = 1,120 0219 DO JJ = 1,16 0220 AD8_DATA1(II,JJ) = 0 0221 ENDDO 0222 AD8_TIME1(II) = -864000 0223 ENDDO 0224 ENDIF 0225 C 0226 IF (IDV .EQ. 9) THEN 0227 AD9_PNTR = 0 0228 USE_LOGICAL9 = .TRUE. 0229 DO II = 1,120 0230 DO JJ = 1,16 0231 AD9_DATA1(II,JJ) = 0 0232 ENDDO 0233 AD9_TIME1(II) = -864000 0234 ENDDO 0235 ENDIF 0236 C 0237 RETURN 0238 C 0239 9900 IDEV = -IDEV 0240 C 0241 RETURN 0242 C 0243 END AD_OPEN_FILE 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 26 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 222 PIC CON REL LCL SHR EXE RD NOWRT LONG 1 $PDATA 47 PIC CON REL LCL SHR NOEXE RD NOWRT LONG 2 $LOCAL 60 PIC CON REL LCL NOSHR NOEXE RD WRT LONG 3 ADDA_DATA 17352 PIC OVR REL GBL SHR NOEXE RD WRT LONG 4 ADDA_STORE 8656 PIC OVR REL GBL SHR NOEXE RD WRT LONG 5 ADDA_PNTRS 24 PIC OVR REL GBL SHR NOEXE RD WRT LONG 6 ADDA_LOGIC 20 PIC OVR REL GBL SHR NOEXE RD WRT LONG 7 ADDA_NMBR 2924 PIC OVR REL GBL SHR NOEXE RD WRT LONG Total Space Allocated 29305 ENTRY POINTS Address Type Name 0-00000000 AD_OPEN_FILE VARIABLES Address Type Name Address Type Name Address Type Name Address Type Name 5-00000008 I*4 AD1_PNTR 5-00000014 I*4 AD2_PNTR 4-000010E0 I*4 AD8_PNTR 4-000021C8 I*4 AD9_PNTR AP-00000008@ CHAR AD_FILE 7-00000000 R*4 CLK_RATE 6-00000010 L*4 CLK_READY 5-00000004 I*4 CUR_PNTR1 5-00000010 I*4 CUR_PNTR2 7-00000018 I*4 CUR_TIME 2-00000004 I*4 IDEV AP-00000004@ I*4 IDV ** I*4 II ** I*4 JJ 2-00000000 I*4 LUN 7-00000014 I*4 NEWOPT 5-00000000 I*4 PRV_PNTR1 5-0000000C I*4 PRV_PNTR2 6-00000000 L*4 START_STOP1 6-00000008 L*4 START_STOP2 ** I*4 SYS$BINTIM ** I*4 SYS$SETIMR 6-00000004 L*4 USE_LOGICAL1 6-0000000C L*4 USE_LOGICAL2 4-000010E4 L*4 USE_LOGICAL8 4-000021CC L*4 USE_LOGICAL9 ARRAYS Address Type Name Bytes Dimensions 3-00001E00 I*2 AD1_BUFFER 32 (16) 3-00000000 I*2 AD1_DATA1 3840 (120, 16) 3-00000F00 I*2 AD1_DATA2 3840 (120, 16) 3-00001E24 I*4 AD1_TIME1 480 (120) 3-00002004 I*4 AD1_TIME2 480 (120) 3-00003FE4 I*2 AD2_BUFFER 32 (16) 3-000021E4 I*2 AD2_DATA1 3840 (120, 16) 3-000030E4 I*2 AD2_DATA2 3840 (120, 16) 3-00004008 I*4 AD2_TIME1 480 (120) 3-000041E8 I*4 AD2_TIME2 480 (120) 4-00000000 I*2 AD8_DATA1 3840 (120, 16) 4-00000F00 I*4 AD8_TIME1 480 (120) 4-000010E8 I*2 AD9_DATA1 3840 (120, 16) 4-00001FE8 I*4 AD9_TIME1 480 (120) 7-00000004 I*4 AD_NUMBR 8 (2) 3-00001E20 I*2 DA1_BUFFER 4 (2) 3-00004004 I*2 DA2_BUFFER 4 (2) AD_OPEN_FILE 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 27 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 7-0000000C I*4 DA_NUMBR 8 (2) RECORD ARRAYS Address Name Structure Bytes Dimensions 7-0000001C AD_CHNL AD_LIST 2560 (2, 16) 7-00000A1C DA_CHNL DA_LIST 336 (2, 2) LABELS Address Label 0-000000D8 9900 FUNCTIONS AND SUBROUTINES REFERENCED Type Name FOR$OPEN 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 28 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0002 SUBROUTINE AD_CLOSE_FILE( IDV ) 0003 C 0004 C 9. Routine: AD_CLOSE_FILE 0005 C 0006 C Arguments: Device Number INTEGER*4 0007 C 0008 C Use: INTEGER*4 IDEV 0009 C 0010 C IDEV = 8 !Associate file with device 8 0011 C 0012 C CALL AD_CLOSE_FILE( IDEV ) 0013 C 0014 C Data Returned to calling program: 0015 C 0016 C None returned. 0017 C 0018 C Information Required by Routine: 0019 C 0020 C Device Number: Needed to associate the 0021 C file to be read with a 0022 C pseudo device so the POPAD 0023 C call can be used for either 0024 C real-time or post-test analyses. 0025 C 0026 C Rules for use of POPAD routine: 0027 C 0028 C Just pass the device number associated with 0029 C the file to be closed. 0030 C 0031 C Error conditions: 0032 C 0033 C Informs user if device number is proper for 0034 C this call. Must be device 8 or 9. 0035 C 0036 C Other Hints: 0037 C 0038 C None. 0039 C 0040 C 0041 C 0042 INTEGER*4 IDV 0043 C 0044 INCLUDE 'LIB4:[ADDASYS.SOURCE]ADDA_DATA_SHR.INC' 0186 C 0187 IF ((IDV .LT. 8) .AND. (IDV .GT. 9)) THEN 0188 TYPE *,'Illegal device called. Use only device 8 or 9.' 0189 RETURN 0190 ENDIF 0191 C 0192 LUN = 50 +IDV 0193 C 0194 CLOSE(UNIT=LUN, STATUS='SAVE') 0195 C 0196 IF (IDV .EQ. 8) THEN 0197 USE_LOGICAL8 = .FALSE. 0198 ENDIF AD_CLOSE_FILE 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 29 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 0199 C 0200 IF (IDV .EQ. 9) THEN 0201 USE_LOGICAL9 = .FALSE. 0202 ENDIF 0203 C 0204 RETURN 0205 END PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 90 PIC CON REL LCL SHR EXE RD NOWRT LONG 1 $PDATA 47 PIC CON REL LCL SHR NOEXE RD NOWRT LONG 2 $LOCAL 28 PIC CON REL LCL NOSHR NOEXE RD WRT LONG 3 ADDA_DATA 17352 PIC OVR REL GBL SHR NOEXE RD WRT LONG 4 ADDA_STORE 8656 PIC OVR REL GBL SHR NOEXE RD WRT LONG 5 ADDA_PNTRS 24 PIC OVR REL GBL SHR NOEXE RD WRT LONG 6 ADDA_LOGIC 20 PIC OVR REL GBL SHR NOEXE RD WRT LONG 7 ADDA_NMBR 2924 PIC OVR REL GBL SHR NOEXE RD WRT LONG Total Space Allocated 29141 ENTRY POINTS Address Type Name 0-00000000 AD_CLOSE_FILE VARIABLES Address Type Name Address Type Name Address Type Name Address Type Name 5-00000008 I*4 AD1_PNTR 5-00000014 I*4 AD2_PNTR 4-000010E0 I*4 AD8_PNTR 4-000021C8 I*4 AD9_PNTR 7-00000000 R*4 CLK_RATE 6-00000010 L*4 CLK_READY 5-00000004 I*4 CUR_PNTR1 5-00000010 I*4 CUR_PNTR2 7-00000018 I*4 CUR_TIME AP-00000004@ I*4 IDV 2-00000000 I*4 LUN 7-00000014 I*4 NEWOPT 5-00000000 I*4 PRV_PNTR1 5-0000000C I*4 PRV_PNTR2 6-00000000 L*4 START_STOP1 6-00000008 L*4 START_STOP2 ** I*4 SYS$BINTIM ** I*4 SYS$SETIMR 6-00000004 L*4 USE_LOGICAL1 6-0000000C L*4 USE_LOGICAL2 4-000010E4 L*4 USE_LOGICAL8 4-000021CC L*4 USE_LOGICAL9 ARRAYS Address Type Name Bytes Dimensions 3-00001E00 I*2 AD1_BUFFER 32 (16) 3-00000000 I*2 AD1_DATA1 3840 (120, 16) 3-00000F00 I*2 AD1_DATA2 3840 (120, 16) 3-00001E24 I*4 AD1_TIME1 480 (120) 3-00002004 I*4 AD1_TIME2 480 (120) 3-00003FE4 I*2 AD2_BUFFER 32 (16) 3-000021E4 I*2 AD2_DATA1 3840 (120, 16) AD_CLOSE_FILE 20-Nov-1990 18:09:24 VAX FORTRAN V5.4-79 Page 30 01 6-Jul-1990 10:45:37 LIB4:[ADDASYS.SOURCE]ADDA_USER.FOR;22 3-000030E4 I*2 AD2_DATA2 3840 (120, 16) 3-00004008 I*4 AD2_TIME1 480 (120) 3-000041E8 I*4 AD2_TIME2 480 (120) 4-00000000 I*2 AD8_DATA1 3840 (120, 16) 4-00000F00 I*4 AD8_TIME1 480 (120) 4-000010E8 I*2 AD9_DATA1 3840 (120, 16) 4-00001FE8 I*4 AD9_TIME1 480 (120) 7-00000004 I*4 AD_NUMBR 8 (2) 3-00001E20 I*2 DA1_BUFFER 4 (2) 3-00004004 I*2 DA2_BUFFER 4 (2) 7-0000000C I*4 DA_NUMBR 8 (2) RECORD ARRAYS Address Name Structure Bytes Dimensions 7-0000001C AD_CHNL AD_LIST 2560 (2, 16) 7-00000A1C DA_CHNL DA_LIST 336 (2, 2) FUNCTIONS AND SUBROUTINES REFERENCED Type Name FOR$CLOSE COMMAND QUALIFIERS FOR/LIS/EXTEND ADDA_USER /CHECK=(NOBOUNDS,OVERFLOW,NOUNDERFLOW) /DEBUG=(NOSYMBOLS,TRACEBACK) /DESIGN=(NOCOMMENTS,NOPLACEHOLDERS) /SHOW=(NODICTIONARY,NOINCLUDE,MAP,NOPREPROCESSOR,SINGLE) /STANDARD=(NOSEMANTIC,NOSOURCE_FORM,NOSYNTAX) /WARNINGS=(NODECLARATIONS,GENERAL,NOULTRIX,NOVAXELN) /CONTINUATIONS=19 /NOCROSS_REFERENCE /NOD_LINES /EXTEND_SOURCE /F77 /NOG_FLOATING /I4 /NOMACHINE_CODE /OPTIMIZE /NOPARALLEL /NOANALYSIS_DATA /NODIAGNOSTICS /LIST=LIB4:[ADDASYS.SOURCE]ADDA_USER.LIS;22 /OBJECT=LIB4:[ADDASYS.SOURCE]ADDA_USER.OBJ;1 COMPILATION STATISTICS Run Time: 13.87 seconds Elapsed Time: 19.50 seconds Page Faults: 940 Dynamic Memory: 620 pages