AnsweredAssumed Answered

VRF-LAN_IO_II

Question asked by VRFuser on May 20, 1998
send q VRF-LAN_IO_II ww vrf

Let me try this again and get it right this time ... sigh, I've been doing
a lot of this lately.  GVG

from: Greg Goebel / HP-MXD
      gvg@lvld.hp.com / 800-452-4844
      website:  ftp://fcext3.external.hp.com/dist/mxd/index.html
to:   VRF-Alfonso Saavedra
date: Tuesday, 19 May 1998 1515 MDT

Sir:

If you have a current (4.X or 5.X) version of VEE, you can set up a PC as
a network server using the HP I/O Libraries and then remotely access it from
VEE on another PC.  See notes below.

This isn't guaranteed to work with VEE 3.12, since that version of VEE isn't
supported on Win95.  In fact, I suspect it won't work at all since that's old
16-bit software.

[%%] regards -- gvg

--------------------------------- cut here ----------------------------------


[4.0] Using SICL LAN I/O

* The HP E2050 LAN-HPIB bridge (and the LAN-Server capabilities offered
with current versions of HP SICL) are useful extensions of the HPIB interface
and so are worthwhile to discuss here.

This chapter provides an introduction to the configuration and use of
these LAN tools; the focus is strictly on Windows, but most of the
information is also relevant to HP-UX.

[%%]


[4.1] USING THE E2050A

* You can use the E2050 box with Win95 as long as you have ARPA services
installed (which is generally the case by default) using the ARPA TELNET
facility.  On factory delivery, the box is set to an Internet address of:

   192.0.0.192

-- and so you can use this address with TELNET to get to it.  (You will need
to invoke the command "ROUTE ADD 192.0.0.192 <mycomputer_name>" from a DOS
Window first so that TELNET can understand the address.)

Anyway, when you log into the box in this way, you will get a list of
commands and configuration settings, which you then configure to the
necessary defaults -- for example:

   Welcome to the E2050A LAN/HP-IB Configuration utility

   Commands
     ?
     exit,quit
     reboot
     status

   Configuration Parameters
     hostname:        hptest          # Internet domain name
     hardware-addr:   0700081B6E25    # Ethernet station address
     ip:              15.11.17.88     # Internet Protocol address
     default-gw:      15.11.23.5      # Default subnet gateway IP address
     subnet-mask:     255.255.230.0   # Network subnet mask
     syslog-svr:      0.0.0.0         # Syslog server IP address
     bootp:           OFF             # Obtain config via BOOTP/FTP
     lan-timeout:     7200            # LAN connect timeout in seconds
     io-timeout:      240             # Server I/O timeout in seconds
     allow:           15.11.32.* 15.11.35-42.* 15.11.88-92.* #

     hpib-address:    17              # HP-IB System Controller Address
     hpib-name:       hpiblan         # HP-IB interface symbolic name
     hpib-unit:       1               # HP-IB logical unit number

In the illustration above, the defaults have been already set ... each is
set by invoking the name of the setting, followed by the value:

   hpib-name:  hpiblan

If you don't see anything as you type it in, make sure you have "local echo"
set in your TELNET preferences menu.

The settings are grouped into two sections; the first must be set in
cooperation with your local network administration's recommendations (note
that for TELNET configuration, "bootp" must be OFF), while the second set --
the "hpib" settings -- you can set yourself, and are quite important ...
they're the equivalent of the parameters you would use to deal with an HPIB
card that you plug into your computer.

Anyway, once you've configured the box with the appropriate settings, then
you can save them and exit with the command:

   reboot

If you just want to exit, you can instead use:

   exit

Note that you may need to directly connect the box via LAN to your PC if
you have trouble configuring it.  The settings are saved in nonvolatile
memory so they will be retained.  (If you want to reset the box, there is
a little detent on the back that you can activate with a pen or similar
object.)

* That's the short course on configuring the box.  Accessing it from the PC
is quite simple once that hurdle is overcome ... you just make sure you have
current HP I/O Libraries installed and run the I/O Configuration utility:

  +------------------------------------------------------------------------+
  |          Interface Configuration Application - I/O Config    [_][ ][x] |
  +------------------------------------------------------------------------+
  | File  Help                                                             |
  +------------------------------------------------------------------------+
  | This utility configures I/O interfaces.  To configure a new interface, |
  | select it in the Available Interface Types list and click on           |
  | Configure.  To edit a previously configured interface, select it in    |
  | the Configured Interfaces list and click on Edit.                      |
  |                                                                        |
  | +- Available Interface Types -+ +- Configured Interfaces ---+          |
  | |                             | |                           |          |
  | |                             | |   SICL Name   VISA Name   |          |
  | |  +-----------------------+  | |  +---------------------+  |          |
  | |  | HP 82335 HP-IB        |  | |  | COM1       ASRL1    |  | [  OK  ] |
  | |  | HP 82340/82341 HP-IB  |  | |  |                     |  |          |
  | |  | HP E2075 GPIO         |  | |  |                     |  |          |
  | |  | LAN Client            |  | |  |                     |  |          |
  | |  | LAN Server            |  | |  |                     |  | [ Help ] |
  | |  | RS-232                |  | |  |                     |  |          |
  | |  | VISA LAN Client       |  | |  |                     |  |          |
  | |  | VXI Command Module    |  | |  |                     |  |          |
  | |  |                       |  | |  |                     |  |          |
  | |  +-----------------------+  | |  +---------------------+  |          |
  | |       [ Configure ]         | |  [   Edit  ] [ Remove ]   |          |
  | +-----------------------------+ +---------------------------+          |
  |                                                                        |
  +------------------------------------------------------------------------+

In this case, you want to configure a LAN Client, so you select that entry
and click on "Configure"; you get a dialogue:

  +-----------------------------------------------------+
  | LAN Client                                          |
  +-----------------------------------------------------+
  |                                                     |
  | Questions?  Press the Help button below.            |
  | Recommended default values are shown.               |
  |                                                     |
  |       Interface name:  [ lan    ]    [    OK    ]   |
  |         Logical Unit:  [ 30     ]    [  Cancel  ]   |
  |       Server Timeout:  [ 120    ]    [   Help   ]   |
  | Client Timeout Delta:  [ 25     ]    [ Defaults ]   |
  |                                                     |
  |                        +- Protocol ----+            |
  |    [x] Log Errors      |               |            |
  |                        | (*) SICL/LAN  |            |
  |                        | ( ) TCP/INST  |            |
  |                        +---------------+            |
  +-----------------------------------------------------+

All the default settings are fine.  Note that the "interface name" above is
"lan", but the E2050's name is "hpiblan" ... the two are necessarily
different, because the interface "lan" can access any E2050 (or, as will
be discussed presently, any PC configured as a LAN server) that it has
a network connection to.

Note also the setting for "SICL/LAN" and "TCP/INST".  SICL/LAN is the HP spec
originally devised for instrument LAN communications, which was modified and
enshrined as an "official" VXI Consortium spec named TCP/INST.

Both the instrument and the controller must conform to this spec to
communicate properly; at the present time, only the LAN-HPIB controllers
provided by MXD conform to it, so it hardly matters which one you set (in
fact, they work even if client and server don't have the same setting).  Work
is being done to establish TCP/INST for general instrument use.

* You can also configure the LAN Client as a VISA Lan Client.  If you select
this option, you get the configuration dialogue:

   +------------------------------------------------------------------+
   | VISA LAN Client Interface                                     [x]|
   +------------------------------------------------------------------+
   |       Questions?  Press the Help Button below.                   |
   |       Recommended default values are shown.                      |
   |                                                                  |
   |                                              [       OK        ] |
   |                                                                  |
   | +- Where is the GPIB interface located? --+  [     Cancel      ] |
   | |                                         |                      |
   | | Hostname:  [ 15.11.29.90             ]  |  [      Help       ] |
   | |                                         |                      |
   | | Remote SICL Address:  [ hpiblan      ]  |  [     Defaults    ] |
   | |                                         |                      |
   | | SICL LAN Interface: [ lan            ]  |  [ Edit VISA Config] |
   | |                                         |                      |
   | +-----------------------------------------+                      |
   |                                                                  |
   +------------------------------------------------------------------+

In this case, you need to ensure that the proper E2050 settings are provided
in the configuration fields.  The LAN interface will be represented by a
VISA device name, such as GPIB1, meaning devices will be represented by names
such as GPIB1::22::INST or (for secondary addresses) GPIB1::9::3.

If you click on "Edit VISA Config", a dialogue box to allow you to configure
devices on the remote HPIB:

   +----------------------------------------------------------+
   | Show Devices                                          [x]|
   +----------------------------------------------------------+
   |                                              [   OK    ] |
   | [x] Identify devices at run-time             [  Cancel ] |
   |                                                          |
   | Devices present on interface GPIB1:                      |
   | +---------------------------------+                      |
   | | GPIB2::11                       | [    Add Device    ] |
   | |                                 | [  Remove Device   ] |
   | |                                 |                      |
   | |                                 |                      |
   | |                                 |                      |
   | |                                 | [ Auto Add Devices ] |
   | +---------------------------------+                      |
   +----------------------------------------------------------+

Beware that "Auto Add Devices" doesn't work with LAN, however; that feature
requires direct access to an HPIB interface, and that's not available over
LAN.  You will need to know the HPIB addresses and configure them manually.

Once the configuration has been defined, then these names can be used to
configure Plug&Play drivers under VEE Instrument Manager, or selected from
VISA Assistant to perform simple queries.

[%%]


[4.2] USING THE E2050 WITH VEE

* Anyway, once you have configured the E2050 and the LAN client, you can then
use VEE to access the E2050 box.

To do this, you need to remember the box's LAN address as defined during
configuration:

   ip:              15.11.17.88     # Internet Protocol address

-- plus the HPIB configuration information defined then as well:

   hpib-address:    17              # HP-IB System Controller Address
   ...
   hpib-unit:       1               # HP-IB logical unit number

Note that VEE doesn't care what the E2050 has been named ... all VEE
requires is the Internet address (15.11.17.18 in this case) and the logical
unit number (1 in this case).

Armed with this information, you then bring up the VEE Instrument Manager:

   +------------------------------------------------------------+
   | Instrument Manager                                      [x]|
   +------------------------------------------------------------+
   | +- Instrument List -----------------+- Configuration ----+ |
   | |                                  ^|                    | |
   | | My Configuration                  | [      Add       ] | |
   | |  |                                | [     Delete     ] | |
   | |  +- GPIO12                        | [      Edit      ] | |
   | |  |   |                            | [     Refresh    ] | |
   | |  |   +- GPIO(@12)                 |                    | |
   | |  |                                +- Get Device -------+ |
   | |  +- HP-IB7                        |                    | |
   | |  |   |                            | [   Direct I/O   ] | |
   | |  |   +- HP33120(@710)             | [Plug&Play Driver] | |
   | |  |   +- HP34401(@722)             | [Component Driver] | |
   | |  |                                | [  Panel Driver  ] | |
   | |  +- Serial9                      v|                    | |
   | +-----------------------------------+--------------------+ |
   |        [ Save Config ] [   Cancel  ] [    Help    ]        |
   +------------------------------------------------------------+

-- and perform "Add" or "Edit" as required.  Supposing you want to add a
54600 scope with HPIB address 13, you would perform setup as follows:

   +----------------------------------+
   |       Device Configuration       |
   +----------------------------------+
   |                                  |
   | Name:              [   54600   ] |
   | Interface:         [    HPIB  v] |
   | Address (eg 9)     [    113    ] |
   | Gateway:           [15.11.17.88] |
   |                                  |
   |    [ Advanced I/O Config... ]    |
   |                                  |
   | [   OK   ] [ Cancel ] [  Help  ] |
   +----------------------------------+

-- and then save parameters.  Note that you use the logical unit number "1"
as specified in E2050 configuration, and that you should make sure the
instrument isn't at address 17, which is the HPIB address of the E2050
itself.

This done, you can then invoke Direct I/O or a driver for that device.  If
you don't have LAN configured on your computer, you get an error message:

   Configuration error:  Lan interface not configured for this machine

Otherwise, it comes up just as if it were a local HPIB interface.  However,
please be aware that LAN transaction overhead tends to be large, and that
since you don't necessarily have exclusive access to the E2050 box, you need
to run the Interface Operations box with an EXECUTE LOCK INTERFACE
transaction before doing anything, and an EXECUTE UNLOCK INTERFACE
transaction after you do everything.

* Note that while you can take out an "Address" pin on VEE I/O objects to
allow an HP-IB address to be changed programmatically, up to VEE 4.0 you
could not change the LAN address programmatically.  This option was added
to VEE 4.0.

[%%]


[4.3] USING THE E2050 WITH HP BASIC FOR WINDOWS

* It's just as simple to use the E2050 with HP BASIC for Windows, though
the rules are slightly different; all you have to do is load the SICL driver
for HPBW in the HPBW AUTOST file with the correct LAN parameters -- which
in this case gives:

   LOAD BIN "HPIBS;DEV lan[15.11.17.88]:hpiblan TIME 30 ISC 7"

Unlike VEE, HPBW does care about the name of the E2050 interface ("hpiblan")
and doesn't care about it logical unit number (1) ... this LOAD BIN assigns
it a logical unit number of "7", and so a program to fetch the ID from the
54600 would have the statements:

   OUTPUT 713;"*IDN?"
   ENTER 713;S$ 

HPBW supports interface locking through control register 255; to set locking
you perform:

   CONTROL 7,255;5

-- and to clear locking you perform:

   CONTROL 7,255,4

Note also that you cannot reset HPBW if your LAN operation is hung, so you
should specify the timeout in the LOAD BIN, as above.  Finally, note that the
E2050 does not support non-controller operations, such as REQUEST and PASS
CONTROL.

[%%]


[4.4] USING THE LAN SERVER

* Using the LAN server is conceptually easy.  All you have to do is select
"LAN Server" from the I/O Config utility; you get a dialogue:

  +-----------------------------------------------------+
  | LAN Server                                          |
  +-----------------------------------------------------+
  |                                                     |
  | Questions?  Press the Help button below.            |
  | Recommended default values are shown.               |
  |                                                     |
  |   Server Timeout       [ 120    ]    [    OK    ]   |
  |                                      [  Cancel  ]   |
  |   [x] Log Errors                     [   Help   ]   |
  |                                      [ Defaults ]   |
  |   [ ] Log Locks and Connections                     |
  |                                                     |
  |   [ ] Use Keepalive Client Probes                   |
  |                                                     |
  +-----------------------------------------------------+

Once you have configured this (the defaults are fine) then every time you
boot Win95, you'll get the LAN Server box (which you can then hide on the
taskbar).

With this in place, the I/O that you have configured on your PC is now
accessible from another PC using the logical unit numbers on your PC, along
with your PC's Internet address.  For example, if I wanted to set up access
to the same 54600 scope through my PC for another PC, and my PC had the
Internet address "hplvlwec" and an HPIB card at logical unit 7, then I would
configure the device under VEE with:

   +----------------------------------+
   |       Device Configuration       |
   +----------------------------------+
   |                                  |
   | Name:              [   54600   ] |
   | Interface:         [    HPIB  v] |
   | Address (eg 9)     [    713    ] |
   | Gateway:           [ hpislwec  ] |
   |                                  |
   |    [ Advanced I/O Config... ]    |
   |                                  |
   | [   OK   ] [ Cancel ] [  Help  ] |
   +----------------------------------+

Note that I used the symbolic form of the address here ... and didn't need to
specific the domain extension (".lvld.hp.com") since I was trying to access
the PC from another one in the same domain.

Anyway, this works exactly the same (and with the same restrictions) as does
the E2050.  You can access HPIB or serial I/O on the server PC ... you can't
use VXLink, however -- while you can gain access to it, you can't perform
memory-mappings over the LAN.

[%%]


[4.5] COMMENTS

* In practice it turns out that the LAN tools are quite easy to use.
Configuration, however, is another matter -- since it's about 10% an E2050
or LAN Server problem and about 90% a LAN configuration problem.  You will
require assistance of your local network administration to get the thing to
work ... for example, we once had an installation where the customer could
PING and even TELNET to the E2050, but couldn't get it to communicate to I/O
-- it turned out to be a subnet mask error!

In another case, the user couldn't open a session at all -- he tried to
perform I/O on the E2050A from VEE, and got an "Invalid symbolic name /
interface on remote system not configured / err 811" error (timeout errors
are also possible). 

After much trouble we traced this down to the PC's networking configuration
-- the E2050A wasn't identified by name in the PC's "hosts" file and so there
was no way to find it.  Under Win95, this file can be found as:

  C:WIN95HOSTS

There is a sample file named HOSTS.SAM ("SAMple") usually available to show
how the file is organized ... just copy it to filename HOSTS and make the
appropriate changes (since HOSTS.SAM won't be recognized by the operating
system as a real HOSTS file).  Under WinNT this is given as:

  C:WINNTSYSTEM32DRIVERSETCHOSTS

It will have an entry to perform the mapping something like this:

   15.11.33.88    hpislcoy      # Greg's Portal at his desk

It is usually useful to try to get the E2050A to work on a direct and
isolated connection to the host before installing it at a remote location.
When I installed my first E2050A, it worked OK when directly connected to
the host ... but failed at the remote location; it turned out the LAN
connection was defective.

One of the incidental problems with installing the E2050A is that a network
administrator may be a little baffled by some of the box parameters -- quite
unnecessarily:  All he or she needs to be concerned with is setting the box
up as a node on the network (just like any other node on the network), and
the other information is up to the user to define.

Note that there is an alternate configuration scheme called BOOTP that allows
the E2050 to be configured from a central node when a network is brought up.
This approach may be more suitable to your network administration scheme ...
it is not discussed in detail here because it is somewhat obscure, but if
your network administrator should be familiar with the concept (it is not
unique to the E2050).

[<>]

Outcomes