//_Header //******************************************************************* // NOVA Laser Diagnostics --- Lawrence Livermore Laboratory // // Copyright 1984 by the Regents of the University of California //******************************************************************* // //_Module_Name: RTUTL _File: [LDDEV.VAX]RTUTL.PRX // //_Description: // This module contains some utility routines to // handle ref/trans laser diagnostics fep // // //_Call: //******************************************************************* //_Author: Denis Lantreibecq _Creation_Date: 27-MAR-1984 //_Revisions: // 1.000 27-MAR-1984 D.L Initial Key-in. // 1.001 3-JUL-1984 JLW DON'T USE TIMER WITH SMC_EVENT_FLAG. // 1.002 9-JUL-1984 JLW turn off some trace. // 1.003 10-JUL-1984 JLW blink yellow for reference when volts are low. // 1.004 2-AUG-1984 JLW INTEGRATED SAMPLE WITH XMIT_ALL. // 1.005 3-AUG-1984 JLW get_3_omega_number // 1.006 5-nov-1984 JLW out with smc event flag. //******************************************************************* %IDENT "1.006" //_End MODULE test %define testing %set testing = false exception no_sensor exception no_smc_net_card_access exception no_kdp_machine_read_posted exception no_kdp_machine_response use secnds use FREQDATA use LDVMS use CANnet use kdpnet use setef use efscan use efstubs USE ssdef USE myfrmes USE kdptypes USE ldgetnet USE ldvaxerr USE locmapdef USE ldvaxtype USE ldtypes USE ldvnvutl USE tpuser USE tptypes USE textio USE kdpsample USE ldmapgbl USE vaxlocmap USE mapdata USE efutil USE dataarray USE inilocmap USE ldnetutl USE ldgetmes // USE eatnetcrd USE rtframe //use import ld_loc_type from ldmaptype import ld_loc_map_type from ldmaptype import sensor_loc_map_type from ldmaptype import dep_mapping_on_vax_type from ldmaptype DECLARE %if testing smc_event_flag = 98 %otherwise smc_event_flag = 96 %endif flag_1_range IS read_complete_event_flags true_boolean IS BOOLEAN INITIALLY TRUE false_boolean IS BOOLEAN INITIALLY FALSE things_to_measure IS [transmission, reflectivity, kdp_efficiency ] //out_units_type IS [show_power, show_volts, show_ratio] number_text_length = 12 number_text : static PACKED ARRAY [1..number_text_length] OF CHAR ENDDECLARE function get_channel_from_table ( sensor : ld_display_enumeration, chain : integer ) returns chan : integer initially ( vax_sensor_to_fep_map [ sensor, chain ] . channel_entry - 1 ) MOD 20 + 1 endfunction function check_local_ill_power ( chain : integer ) returns loc_ill_volts : real declare loc_ill_siad : nova_siad_range INITIALLY vax_sensor_to_fep_map [ kdp_reference_detector , chain ] . siad loc_ill_channel : INTEGER INITIALLY GET_CHANNEL_FROM_TABLE ( kdp_reference_detector , chain ) enddeclare if ld_sensor_answered [ loc_ill_siad , loc_ill_channel ] < 0 do loc_ill_volts := ld_volts_region [ loc_ill_siad , loc_ill_channel ] otherwise loc_ill_volts := -1.0 ENDIF endfunction ENDMODULE