20-Nov-1990 18:07:22 VAX FORTRAN V5.4-79 Page 1 14-Jul-1988 19:37:29 LIB4:[ADDASYS.SOURCE]ADDA_MAP.FOR;3 0001 SUBROUTINE ADDA_MAP() 0002 C 0003 C ************************************************************************** 0004 C ** PROGRAM AUTHOR: WILLIAM BAKER 0005 C 0006 C ** PROGRAM DESCRIPTION: MAPS DATA CHANNELS TO ARRAYS FOR ACTUAL 0007 C ** PROGRAM EXECUTION. 0008 C 0009 C ** ADDA_MAP.FOR DICTIONARY 0010 C ----------------------- 0011 C 0012 C INCLUDE DECLARATIONS FOR THE DATABASE. 0013 C 0014 INCLUDE 'LIB4:[ADDASYS.SOURCE]ADDA_DATA_SHR.INC' 0156 C 0157 C INCLUDE DECLARATIONS FOR THE MAPPING OF CHANNELS. 0158 C 0159 INCLUDE 'LIB4:[ADDASYS.SOURCE]ADDA_DATA_MAP.INC/LIST' 0160 1 C ************************************************************************** 0161 1 C ** PROGRAM AUTHOR: WILLIAM BAKER 0162 1 C 0163 1 C ** PROGRAM DESCRIPTION: VARIABLE DECLARATIONS FOR MAPPING OF ARRAYS 0164 1 C ** TO CHANNELS ACTUALLY TO BE USED. 0165 1 C 0166 1 C ** ADDA_MAP.FOR DICTIONARY 0167 1 C ----------------------- 0168 1 C 0169 1 C ** DECLARE THE ARRAY NEEDED TO HOLD DATA. 0170 1 C 0171 1 INTEGER*2 AD_BUFFER(16) 0172 1 C 0173 1 C ** DECLARE THE ARRAYS NEEDED TO HOLD INFORMATION TO MAP CHANNELS TO ARRAYS. 0174 1 C 0175 1 INTEGER*4 AD_CHAN(16), AD_NMBR 0176 1 INTEGER*4 DA_CHAN(2), DA_NMBR 0177 1 C 0178 1 C ** DECLARE ARRAYS USED FOR SETTING THE A/D GAIN, AND WHERE DATA COMES 0179 1 C ** FROM FOR D/A OUTPUT TO THE DEVICE. 0180 1 C 0181 1 INTEGER*4 AD_GAIN(16), DA_FRM(2) 0182 1 INTEGER*4 DA_DEV(2) 0183 1 C 0184 1 C ** DECLARE THE DEVICE ID VARIABLES, DEVICE NUMBER, AND EVENT FLAG. 0185 1 C 0186 1 INTEGER*4 AD_ID, CLK_ID, IDV, AD_EFN, DA_EFN 0187 1 C 0188 1 C ** CHARACTER STRING HOLDING THE DEVICE NAME. 0189 1 C 0190 1 CHARACTER*4 DEVICE 0191 1 C 0192 1 C ** LOGICALS FOR SIGNALLING START OF THE A/D DEVICE, AND START OF CLOCK. 0193 1 C 0194 1 LOGICAL AD_STRT, USE_CLOCK, LOG_DATA_OK 0195 1 C 0196 1 C ** COMMON DECLARATION. 0197 1 C 0198 1 COMMON /ADDA_MAP/ AD_CHAN, AD_NMBR, DA_CHAN, DA_NMBR, ADDA_MAP 20-Nov-1990 18:07:22 VAX FORTRAN V5.4-79 Page 2 14-Jul-1988 19:37:29 LIB4:[ADDASYS.SOURCE]ADDA_MAP.FOR;3 0199 1 & AD_GAIN, DA_FRM, DA_DEV, AD_STRT, 0200 1 & AD_ID, CLK_ID, IDV, DEVICE, AD_EFN, 0201 1 & USE_CLOCK, AD_BUFFER, LOG_DATA_OK, DA_EFN 0202 1 C 0203 C 0204 C SET THE TEST TO THE OFF STATE. 0205 C 0206 AD_STRT = .FALSE. 0207 C 0208 C SET THE NUMBER OF A/D CHANNELS TO A CONVIENIENT VARIABLE 0209 C 0210 AD_NMBR = AD_NUMBR(IDV) 0211 C 0212 C MAP THE CHANNEL INFORMATION TO LOCAL VARIABLES FROM THE DATABASE. 0213 C THIS IS SO THAT ANY CHANGE IN THE DATABASE DOES NOT AFFECT THE 0214 C RUNNING OF THE MAINIO PROGRAM. WE CAN PLAY WITH DATABASE AND THE 0215 C PROGRAM WILL CONTINUE TO RUN UNTIL WE TELL THE PROGRAM TO REINIT. 0216 C 0217 DO II = 1,16 0218 C 0219 IF (AD_NMBR .GE. II) THEN 0220 AD_CHAN(II) = AD_CHNL(IDV,II).CHAN_NUM 0221 AD_GAIN(II) = AD_CHNL(IDV,II).CHAN_GAIN 0222 TYPE *, AD_CHAN(II), AD_GAIN(II) 0223 ENDIF 0224 0225 ENDDO 0226 C 0227 C RESET TEST STATE TO ON 0228 C 0229 IF (AD_NMBR .NE. 0) AD_STRT = .TRUE. 0230 C 0231 C DEFINE NUMBER OF D/A CHANNELS TO BE CONFIGURED. 0232 C 0233 DA_NMBR = DA_NUMBR(IDV) 0234 C 0235 C CONFIGURE THE D/A CHANNELS LOCALLY TO THE PROGRAM. 0236 C SAME REASON AS WE DID FOR THE A/D CHANNELS. 0237 C 0238 DO II = 1,2 0239 C 0240 IF (DA_NMBR .GE. II) THEN 0241 DA_CHAN(II) = DA_CHNL(IDV,II).CHAN_NUM 0242 DA_DEV(II) = DA_CHNL(IDV,II).CHAN_DEVICE 0243 DA_FRM(II) = DA_CHNL(IDV,II).CHAN_FROM 0244 ENDIF 0245 0246 ENDDO 0247 C 0248 RETURN 0249 END ADDA_MAP 20-Nov-1990 18:07:22 VAX FORTRAN V5.4-79 Page 3 01 14-Jul-1988 19:37:29 LIB4:[ADDASYS.SOURCE]ADDA_MAP.FOR;3 PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 380 PIC CON REL LCL SHR EXE RD NOWRT LONG 2 $LOCAL 12 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 8 ADDA_MAP 228 PIC OVR REL GBL SHR NOEXE RD WRT LONG Total Space Allocated 29596 ENTRY POINTS Address Type Name 0-00000000 ADDA_MAP 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 8-000000B4 I*4 AD_EFN 8-000000A4 I*4 AD_ID 8-00000040 I*4 AD_NMBR 8-000000A0 L*4 AD_STRT 8-000000A8 I*4 CLK_ID 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 8-000000E0 I*4 DA_EFN 8-0000004C I*4 DA_NMBR 8-000000B0 CHAR DEVICE 8-000000AC I*4 IDV 2-00000008 I*4 II 8-000000DC L*4 LOG_DATA_OK 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 2-00000004 I*4 SYS$BINTIM 2-00000000 I*4 SYS$SETIMR 8-000000B8 L*4 USE_CLOCK 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) 8-000000BC I*2 AD_BUFFER 32 (16) 8-00000000 I*4 AD_CHAN 64 (16) ADDA_MAP 20-Nov-1990 18:07:22 VAX FORTRAN V5.4-79 Page 4 01 14-Jul-1988 19:37:29 LIB4:[ADDASYS.SOURCE]ADDA_MAP.FOR;3 8-00000050 I*4 AD_GAIN 64 (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) 8-00000044 I*4 DA_CHAN 8 (2) 8-00000098 I*4 DA_DEV 8 (2) 8-00000090 I*4 DA_FRM 8 (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) COMMAND QUALIFIERS FOR/LIS/NOOPT/EXTEND ADDA_MAP /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 /NOOPTIMIZE /NOPARALLEL /NOANALYSIS_DATA /NODIAGNOSTICS /LIST=LIB4:[ADDASYS.SOURCE]ADDA_MAP.LIS;22 /OBJECT=LIB4:[ADDASYS.SOURCE]ADDA_MAP.OBJ;1 COMPILATION STATISTICS Run Time: 2.56 seconds Elapsed Time: 3.81 seconds Page Faults: 680 Dynamic Memory: 508 pages