Installing and Configuring SICL for BASIC/UX 8.0

This chapter describes how to install and configure the HP Standard Instrument Control Library (SICL) for use with HP BASIC/UX 700 version 8.0. HP BASIC/UX 8.0 uses SICL as its I/O library. Therefore, SICL and its interfaces must be correctly installed and configured before you can perform any I/O interfacing with HP BASIC/UX 8.0.

SICL provides a modular instrument communications library that works with a variety of computer architectures, I/O interfaces, and operating systems. It uses standard functions to communicate over a wide variety of interfaces. It also provides commands to operate the unique features of each type of interface.

NOTE
SICL is one of two I/O library products provided with the HP I/O Libraries; the other product is HP VTL (VISA Transition Library). However, you will only install and configure the SICL product for use with HP BASIC/UX 8.0 by following the instructions in this chapter.

Note that VTL is not supported in any way with HP BASIC/UX 8.0.

Prerequisites

Before installing SICL, you must have the following:

It is also assumed that you have already installed HP BASIC/UX 8.0 on your Series 700 workstation. If you have not already done so, follow the procedures in Chapter 1, "Installing HP BASIC/UX 8.0 on HP-UX 10.01," before proceeding with the procedures in this chapter.

Supported Interfaces

The following is a list of the interfaces currently supported by SICL in HP BASIC/UX 8.0:

Installing SICL on HP-UX 10.01

This section explains how to install SICL on a system running HP-UX 10.01 for use with HP BASIC/UX 8.0. This installation uses the HP-UX Software Distributor (SD) tools and should take 20 to 30 minutes to complete. Verify that your system meets all the hardware and software requirements as described in the previous section before continuing with this installation.

The HP-UX software distributor (SD) install program (swinstall) is an interactive program that will install software from a CD-ROM depot, or from a special SD-UX directory on your local host or on some other host. The software distributor cluster program (swcluster) uses swinstall to install the software onto your cluster nodes. If you are not familiar with the SD-UX software distributor tools, see the Managing HP-UX Software with SD-UX manual, or the manual page for sd for additional instructions. If you have any questions while using the tool, use the online help for more information.

NOTE
If this is the first time you are installing SICL on HP-UX 10.01, then additional software will be installed and the swinstall program will reboot your machine.

Follow these steps to install SICL on HP-UX 10.01:

  1. Become the root user on the server for a diskless cluster or a stand-alone system.

  2. Insert your HP I/O Libraries CD-ROM and mount it. See the mount (1m) man page for information on the mount command.

  3. Run the interactive HP-UX software distributor program:

    1. On a standalone machine, or on the server of a diskless cluster (installed on server, but not on clients):
      	/usr/sbin/swinstall
      
    2. On a diskless cluster server (installed on server and clients):
      	/usr/sbin/swcluster -i -vvv
      

      The -i indicates interactive mode, and the -vvv indicates the level of verbosity.

  4. If you used the swcluster program, the program will prompt for you to select the alternate root path. The path is usually the following:
    
    	/export/shared_roots/OS_700    
    

  5. The program lists the following fields:

    Source Host Name Lists the host you are installing from. If you would like to install from a different host, be sure to include the server IP address.
    Source Depot Path Specifies the source depot you wish to install from. If you are installing from a CD-ROM depot, list the directory the CD-ROM depot is mounted on (for example, /cdrom). If you are installing from a hard disk, list the directory path to the file sets (usually, /var/spool/sw).
    Change Software View Specify All Bundles for the HP I/O Libraries software.

    Change the fields above to reflect your installation and click on the [OK] button.

  6. The swinstall program reads the bundles available from the source depot. The HP I/O Libraries software bundle will be displayed as follows:
    
    	E2091D		D.01.00 
    

  7. You must install the individual SICL product instead of the complete bundle. (The bundle also includes VTL, which you do not need.) Therefore, do the following.

    Double-click on the HP I/O Libraries bundle until the two products, SICL and VTL, are displayed.

    Now select the SICL product for installation by clicking on the SICL product and selecting Mark for Install from the Actions menu bar.

  8. Once you have marked the SICL product for installation, select Actions from the menu bar. Then select Install (analysis) to begin the analysis process.

  9. The program will then perform an analysis to ensure the process will be successful. When the analysis status reads Ready, click on the [OK] button to begin the installation. If the analysis fails, click on the [Logfile] button for information on why the analysis failed.

    • If you used the swcluster program, the program will prompt asking if you would like to exit swinstall. The swcluster program calls swinstall to install the software onto the cluster nodes. Once you exit swinstall, the software will be installed on the cluster nodes, and the program will exit. Note that if this is the first time the software is installed, the cluster clients will be halted. Now continue with step number 12.
    • If you used the swinstall program, the program will prompt to ensure you want to install the selected software. After selecting [YES], the program may also prompt that your machine will be rebooted once the software is installed. Click on [YES] and the installation will begin.
  10. Once the software is installed, the program prompts if you have any NOTEs, ERRORs, or WARNINGs. If you do have any of these, click on the [Logfile] button to determine any necessary action. See the next subsection titled "The Logfile" for information on NOTEs, ERRORs, or WARNINGs.

  11. When the status reads Ready, click on the [Done] button. If extra software was installed, the program will prompt stating that your machine will reboot. Click on [YES] to continue.

    NOTE
    The first time the machine (standalone, server, or cluster client workstation) is rebooted after installation, it may take several minutes longer than usual due to additional software configuration steps.

  12. When the loading process is complete and the system(s) have rebooted, unmount your CD-ROM, remove the installation CD-ROM, and store it in a safe place. See the umount (1m) man page for information on the umount command. The SICL software is now installed on your system.

The Logfile

You can now check for errors or warnings that might have occurred during the SICL installation. Review the log file generated by the swinstall program by selecting [Logfile] from the menu. Or, if you used the swcluster program, you can view the logfile by doing the following:


	tail -50 /var/adm/swcluster.log | more

Notes, Errors, and Warnings are defined as follows:

Where to Go Next

You have now completed installing SICL on HP-UX 10.01. Continue with the next section, "Configuring SICL for HP BASIC/UX 8.0."

Configuring SICL for HP BASIC/UX 8.0

Before you can begin programming with HP BASIC/UX 8.0, you must first configure SICL to operate with an I/O interface or interfaces. This configuration involves running SICL's I/O setup utility and, if desired, customizing the SICL LAN server. Each of these steps is described in detail in the following subsections.

Running the SICL I/O Setup Utility

The SICL I/O setup utility updates the hwconfig.cf file to reflect your interface configuration for use with HP BASIC/UX 8.0. If you wish to manually configure the interfaces by editing this file instead, see Appendix A, "Editing the hwconfig.cf File to Configure SICL."

NOTE

  • This procedure must be performed on each node of a diskless cluster that will be using SICL. You need to configure the server of a diskless cluster if you plan to run your applications on the server.
  • This procedure assumes previous installation of all I/O interface cards. For I/O interface installation procedures, see the Installation Guide or User's Guide for the I/O interface(s).

To run the SICL I/O setup utility, do the following:

  1. Login as root on the system to be configured.

    If you are executing on a diskless cluster, then the /etc/opt/sicl directory will be NFS diskless client private and all files in it will be client-specific on HP-UX 10.01.

  2. Run the I/O setup utility to configure your I/O interface(s) with SICL:
    
    	/opt/sicl/bin/iosetup
    

    NOTE
    The iosetup utility can only be run from a writable directory. Therefore, if you are running on an NFS diskless cluster client in the /opt directory, then you must change your directory to a writable directory such as /tmp.

    The following options are available for iosetup:

    -enumber   Allows you to specify the number of EISA slots to be configured. See the following note.
    -mmodel  Allows you to specify the machine type.

    NOTE
    If you are operating on a system with an EISA expander (such as the HP S2399A), use the -enumber option to specify the number of EISA slots available. For example:
     		/opt/sicl/bin/iosetup -e7
    

  3. The available interfaces will be listed on the left side of the window. Click on the interface you wish to configure first and click on the [Configure] button.

    The I/O setup utility will display information about that interface. Edit the fields displayed to match your setup and click on the [OK] button. The defaults provided are usually sufficient. However, if you need more information, click on the [Help] button for detailed information about the field content, or see the "SICL Interfaces" subsection later in this chapter for a summary on each interface type.

    Repeat this step for each interface you wish to configure. If you plan to use two interfaces of the same type, then you must configure each interface separately.

    NOTE
    You must ensure that all addresses and interrupt lines (IRQs) are unique and do not conflict with an address or IRQ line used by any other card in the system.

  4. Once you have added all desired interfaces, click on [Done] from the main menu. The I/O Setup utility will edit the hwconfig.cf file and rebuild the kernel. (If you only add a LAN interface, the kernel is not rebuilt.) Status messages will scroll by very quickly. To review the messages, see the /var/opt/sicl/kernbld.log file.

  5. Reboot your system in order for the kernel changes to take affect. (This step is not required if you only configure a LAN interface.)

  6. If you are configuring a cnode or a root server of a diskless cluster to act as a LAN server (also known as a LAN-to-instrument_interface gateway), then you must run the lanconf utility by typing the following:

                /opt/sicl/bin/lanconf

    If you are configuring a standalone system to act as a LAN server, then this utility was already run for you as part of the installation process.

    See the lanconf man page for details as to what steps this utility performs.

    Also, be sure to read the "Customizing the SICL LAN Server" section for more information about configuring the SICL LAN server.

Customizing the SICL LAN Server

If you followed the steps in the I/O setup utility, including the final configuration step, your host system should now be acting as a SICL LAN server. This section describes additional configuration parameters you can customize for the SICL LAN server if you do not wish to use the default parameters.

Optional SICL LAN Server Configuration

The SICL LAN server, /opt/sicl/bin/siclland on HP-UX 10.01, is a network daemon which accepts SICL I/O requests from SICL LAN clients on the network and performs the requested I/O operations. The siclland daemon is started by inetd.

To customize the siclland daemon configuration, do the following:

  1. Login as root on the host system.

  2. Edit the file /etc/inetd.conf and modify the parameters in the siclland entry, as desired. The syntax of the siclland entry is as follows:
    
    	rpc stream tcp nowait root /opt/sicl/bin/siclland 395180 1
    	siclland [-l logfile]  [-s]  [-k]  [-t timeout]
    	rpc stream tcp nowait root /opt/sicl/bin/siclland 395183 1
    	siclland [-l logfile]  [-s]  [-k]  [-t timeout]
    

    The parameters you can modify are:

    -l logfile Configures siclland to log errors to the specified file, logfile. If the file does not exist, siclland will create it. Also, if multiple clients are accessing the same host, all SICL LAN log messages go to the same log file.

    By default, only the -l logfile parameter is specified in /etc/inetd.conf. The default path to the log file is /var/opt/sicl/siclland_log on HP-UX 10.01. Within a diskless cluster, this directory is an NFS diskless client private directory on HP-UX 10.01, which allows more than one system in the cluster to act as a SICL LAN server, each logging messages to its own log file.

    Also note that the error messages are constantly appended to the log file (that is, the log file is not overwritten). Therefore, the log file may grow rather large over time, and will need to be truncated or removed occasionally to regain disk space.

    -s Configures siclland to log client connections and locking activity in addition to errors. The logged information goes to the file specified with the -l logfile parameter. The -s parameter can only be used if the -l logfile parameter is also used.

    Note that significantly more data is logged to the log file with the -s option than if only the -l option is used. Therefore, the log file will grow rather large over time, and will need to be truncated or removed occasionally to regain disk space.

    -k Configures siclland to use keepalive transmissions to determine if it can still communicate with its client. To accomplish this, the server is configured to use the TCP keepalive timer of the host's TCP/IP protocol stack to determine if a client is still reachable. By specifying this parameter, the siclland daemon will turn on the keepalive timer when connecting to the client. If after the system specified amount of time there has been no activity on the connection, the server will send keepalive probes to the client to determine if it is still alive. After a system specified amount of time, the connection will be marked as down ("dropped"), and the server will release any resources which were allocated to the associated client.

    Note that, in HP-UX, the system's keepalive timer may not start sending keepalive transmissions for two hours, and may retry the transmissions for ten minutes before marking the connection as dropped. See getsockopt(2).

    -t timeout Configures siclland to use an I/O timeout value of timeout seconds if the client requests a timeout of infinity (0). If zero (0) is specified and the client requests infinity, then siclland will use a timeout of infinity as requested. The default is 120 seconds.

    This timeout parameter may be used to ensure that the server does not wait indefinitely for an I/O operation. This also allows the server to detect certain network events, such as when a client connection is dropped, which may otherwise go undetected. If the server detects such a condition, it will release any resources, such as SICL locks, associated with the client.

    For more information, see the man pages for inetd and inetd.conf.

  3. Once you have finished editing the siclland entry in /etc/inetd.conf, save and exit the file.

  4. Execute the following, which makes inetd re-read its configuration file:
    
    	/usr/sbin/inetd -c
    

Optional SICL LAN Server Security

The SICL LAN server can be configured to only accept connections from certain clients. This is accomplished via the optional inetd security file, /var/adm/inetd.sec on HP-UX 10.01. For example, the following entry in the inetd.sec file will allow only the host named siclclient to access the SICL LAN server:


	siclland allow siclclient

A list of networks or hosts can be specified. It is also possible to list networks or hosts which should be denied access. For more information, see the man page for inetd.sec(4).

Deleting the SICL LAN Server Capability

If you no longer wish to have a node act as a SICL LAN server, do the following in addition to removing the SICL-LANSVR file set:

  1. Login as root on the node.

  2. Edit the /etc/rpc file and remove the lines that look like the following:
    
    	siclland         395180
    	tcpinst          395183
    

  3. Save and exit the /etc/rpc file.
  4. Edit the /etc/inetd.conf file and remove the lines that are similar to the following:
    
    	rpc stream tcp nowait root /opt/sicl/bin/siclland 395180 1 
    	siclland -l /etc/opt/sicl/siclland_log
    	rpc stream tcp nowait root /opt/sicl/bin/siclland 395183 1 
    	siclland -l /etc/opt/sicl/siclland_log
    

  5. Save and exit the /etc/inetd.conf file.

  6. Execute the following, which makes inetd reread its configuration file:
    
    	/usr/sbin/inetd -c
    

SICL Interfaces

This subsection contains a summary on each field in the I/O setup utility for each interface type you can configure in SICL for use with HP BASIC/UX 8.0. If you need more information on a specific field, see the online help in the I/O setup utility.

HP-IB Interfaces

SICL supports the following HP-IB interfaces with HP BASIC/UX 8.0:

HP-IB Interfaces
Field Interfaces Default Description
Logical Unit # All 7 Identifies the interface. Each interface must have a unique logical unit number. Subsequent cards would default to 8, 9, 10, etc.
Symbolic Name All hpib Identifies the interface. Each interface type must have a unique symbolic name. hpibx is used for additional cards, with x being the card number (hpib2, for example).
Slot E2070

E2071

1 EISA/ISA slot number. If another card has been configured to slot 1, the next available slot is used.
DIP switches E2070

E2071

01110000

0000

Must reflect the dip switch setting on the interface card. If the DIP switch value is changed here, it must also be changed on the interface card (prior to rebooting with a new kernel).
IRQ line E2071 3 Interrupt request line. If IRQ line 3 is taken by another known card, then the next available line is used.
System Controller All Yes Specifies that the HP-IB interface is system controller.
HPIB Bus Addr All 21 HP-IB bus address of the computer or controller on this interface.

RS-232 Interfaces

SICL supports the HP Series 700 built-in RS-232 with HP BASIC/UX 8.0.

RS-232 Interface
Field Interfaces Default Description

Logical Unit # All 9 for the first

10 for the second

Identifies the interface. Each interface must have a unique logical unit number.
Symbolic Name All

COM1 for first  

COM2 for second

Identifies the interface. Each interface type must have a unique symbolic name.
Port All A Identifies the port in which the interface is installed.
Baud Rate All 9600 Baud rate of the RS-232 interface.
Parity Bit All None Can be none, odd, even, zero, or one.
Character Bits All 8 Bits per character.
Stop Bits All 1 Number of stop bits.
Flow All None Flow.
Service Request All RI Service Request type.

LAN Client Interfaces

SICL supports the HP Series 700 LAN client interface with HP BASIC/UX 8.0.

LAN Client Interface
Field Interfaces Default Description

Logical Unit # LAN Client 30 Identifies the interface. Each interface must have a unique logical unit number.
Symbolic Name LAN Client lan Identifies the interface. Each interface must have a unique symbolic name.
Sever Timeout LAN Client 120 Timeout value in seconds used by the LAN server when applications either use the default timeout value or set the timeout to 0.
Client Timeout Delta LAN Client 25 Value in seconds added to the server timout value to determine the LAN Client timeout value.
Chain SIGPIPE LAN Client YES Determines if the library will call a previously installed SIGPIPE handler.
Log Errors LAN Client YES Determines if the library will log errors to standard out.

GPIO Interface

SICL supports the HP E2074 GPIO interface with HP BASIC/UX 8.0.

GPIO Interface
Field Interfaces Default Description

Logical Unit # E2074 12 Identifies the interface. Each interface must have a unique logical unit number. Subsequent cards would default to 13, 14, 15, etc.
Symbolic Name E2074 gpio Identifies the interface. Each interface must have a unique symbolic name. gpiox is used for additional cards, with x being the card number (gpio2, for example).
Slot E2074 1 EISA/ISA slot number.
DIP Switches E2074 0000 Must reflect the dip switch setting on the interface card.
IRQ line E2074 3 Interrupt request line. If IRQ line 3 is taken by another known card, then the next available line is used.
DMA Channel E2074 1 for 8-bit5 for 16-bit Specifies the number of ISA DMA channels to be used by the interface.
DataOut E2074 Lo=1 Specifies polarity is set to low-true.
PSTS E2074 Lo=NotOK Specifies peripheral status line is set to low-true.
PFLG E2074 Lo=Ready Specifies peripheral flag is set to low-true.
Dataln E2074 Lo=1 Specifies polarity is set to low-true.
PCTL E2074 Lo=Set Specifies peripheral control line is set to low-true.
PCTL Delay E2074 400ns Specifies peripheral control line delay.
Data Port E2074 98622 Comp Configures the data port mode.
Clear DOUT at Reset E2074 NO Determines if DOUT is cleared at reset.
Handshake modes E2074 Full Write/Full Read Determines handshaking mode.
Data-in clocking E2074 MSB:Read CLK LSB:Read CLK Determines when the data input registers are latched.

Removing Configured Interface Cards

The following subsections explain how to remove all, or one or more, configured interface cards from your system.

Removing All Cards

To remove all interface cards from your system (that is, you will no longer be using SICL I/O), login as root and do the following:

  1. If you are not removing any EISA or ISA I/O cards, skip to step 3.

  2. Run the eisa_config program:
    	/sbin/eisa_config
    

    When prompted:

  3. Remove sicl from the /stand/system file or put an asterisk (* ) character in front of the sicl line to comment it out.

  4. Rebuild the kernel.

  5. Shutdown the system and turn off the power. (shutdown -h is recommended.)

  6. Remove all of the cards.

  7. Turn the power on and reboot the system.

Removing One or More Cards

To remove one or more, but not all, interface cards from your system, login as root and do the following:

  1. Edit the /etc/opt/sicl/hwconfig.cf file. Comment out or delete each line specifying a card you are removing.

  2. If you are not removing any EISA or ISA I/O cards, skip to step 4.

  3. Run the eisa_config program:
    	/sbin/eisa_config
    

    When prompted:

  4. Run the siclconf program by executing:  

           /opt/sicl/bin/siclconf

  5. Answer no when siclconf asks if you wish to reboot your system.

  6. Shutdown the system and turn off the power. (shutdown -h is recommended.)

  7. Remove the card or cards.

  8. Turn the power on and reboot the system.

Summary of Supplied SICL File Sets

Installing the SICL-RUN fileset adds or updates the following files and directories to your system:

/var/adm/sw/products/SICL/SICL-RUN Files for customization.
/opt/sicl The main SICL software directory.
/opt/sicl/bin SICL configuration tools, programs, etc.
/opt/sicl/defaults Default versions of the hwconfig.cf and iproc.cf files.
/opt/sicl/lib Driver modules, which are linked and inserted in the kernel by the siclconf configuration program. Also adds the shared libraries.
/opt/sicl/lib Files for the shared library.

SICL-HPIB

Installing the SICL-HPIB fileset adds files to the following directories:

/var/adm/sw/products/SICL/SICL-HPIB Files for customization.
/sbin/lib/eisa EISA configuration files.
/opt/sicl/defaults Default versions of the GPIB configuration files.
/opt/sicl/lib GPIB driver modules, which are linked and program. Also adds the driver shared libraries.

SICL-GPIO

Installing the SICL-GPIO fileset adds files to the following directories:

/var/adm/sw/products/SICL/SICL-GPIO Files for customization.
/sbin/lib/eisa EISA configuration files.
/opt/sicl/defaults Default versions of the GPIO configuration files.
/opt/sicl/lib GPIO driver modules, which are linked and inserted in the kernel by the siclconf configuration program. Also adds the driver shared libraries.

SICL-RS232

Installing the SICL-RS232 fileset adds files to the following directories:

/var/adm/sw/products/SICL/SICL-RS232 Files for customization.
/opt/sicl/defaults Default versions of the RS-232 configuration files.
/opt/sicl/lib RS-232 driver modules, which are linked and inserted in the kernel by the siclconf configuration program. Also adds the driver shared libraries.

SICL-LAN

Installing the SICL-LAN fileset adds files to the following directories:

/var/adm/sw/products/SICL/SICL-LAN Files for customization.
/opt/sicl/defaults Default versions of the LAN configuration files.
/opt/sicl/lib The LAN driver shared libraries.

SICL-VXI

Installing the SICL-VXI fileset adds files to the following directories:

/var/adm/sw/productsSICL/SICL-MAN-VXI Files for customization.
/sbin/lib/eisa EISA configuration files.
/opt/sicl/bin VXI specific configuration files, including the resource manager program, ivxirm.
/opt/sicl/defaults Default versions of the VXI configuration files.
/opt/sicl/lib VXI driver modules, which are linked and inserted in the kernel by the siclconf configuration program. Also adds the driver shared libraries.

SICL-VXI-ISCPI

Installing the SICL-VXI-ISCPI fileset adds files to the following directories:

/var/adm/sw/products/SICL/SICL-VXI-ISCPI Files for customization.
/opt/sicl/lib The I-SCPI driver shared libraries. I-SCPI interrupts SCPI commands for VXI register-based instruments.
/opt/sicl/defaults Default versions of the I-SCPI configuration files.
/opt/sicl/lib/iscpi The VXI register-based instrument driver shared libraries. The README.iscpi file lists what register-based instruments are supported with I-SCPI.
/opt/sicl/bin The I-SCPI server program (to be used by I-SCPI).

Man page for /opt/sicl/bin/siclconf

The siclconf command has a man page, which provides online information. To view the man page, execute:


	man siclconf