LABSTATION-23: An Application Note 1.0 OVERVIEW LABSTATION-23 is a product designed to make remote data collection truly automated. LABSTATION-23 may be one or several real-time data collection stations connected by network to a VAX-11. LABSTATION-23 provides automated data collection at local or remote sites, automated data transfer from the small data collection stations to the VAX, and automated data storage on the VAX (see Figure 1). Connected to a VAX-11 via DECnet communication lines, LABSTATION-23 data collection stations act as nodes on the network, running data collection programs initiated on the VAX and transferring the data to the VAX. Once collected, the data can undergo immediate reduction and partial processing on the LABSTATION-23 node or it can be transferred automatically via DECnet to the host VAX for storage and full processing. Designed to be a frontend to the VAX for real-time I/O, each LABSTATION- 23 node includes the following hardware:* o PDP 11/23 central processing unit o 192 Kbyte random access memory o DLV11-J asynchronous terminal interface o DMV11 direct memory access communications interface with built-in modem o I/O modules, including A/D converter, D/A converter, digital input unit, digital output unit, thermocouple preamplifier, dual multiplexer, preamplifier, and clock (all modules are optional) o LABSTATION I/O module crate ________________________________ *DIGITAL's Field Service additionally requires that each facility (loosely defined as a group of LABSTATION nodes located within a common area) have a test station consisting of a LABSTATION-23 cart, VT100 video terminal, and an RX02 disk drive. The LABSTATION nodes are connected to a central VAX-11 that must be equipped with a unibus and a DMP-11 direct memory access synchronous communications interface, which can support up to twelve LABSTATION nodes. In internal testing, we measured the speed of data transfer from the nodes to a VAX-11. The data in Table 1 show the results of our testing. Note both the decline in individual transfer rates and the increase in the aggregate transfer rate as nodes were added. Table 1. Rate of Data Transfer from LABSTATION Nodes to VAX-11 Host ------------------------------------------------------------------- No. Active Individ. Xfer Aggregate Xfer Nodes Rate Rate (Samples/Sec) (Samples/Sec) 1 1300 1300 2 950 1900 3 740 2200 4 600 2400 5 510 2500 -------------------------------------------------------------------- Although temporary local storage at the nodes (on floppy or hard disk is an option, the method described in this note uses remote data collection at the nodes and centralized data storage and processing on the VAX, with data transfer performed by the network (DECnet) via the DMP-11/DMV-11 communications interfaces. This Application Note describes: o A procedure that automates RSX-11S system generation o A procedure that automates network configuration, following network installation by DIGITAL's Software Support personnel o A program development tool that automates the editing, compilation, and downline loading of your programs o A pair of demonstration programs that collect data at a node and then transfer it, via network, to the VAX for analysis 2.0 AUTOMATING RSX-11S SYSGEN AND LABSTATION NETWORK CONFIGURATION 2.1 Copying The Disks 1. We recommend that you copy both distribution disks onto the disk that is to become the LABSTATION 23 disk. This disk and UIC will be assigned the logical name SYS$LS23. 2.2 RSX-11S System Generation 1. We recommend that you run the SYSGEN procedure from a hardcopy terminal, as the hardcopy will let you retrace your steps, should something go wrong. We also recommend using one disk for system and network generation and another as the permanent LABSTATION system disk, which will hold the RSX-11S system files, the DECnet11S database and system files, and the LABSTATION software. The SYSGEN and NETGEN pro- cedures leave UICs all over the disk; by copying all LABSTATION system and network files to a clean disk, you will have a dedicated system disk. Use default UICs with the SYSGEN procedure. In the dialog that follows, user input is printed in color. Before running the SYSGEN procedure, print out the SYSGEN dialog, which is contained in the following files on your LABSTATION-23 distribution media: 1. *.LOG 2. To run the program, log in on the VAX, using an account with system manager privileges; specify that you want to use the MCR command line interpreter. In response to VMS's username prompt, type: Username: SYSTEM/CLI=MCR where SYSTEM represents a fully privileged account name. /CLI=MCR represents invokation of the MCR command line interpreter. After entering your password, proceed to step 3. 3. Assign a single device, specifying a number for a UIC that will hold all system and network files; then give that UIC the name SYS$LS23. For example using UIC 3,64 type: >ASN DR0:[3,64] SYS$LS23 where DR0: represents the assigned device. [3,64] represents the default UIC number. SYS$LS23 represents the logical name assigned to this device and UIC. 4. Enter the SYS$LS23 UIC. Type: >SET DEF SYS$LS23 5. Begin running the SYSGEN procedure. Type: >@RMGEN The SYSGEN procedure is interactive; respond to all questions that are displayed. Following is a description of each part of the dialog in the SYSGEN procedure, with recommended answers to critical questions. The first set of dialog is concerned with device information. In response to the first question, WHAT IS THE TARGET PHYSICAL DEVICE[S]: give the name of the device on which you want to do system generation. We recommend the use of a disk with 3000 blocks of free space. The final question in section 1, as well as those in section 2, require affirmative answers. Section 3, "RSX11S Generation," has several critical questions. We will present all questions and recommended responses. Whenever appears alone as the response, it means that we recommend use of the default response, which requires only a carriage return. IS THE TARGET DISK, SY0, THE SYSTEM DEVICE [Y/N]:N WHAT IS THE GROUP NUMBER FOR THE SYSTEM FILES [0 R:1-10 D:1]: WHAT IS THE GROUP NUMBER FOR THE EXECUTIVE FILES [O R:1-11 D:11]: TARGET DEVICE NAME[S]:dl0 Use default values for the group numbers (press carriage return). COPY THE RSX-11S DISTRIBUTION FILES TO THE TARGET DISK? [Y/N]:y ENTER DEVICE FOR THE RSX-11S DISTRIBUTION KIT[S]:ms0 IS THE RSX-11S DISTRIBUTION KIT ON A 2400 FOOT REEL [Y/N]:y IS THE TAPE READY ON MS0:? [Y/N]:y Although the questions regarding the RSX-11S distribution media repeat those in section 2, answer them anyway. 3. DO YOU WANT TO INHIBIT EXECUTION OF MCR COMMANDS? [Y/N]:n 5. ARE YOU GENERATING A MAPPED SYSTEM? [Y/N]:y 6. USE AN INPUT SAVED ANSWER FILE? [Y/N]:y 7. NAME OF INPUT SAVED ANSWER FILE [D: SYSSAVED.CMD] [S]: Answer these questions EXACTLY as above. 9. NAME OF OUTPUT SAVED ANSWER FILE: NL: 11. USE SAVED HOST CONFIGURATION? [Y/N]:y 12. USE SAVED PERIPHERAL CONFIGURATION? [Y/N]:y 13. SKIP END OF SECTION (EOS) BREAKPOINTS? [Y/N]:n 14. SKIP END OF EXECUTION (EOX) BREAKPOINTS? [Y/N]:n 15. CLEAN UP FILES FROM PREVIOUS GENS? [Y/N]:y Respond to the questions exactly as shown above. The system will now display information about the target configuration. When it reaches the host configuration section, the system will display the following prompt several times: *EOS * DO YOU WANT TO:-CONTINUE R-REPEAT SECTION E-EXIT P-PAUSE: Press RETURN each time the prompt appears. In the "Create Executive build files" part of section 3, the program again displays the prompt: *EOS* DO YOU WANT TO: -CONTINUE R-REPEAT SECTION E-EXIT P-PAUSE: You MUST respond by typing: P After a brief pause, the program will display the angle-bracket prompt. In response, type: > @sys$ls23:rmsgn1.cmd This will cause the system to run a system customization procedure. Again, this procedure will display the prompt: *EOS* DO YOU WANT TO: -CONTINUE R-REPEAT SECTION E-EXIT P-PAUSE: Respond by pressing RETURN. After completing the executive assembly, the program will ask: EOX * DID THE EXECUTIVE ASSEMBLE CORRECTLY [Y/N]: EOX * DID THE DEVICE DRIVERS ASSEMBLE CORRECTLY [Y/N]: EOX * WERE THE TASK BUILD PREPARATIONS MADE SUCCESSFULLY? [Y/N]: Answer "no" only if a question is preceded by error messages; otherwise, answer "yes." Following these questions, phase I of RSX-11S sysgen terminates and phase II begins automatically, although the procedure displays this message: End of 11SGEN phase 1 at hh:mm:ss on dd:mmm:yyyy __To continue type: @[2,200]11SGEN2 Ignore this message; DO NOT type anything. Phase II will begin automatically and will ask: * DID THE FIRST PART COMPLETE WITHOUT ERROR [Y/N]: You must answer "y" to this question, if you wish to proceed. Phase II is divided into two sections, "Build the Executive and All Required Tasks" and "Build Loadable Drivers." Answer all questions in both sections. Respond to the questions as indicated below. IN WHAT UIC IS SGNPARM.CMD IF NOT [2,200] [S]: TARGET DEVICE NAME[S]: Name the device that was named in response to the very first question in the procedure. DO YOU WANT EXPANDED COMMENTS? [Y/N]:n HAVE YOU ALREADY CREATED 11SLIB.OLB? [Y/N]:n HAVE YOU ALREADY BUILT THE EXEC? [Y/N]:n DO YOU WISH TO EDIT THE EXECUTIVE BUILD FILE? [Y/N]:n DID THE EXECUTIVE BUILD SUCCESSFULLY? [Y/N]: Answer "no" to this question only if it is preceded by error messages. DO YOU WANT TO BUILD ANY LOADABLE DRIVERS NOW? [Y/N]:y In the "Build Loadable Drivers" section, the program asks for specifics regarding your selection of device drivers and your selection of privileged tasks to be included in your system. Answer all questions in this section. Recommended answers appear below. 3. DEVICE FOR DRIVER'S MAPS [D: NL:] [S]: The defualt values DD: and DY: were selected. 5. DRIVER 2-CHARACTER DEVICE MNEMONIC[S]: DD 6. DRIVE PARTITION NAME [D: DRVPAR] [S]: 5. DRIVER 2-CHARACTER DEVICE MNEMONIC[S]:DY 6. DRIVE PARTITION NAME [D: DRVPAR] [S]: 5. DRIVER 2-CHARACTER DEVICE MNEMONIC[S]: Pressing indicates there are no more device types to be loaded. DO YOU HAVE THE MAPS ALREADY? [Y/N]:n HAVE YOU ALREADY BUILT THE FULL DUPLEX TERMINAL DRIVER? [Y/N]:N DO YOU WISH TO EDIT THE BUILD COMMAND FILE FOR THE TERMINAL DRIVER?:n DID THE TERMINAL DRIVER BUILD SUCCESSFULLY? [Y/N]:y LIST FULL DUPLEX TERMINAL DRIVER MAP? [Y/N]:n DO YOU WANT TO CONTINUE AND BUILD THE PRIVILEGED TASKS? [Y/N]:y ASSEMBLY LIST DEVICE FOR PRIVILEGED TASKS (DDNN:) [D: NL:] [S]: MAP DEVICE FOR PRIVILEGED TASKS (DDNN:) [D: SY:] [S]: HAVE YOU ALREADY BUILT TASK TKTN?[Y/N]: n DO YOU WISH TO INCLUDE BASMCR, OTL, OR SIP IN YOUR SYSTEM? [Y/N]:y DO YOU WISH TO INCLUDE RSDV05, RSDV52, OR RSDV1H? [Y/N]:y DO YOU WISH TO INCLUDE THE RSX-11S SUBSET FCS? [Y/N]:n DO YOU WISH TO BUILD CDA FOR YOUR HOST SYSTEM? [Y/N]:n DO YOU WISH TO MAKE CORRECTIONS TO RSX-11S SOURCE MODULES? [Y/N]:n DO YOU HAVE TO EDIT THE TASK BUILD COMMAND FILE FOR TKTN?[Y/N]:n DO YOU WANT TO INCLUDE TASK BASMCR? [Y/N]:y DO YOU WISH TO EDIT THE ASSEMBLY PREFIX FILE FOR BASMCR? [Y/N]:n DO YOU WISH TO EDIT THE TASK BUILD COMMAND FILE FOR BASMCR?[Y/N]:n DO YOU WANT TO INCLUDE TASK OTL? [Y/N]:y DO YOU WISH TO EDIT THE ASSEMBLY PREFIX FILE FOR OTL? [Y/N]:n DO YOU WISH TO EDIT THE TASK BUILD COMMAND FILE FOR OTL? [Y/N]:n DO YOU WANT TO INCLUDE TASK SIP? [Y/N]:y DO YOU WISH TO EDIT THE ASSEMBLY PREFIX FILE FOR SIP? [Y/N]:n DO YOU WISH TO EDIT THE TASK BUILD COMMAND FILE FOR SIP? [/N]:n DO YOU WANT TO INCLUDE TASK RSDV05? [Y/N]:n DO YOU WANT TO INCLUDE TASK RSDV52? [Y/N]:n DO YOU WANT TO INCLUDE TASK RSDV1H? [Y/N]:y Answer the above questions according to the type of terminal interfaces you need. DO YOU WISH TO EDIT THE TASK BUILD COMMAND FILE FOR RSDV1H?[Y/N]:n DO YOU WANT TO CONFIGURE THE EXEC AT THIS TIME USING VMR? [Y/N]:n Answer "no" to this question. DIGITAL's Software Support personnel must install the network (DECnet-11S). Only after the network is installed can you configure the executive. Do so by running the Network Configuration program, described in Section 2.3 of this Application Note. The configuration pro- cedure will build and install a system image using VMR. 2.3 Network Configuration Program Use this procedure only after system and network installation have been completed. 1. To run the Network Configuration Program, log in on the VAX, using an account with system manager privileges; specify that you want to use the MCR command line interpreter. In response to VMS's username prompt, type: Username:SYSTEM/CLI=MCR where SYSTEM represents an account with system manager privileges. /CLI=MCR represents invokation of the MCR command line interpreter. After entering your password, proceed to step 2. 2. Access the device on which the LABSTATION SYSGEN procedure was performed, and enter the UIC assigned to the LABSTATION system files. Type: >ASN DR0:[3,64] SYS$LS23 where DR0: represents the the RK07 disk on which SYSGEN was performed. [3,64] represents the UIC number assigned during SYSGEN. SYS$LS23 represents the UIC's logical name, assigned during SYSGEN. 3. Enter the SYS$LS23 UIC. Type: >SET DEF SYS$LS23 4. Begin running the configuration program. Type: >@RMCONFIG The program is interactive, respond to all questions that are displayed by the program. The first question asks if SYSGEN and NETGEN have been completed. Only if you answer "yes" to this question will the procedure continue. In Section 1, the procedure asks you to create a password of up to eight characters and to establish privileged and nonprivileged accounts with names and passwords of up to fifteen characters. After doing this, proceed to Section 2 of the procedure. In Section 2, "LABSTATION-23 host configuration," the procedure asks critical questions about each DMP-11 communications interface and the nodes connected to it. These questions, and guidelines for answering them, follow. SHOULD DMP-0 BE CONFIGURED AS A LABSTATION CONTROLLER? [Y/N]: If your system has only one DMP-11 communications interface, and the nodes have been connected to it, answer "yes." If your system has more than one DMP-11 communications interface, and LABSTATION-23 nodes have been connected to several of them, DIGITAL's Software Support personnel have informed your system manager which DMP-11 interface has been assigned the number 0 and what nodes are connected to it. Obtain this information before proceeding. Answer "yes" to this question. HOW MANY LABSTATION STATIONS ARE CONNECTED TO DMP-0 [D R:1-12 D:1]: Up to twelve nodes can be connected to each DMP-11 line. Specify the number of nodes connected to the line assigned the logical number 0. (If your system has multiple DMP-11 communication lines installed, this entire dialog will be repeated for each DMP-11 line.) WHAT IS THE NODE NUMBER OF DMP-0, STATION 1 [D R:1-16]: Be sure to give station 1 the node number assigned to it during network installation by DIGITAL's Software Support personnel. WHAT IS THE NODE NAME OF DMP-0, STATION 1[D R:1-6]]: Be sure to give station 1 the node name given to it during Network Generation, so that the node name, or password, established in the host data base is the same as the password set in the switches on the DMV. The procedure will repeat the questions on node number and node name for all nodes on each DMP-11 communications line. When all node names and numbers are complete, the program will ask: SHOULD DMP-1 BE CONFIGURED AS A LABSTATION CONTROLLER? [Y/N]: Answer "yes" only if you have a second DMP-11 communications line to which LABSTATION-23 nodes were connected by DIGITAL's Software Support during network installation. After all LABSTATION-23 nodes have been defined, the program asks: ARE YOU READY TO CONTINUE? [Y/N]: If this is the first time you've configured the network, answer "yes," so that the program will display progress messages as it updates the network's database, creates system image files, and terminates. When the procedure terminates, proceed as follows: Stop DECnet on the VAX; run the Network Control Program from the system manager's account; and then restart DECnet. To do all this, type: >NCP NCP> SET EXEC STA SHUT NCP> EX Next issue the command to start the network: $@[directory containing the startnet command file]STARTNET The network should now be running. Use the network to downline load the RSX-11S system image to the nodes. Again, invoke the Network Control Program. Type: $RUN SYS$SYSTEM.NCP For each node, type: NCP>LOAD NODE nodename where nodename represents the name assigned to each node during network generation. 3.0 PROGRAM DEVELOPMENT TOOL The tool described in this section should be used to develop application programs on the host VAX and then automatically downline loading them to the LABSTATION nodes. This procedure lets you edit, compile, task build, and downline load your programs automatically. The name of the program development tool is RMDEVEL. Do not use this procedure unless your account has the following privileges: OPER, LOG-IO, and CMKRNL. 1. To run the program development tool, log in to VMS on the VAX. After entering your username and password, invoke the MCR command line interpreter by typing: $MCR 2. Access the LABSTATION system disk and enter the LABSTATION UIC. Type: >ASN DR0:[3,64]=SYS$LS23: >SET DEF SYS$LS23 where DR0: represents an RK07 disk. If your LABSTATION system is stored on another type of device, enter that device name and number. [3,64] represents the UIC number. SYS$LS23 represents the UIC's logical name. 3. Invoke the procedure and name the source file that you wish to work on. Type: >@RMDEVEL filename where filename is a 1-6 character name for a source file. DO NOT add a file extension. The program assumes that the extension is .FTN. The procedure will ask you a few questions and then invoke the EDT editor. The questions are as follows:. *WHAT WAS THE TARGET DEVICE DURING SYSGEN AND NETGEN [S]:DR0 Specify the name of the device on which your LABSTATION system is stored. *WHAT WAS THE GROUP UIC NUMBER SPECIFIED [O D:3]: Use the default UIC; press carriage return. * [1:6] WHAT IS THE LABSTATION TARGET NODE NAME [S]: OXYGEN In this response, OXYGEN is the name of the node on which the program being developed will run. Name the node[s] on which you wish your program to run. After you answer remaining questions on the use of remarks and end- of-execution breakpoints, the program will automatically perform the following program development tasks: 1. Invoke the EDT editor. 2. Compile your source file. 3. Task build your program image. 4. Install the program image in host memory, using the VMR utility. 5. Downline load your program to the specified target node(s). If you indicated that you want end-of-execution breakpoints, the program development tool displays this prompt at the completion of each task: DO YOU WANT TO CONTINUE ,EXIT ,PAUSE

, OR REPEAT : To continue to the next task, press To exit the program, type E To abort the program and return to MCR level, type P To return to the beginning of the editing stage, type R The first time the program development tool is used on any program, the tool will display the following error message: REM program name VMR--TASK NOT INSTALLED DO YOU WANT TO CONTINUE, EXIT, PAUSE

, OR REPEAT: where program name represents the name of the program that's being developed, compiled, or installed. Always respond to this message by typing: R When it has completed all tasks, the program development tool displays this message: End of procedure If you used the program to perform all five tasks, your program should now be installed on the specified node(s). 4.0 DEMONSTRATION PROGRAMS A pair of demonstration programs is included with the LABSTATION-23 software. Working together, the two programs collect data from an A/D converter into a buffer on the LABSTATION node, and, as the buffer fills, they transfer the data via DECnet to the VAX. Written in FORTRAN, they collect and transfer three buffers of data (2048 words per buffer) from the node to the VAX. RMDMO1, the first program in the pair, runs on the LABSTATION node. Its role is to set up and manage data collection and then to send each buffer of data to the VAX. RMDEMO1, the second program in the pair, manages the transaction by calling RMDM01, opening a VAX file for data storage, accessing the network, prompting the user for the file name, reading and writing to disk the three buffers of data, and then closing the data file. Before using this pair of demonstration programs, make sure that the LABSTATION system software has been installed and that the network has been configured according to the instructions in Section 2.0 of this Note. 1. Make sure that the LABSTATION node you wish to use is equipped with an A/D converter and a clock module. 2. Log in to VMS on the VAX. 3. Access the LABSTATION system disk and enter the LABSTATION UIC. Type: $ASN DR0:[3,64]=SYS$LS23 NCP> SHOW KNOWN NODES In response, the Network Control Program will display a list of reachable and unreachable nodes. To leave NCP, type: NCP>EXIT B. If RMDMO1 is not yet installed in the system image, proceed to step 5. C. If a node goes down, wait until it is up and running again, and proceed as follows: I. Determine whether the node demo program (RMDMO1) has been installed in the system image. If it has not, proceed to step 5. If it has been installed in the system image, do the following: a. When the node is up and running again, log in to the VAX, using the (default) DCL command line interpreter. b. Invoke the Network Control Program (NCP and downline load the system image to the node(s). Type: $NCP NCP>LOAD NODE nodename where nodename represents the name of the node where you want to run the demo program. As soon as the system image is downline loaded to the node, the Network Control Program (NCP) will display this prompt: NCP> Leave the Network Control Program by typing: NCP>EXIT and proceed to step 6B. 5. Invoke the MCR command line interpreter and run the program develop- ment tool, RMDEVEL, on the RMDMO1 program. The program development tool will compile and task build the RMDMO1 program, install it in the system image, and downline load both the system image and the demo program to the specified node(s). Type: $MCR >@RMDEVEL A. The program will ask you a few questions. Respond as directed in Section 3.0 of this Note, specifying the node(s) you want to use and the default UICs. B. During execution, the program development tool will display the following error message: REM RMDMO1 VMR--TASK NOT INSTALLED DO YOU WANT TO CONTINUE ,EXIT ,PAUSE

, OR REPEAT : In response, type: R C. The program development tool will compile and task build the node demo program, install it in the system image, and then downline both the system image and the demo program to the specified node(s). When it has completed all of these tasks, it will display this message: End of procedure The LABSTATION system image and RMDMO1, the node demo program, are now loaded on the node. RMDMO1 will begin data collection as soon as it is activated by RMDEMO1, the host demo program. To start running the host demo program, log off the VAX momentarily and then log on again, this time using the (default) DCL command line interpreter. 6. A. Access the LABSTATION system disk and UIC. Type: $ASN DR0:[3,64]=SYS$LS23 $SET DEF SYS$LS23 where DR0: represents an RK07 disk. If your LABSTATION system is stored on another type of device, enter that device name and number. [3,64] represents the (default) LABSTATION UIC number. SYS$LS23 represents the LABSTATION system UIC name. B. The RMDMO1 program should now be ready to collect data at the node(s). To run the RMDMO1 program, you must activate the host demo program. If the host demo program has already been compiled and linked, proceed to step 9. If the host demo program has not been compiled and linked, proceed to step 8. 7. Compile and link RMDEMO1, the host demo program. Type: $FOR RMDEMO1 $LINK RMDEMO1 8. To run the demo program on the host, type: $RUN RMDEMO1 This program will now automatically activate the node program, which will begin data collection. The host program will manage the transaction and will store the data on a VAX disk file. END