Adept Windows PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 104

AdeptWindows User's Guide

This is a printed version of the AdeptWindows User's Guide online documentation. A Table of
Contents is provided so that you can locate the desired topics. Because this document is
designed for online viewing, cross−references will not have page numbers. For easier navigation
use the online version of this document, which can be accessed from the Knowledge Express
Library.
Table of Contents
Welcome To AdeptWindows........................................................................................................................................1

What is AdeptWindows?..............................................................................................................................................3
What's New?.....................................................................................................................................................4
System Requirements.......................................................................................................................................4
PC Requirements.......................................................................................................................................5
Adept Controller Requirements.................................................................................................................5
Network Requirements..............................................................................................................................6
How Do I Begin?..............................................................................................................................................6
Which Connection Method Should I Use?................................................................................................6
How Can I Get Help?.......................................................................................................................................6
Installing the Software......................................................................................................................................6
To install AdeptWindows:.........................................................................................................................7
To install the Omni−NFS Server Software...............................................................................................7
Installing the AdeptWindows License..............................................................................................................7
Setting up a Serial Connection.........................................................................................................................8
Required Cabling.......................................................................................................................................8
Hardware Connection................................................................................................................................8
Configuring the Serial Protocol.................................................................................................................8
Working With Ethernet.....................................................................................................................................9
A Note on IP Addresses............................................................................................................................9
Required Interface Hardware..................................................................................................................10
Using PING to Test the Ethernet Setup...................................................................................................11
Configuring Your System...............................................................................................................................12
Using the Controller Network Configuration Utility..............................................................................12
Configuring One PC, Controller, and NFS Server..................................................................................14
Configuring One PC, Multiple Controllers, and One NFS Server..........................................................15
Configuring Multiple PCs, Multiple Controllers, and One NFS Server.................................................16
Configuring Multiple PCs, Controllers, and NFS Servers......................................................................17
Configuring Multiple PCs, Controllers, NFS Servers, and Networks.....................................................18
Installing TCP/IP............................................................................................................................................19
Installing TCP/IP on a PC Running Windows 95/98..............................................................................20
Installing TCP/IP on a PC Running Windows 2000...............................................................................22
Installing TCP/IP on a PC Running Windows NT..................................................................................26
Installing NFS.................................................................................................................................................29
Configuring the Omni−NFS Server.........................................................................................................29
Mounting an NFS Drive from the Adept Controller...............................................................................34
Referring to Mounted Drives...................................................................................................................35
Testing the NFS Mounted Drives............................................................................................................35
Setting the DIP Switches on the Controller....................................................................................................37
Changing Software Switches and Network Settings......................................................................................38
Loading and Running the CONFIG_C Utility........................................................................................38
Changing the Software Switch Settings..................................................................................................39
Changing the User−Defined IP Address in NVRAM.............................................................................39
Changing the Names and Paths for NFS Mounted Drives......................................................................39
Installing DDE With AIM..............................................................................................................................40

AdeptWindows User's Guide i


Using AdeptWindows PC

Table of Contents
Using AdeptWindows PC...........................................................................................................................................43
Starting AdeptWindows PC............................................................................................................................43
Connecting Through Ethernet.................................................................................................................43
Scanning Ethernet for Available IP Addresses.......................................................................................44
Connecting Through a Serial Port...........................................................................................................44
The AdeptWindows PC Main Window..........................................................................................................45
The AdeptWindows PC Menus......................................................................................................................46
The File Menu.........................................................................................................................................46
The Adept Menu......................................................................................................................................46
Disconnecting From the Controller................................................................................................................46
Closing AdeptWindows PC............................................................................................................................47

Using the AdeptWindows TFTP Server....................................................................................................................49


Starting the AdeptWindows TFTP Server......................................................................................................49
The AdeptWindows TFTP Server Menus......................................................................................................49
The File Menu.........................................................................................................................................50
The Help Menu.......................................................................................................................................50
Booting the Adept Controller Over Ethernet..................................................................................................50
Understanding TFTP Server Diagnostics.......................................................................................................51
Enabling Diagnostic Messages................................................................................................................51
Clearing the Messages.............................................................................................................................52
Closing the AdeptWindows TFTP Server......................................................................................................52

Using AdeptWindows DDE........................................................................................................................................53


Starting AdeptWindows DDE........................................................................................................................53
Starting AdeptWindows From the Windows Program Manager............................................................53
From the MS−DOS Prompt.....................................................................................................................54
Defining, Modifying, or Deleting a V+ Host.................................................................................................54
Running the DDE Driver on the Adept Controller.........................................................................................56
Specifying DDE Item Names.........................................................................................................................56
Using Hot and Cold Links..............................................................................................................................56
Getting DDE Status Information....................................................................................................................57
Customizing DDE Variable Records in AIM.................................................................................................58
Modifying DDE Records in AIM............................................................................................................59
Creating New DDE Records in AIM.......................................................................................................59
Defining the V+ Expression Associated With the DDE Record.............................................................61
Creating Variable Records......................................................................................................................62
Simple DDE Examples...................................................................................................................................62
Reading Data Using Microsoft Excel......................................................................................................62

Using the AdeptWindows Offline Editor..................................................................................................................65


Restrictions.....................................................................................................................................................65
Starting the Offline Editor..............................................................................................................................66
Using the Toolbars..........................................................................................................................................66
Editing Toolbar Icons..............................................................................................................................67
Loop/Branch Toolbar Icons.....................................................................................................................67
Motion Toolbar Icons..............................................................................................................................67
The Offline Editor Menus...............................................................................................................................68
The File Menu.........................................................................................................................................68

ii AdeptWindows User's Guide


Table of Contents
Using the AdeptWindows Offline Editor
The Edit Menu.........................................................................................................................................69
The Search Menu.....................................................................................................................................69
The Project Menu....................................................................................................................................69
The Insert Menu......................................................................................................................................69
The Tools Menu......................................................................................................................................70
The Window Menu..................................................................................................................................70
The Help Menu........................................................................................................................................70
Getting Online Help........................................................................................................................................70
Keyword Syntax Help.............................................................................................................................71
Details on Keywords...............................................................................................................................71
Reference Guide Information..................................................................................................................71
Getting Around...............................................................................................................................................71
Find and Replace.....................................................................................................................................72
Goto Program and Previous Program......................................................................................................73
Program Pick Lists..................................................................................................................................73
Navigate...................................................................................................................................................73
Creating and Editing a Program.....................................................................................................................74
Creating a New File/V+ Program............................................................................................................74
Opening an Existing V+ Program File....................................................................................................75
Adding a New Program to an Existing Program File..............................................................................75
The Editor Window.................................................................................................................................75
Working With Program Variables...........................................................................................................77
Working With Projects...................................................................................................................................77
Creating a New Project............................................................................................................................78
Opening an Existing Project....................................................................................................................79
Getting Information on the Current Project.............................................................................................79
Modifying Project Files...........................................................................................................................79
Modifying Project File Attributes...........................................................................................................80
Building a Project....................................................................................................................................81
Listing and Renaming Program Files.............................................................................................................81
Customizing the Programming Environment.................................................................................................82
The Standard Program Header................................................................................................................82
Customizing the Highlighting Colors......................................................................................................83
Displaying or Hiding the Toolbars..........................................................................................................84
Creating CALL Tree and Keyword Listings..................................................................................................84
CALL Tree Listing..................................................................................................................................85
Keyword Listing......................................................................................................................................85
Printing and Documentation...........................................................................................................................87

Using Existing V+ Routines........................................................................................................................................89


The BUFFERED Keyword.............................................................................................................................89
The EVENT_CONNECT Keyword...............................................................................................................89
The ID Keyword.............................................................................................................................................89
The MENU Keyword.....................................................................................................................................90
Menu Events...................................................................................................................................................90
Window Size...................................................................................................................................................90
Example V+ Program.....................................................................................................................................91

AdeptWindows User's Guide iii


Troubleshooting

Table of Contents
Troubleshooting..........................................................................................................................................................95
DDE Errors.....................................................................................................................................................95
Connecting to Host..................................................................................................................................95
Using Microsoft Excel.............................................................................................................................95
Energy Star Compliant Systems.....................................................................................................................96
Ethernet Communications..............................................................................................................................96
Connecting to an Adept Controller Through TCP/IP..............................................................................96
NetManage's TCP/IP...............................................................................................................................96
Other Ethernet Problems.........................................................................................................................96
PC or Adept Controller Problems...................................................................................................................97
PC or Windows Program Problems.........................................................................................................97
Adept Controller Problems......................................................................................................................97
TIFF Image Export.........................................................................................................................................97
V+ License......................................................................................................................................................98

iv AdeptWindows User's Guide


Welcome To AdeptWindows

AdeptWindows represents the first step toward drawing the PC closer to the Adept controller. In keeping with the
tradition of providing a safe and predictable development environment, Adept will continue this evolution of
software tools in a phased approach.

AdeptWindows User's Guide 1


Welcome To AdeptWindows

2 AdeptWindows User's Guide


What is AdeptWindows?
AdeptWindows is an application suite of programs for the personal computer (PC) that provides
new capabilities for the Adept controller and a user interface for the PC. The AdeptWindows suite
consists of:

♦ AdeptWindows PC
♦ AdeptWindows DDE
♦ AdeptWindows Offline Editor
♦ AdeptWindows TFTP Server
♦ Controller Network Configuration Utility
♦ AdeptWindows Online Help
Your AdeptWindows kit (PN 00494−001) includes the following items:

♦ AdeptWindows Software and Online Help


♦ XLink Technology, Inc. Omni−NFS Server software for the PC (found on the
AdeptWindows CD−ROM)
♦ Shielded Ethernet crossover cable and adapter
♦ AdeptWindows Installation Guide
AdeptWindows PC

AdeptWindows PC enables a PC to display the real−time Graphical User Interface (GUI) for an
Adept controller. The AdeptWindows PC solution allows a PC connected to the controller, using
either Ethernet or a COM (serial) port, to replace a dedicated display monitor, keyboard, and
mouse.

Note: Except for images in the Vision window, AdeptWindows PC does not support the AIM
screen capture utility. However, you can capture AdeptWindows screens using any
Windows−compatible screen capture utility program (e.g., HiJaak ). See TIFF Image Export for
more details.

To ensure compatibility with existing V+ applications, the AdeptWindows PC product uses


existing V+ instructions to display graphics to the user. AIM software and existing customer
libraries are compatible, and only minor additions are needed to enable the connection between the
Adept controller and a PC that is running AdeptWindows PC. More...

AdeptWindows DDE

AdeptWindows DDE provides a standard Dynamic Data Exchange (DDE) server application to
allow communication with other DDE−capable applications running under Microsoft Windows on
a PC (e.g., WonderWarefi, Excelfi).

The DDE functionality is embedded in the interface between the PC and the controller. This
provides the first open link between the Adept controller and standard applications running on the
PC. Extending this concept further, custom applications developed in C, C++, or Visual Basic on
the PC can use the DDE protocol to communicate with the Adept controller through the DDE
interface. More...

AdeptWindows Offline Editor

AdeptWindows User's Guide 3


What is AdeptWindows?

AdeptWindows Offline Editor is an upgrade to our popular offline editor that provides the system
administrator/customizer with the capability to edit and manage disk files on the PC. More...

AdeptWindows TFTP Server

AdeptWindows TFTP Server allows the Adept controller to boot over Ethernet. It contains a
user−enabled diagnostics capability that displays the IP node address, file names, and error
messages during the booting process. More...

Controller Network Configuration Utility

The Controller Network Configuration Utility simplifies the process of bringing up a new Adept
controller. It allows you to set the IP address (and subnet mask) of the Adept controller regardless
of the current IP address of the controller and of the PC. More...

AdeptWindows Online Help

The AdeptWindows Offline Editor features an online help system. The help system provides quick
access to proper keyword syntax, detailed keyword descriptions, and online versions of the V+
Language Reference Guide and the AdeptWindows User's Guide (the help system you are in
currently). More...

What's New?
Version 3.0 contains the following new features:

• Connect button added to the Scan Ethernet window.

In previous versions of AdeptWindows, you were required to write down the desired IP address and then
enter it in the V+ Cell Address dialog box. AdeptWindows version 3.0 allows you to simply select the
desired IP address and press the new Connect button to connect to the selected system. More...

• Controller Network Configuration Utility

The Controller Network Configuration Utility simplifies the process of bringing up a new Adept controller.
It allows you to set the IP address (and subnet mask) of the Adept controller regardless of the current IP
address of the controller and of the PC. More...
• Vision improvements

♦ Vision window appends the text "(LIVE)" to the title bar when live video is displayed.
• For V+ 14.2 and later, V+ no longer transmits video when the Vision window is closed.
• When V+ detects missing video data, it gradually reduces the video transmission rate until no video data is
missing.

System Requirements
AdeptWindows runs on both Windows 95/98 and Windows NT 4.0/2000/XP. Unless noted, the term “Windows”
refers to these operating systems.

The AdeptVision image is not supported by the serial option. However, vision graphics are displayed on the PC.

4 AdeptWindows User's Guide


What is AdeptWindows?

• PC Requirements
• Adept Controller Requirements
• Network Requirements

PC Requirements

In order to use AdeptWindows, a PC should be configured as follows:

• IBM−compatible PC with a processor capable of running Windowsfi 95/98 or Windowsfi NT/2000/XP.


• Windows 95/98 or Windows NT 4.0/2000/XP operating system. (Windows 95/98 requires the Microsoft
Windows Installer 2.0 update for the MSI−based software installer, which is available from the Microsoft
website.)
• 500 Mb hard disk (recommended minimum, more may be required for your version of Windows).
• Minimum of 16 Mb RAM (more memory may be required to run Windows NT/2000/XP).
• SVGA monitor.
• CD−ROM drive.
• AdeptWindows Kit (includes AdeptWindows CD, Ethernet crossover cable, Online Help, and the
AdeptWindows Installation Guide). AdeptWindows version 3.0D2 or later is recommended for use with the
SmartController.
• For the Ethernet option, the PC requires an Ethernet card, and Adept−supplied crossover cable or
user−supplied networking hardware (cabling, hub, wireless node, etc.).

CAUTION: If the Adept−supplied crossover cable is used, it must be directly connected between the PC's
Ethernet card and the Adept controller. DO NOT mix the crossover cable with user−supplied hubs or
cables.
• For the serial option, a serial−interface cable is required.

Adept Controller Requirements

In order to use AdeptWindows, an Adept controller should be configured as follows:

NOTE: The following V+ system versions (or later) are required if the PC has Windows 2000 SP3 or Windows XP:
13.0 edit G3, 13.1 edit K1, 13.2 edit E5, 13.3 edit A3, 14.0 edit K5, 14.1 edit B8, 14.2 edit C8, 15.0 edit E, 15.1 edit
B5, 15.2 edit A, 16.x.

Adept MV Controller Requirements

• V+ 13.0 or later (V+ 13.2 or later is required to run the Controller Network Configuration Utility).
• An AWC−II board.
• An AdeptWindows license on the controller.
• For the Ethernet interface, the AdeptNet license must be enabled.
• For the serial option, a serial link between the PC and the Adept controller is required. This link uses the
serial RS−232/Term port, located on the AWC board.

Adept SmartController Requirements

• CompactFlash supplied by Adept that is preloaded with the V+ OS.


• V+ 15.0 edit D or later.
• An AdeptWindows license on the controller.
• User−supplied 24VDC power supply. Refer to "Connecting Power" in Chapter 2 of the Adept
SmartController User's Guide.

AdeptWindows User's Guide 5


What is AdeptWindows?

• For the Ethernet interface, the AdeptNet license must be enabled

NOTE: The serial option is not supported on the Adept SmartController.

Network Requirements

AdeptWindows users should be aware that a fixed IP address is required for both the PC and the Controller.
Typically, IP addresses are allocated by your IT department.

How Do I Begin?
Before you can use AdeptWindows, you must complete the following steps:

1. Install the Adept controller.


2. Install AdeptWindows on your PC.
3. Install the AdeptWindows license on the Adept controller.
4. Set up a serial or Ethernet connection.
5. Start the AdeptWindows program(s).

Which Connection Method Should I Use?

Which method is best for you? Choose one of the following PC setups and follow the recommended procedure.

Recommended
Recommended
Your PC Setup User Interface and Notes
Procedure
Connection
Configuring One
AdeptWindows PC through
PC has an Ethernet card PC and Controller
Ethernet connection using Preferred and most common
and already has an With
user−assigned IP address in setup.
assigned IP address. User−Assigned
SmartController
IP Address
AdeptWindows PC through A common setup for Configuring One
PC has an Ethernet card
Ethernet connection using SmartControllers with PC and Controller
but doesn’t have an IP
default IP address in standalone PC’s (i.e., not on a Using Default IP
address configured.
SmartController corporate network). Address
PC does not have an
Useful for troubleshooting. See the
Ethernet card, or you’re
HyperTerminal through an Not useful for development − SmartController
having difficulty
RS−232 Serial connection does not allow Vision User's Guide,
connecting through
windows. section 3.6
Ethernet.

How Can I Get Help?

Installing the Software


The AdeptWindows software for the PC is distributed on CD−ROM. The media contains an installation program to
properly install the software on the PC. The following programs will be installed:

6 AdeptWindows User's Guide


What is AdeptWindows?
• AdeptWindows PC
• AdeptWindows Offline Editor
• AdeptWindows DDE Server
• AdeptWindows TFTP Server
• Omni−NFS Server (optional)
• Controller Network Configuration Utility
• AdeptWindows Online Help
• AIM Online Help

After installation, each of these programs can be started from the Start menu bar in Windows.

To install AdeptWindows:

1. Insert the AdeptWindows software CD−ROM into the CD drive of your PC.

♦ If AutoPlay is enabled, the Welcome to AdeptWindows menu is automatically displayed.


♦ If AutoPlay is disabled, you will need to manually start the CD−ROM. Use Windows Explorer to
browse to your CD−ROM drive, right−click on the drive, and select AutoPlay from the menu.
2. Click Read Important Information. The ReadMe file is displayed.
3. Verify that your system meets the minimum requirements described in the System Requirements section.
4. After reviewing the information, click the close icon in the upper−right corner of the information window
to close it.
5. Click Install AdeptWindows. The AdeptWindows Setup Wizard opens. Follow the on−screen instructions
to complete the installation.

To install the Omni−NFS Server Software

NOTE: The configuration of Omni−NFS server requires a different procedure on Windows NT/2000/XP systems
versus Windows 95/98 systems. Please refer to the topic Configure the Omni−NFS Server for details.

If you do not have Omni−NFS server or another NFS server application installed on your PC, you should install the supplied Omni−NFS
server software. See Installing the Omni−NFS Server on the PC for details on installing the Omni−NFS server software.

Installing the AdeptWindows License


To use AdeptWindows PC, the AdeptWindows license must be installed on the Adept controller. If your system was
ordered from Adept with the AdeptWindows PC option, the license is already installed. If you are adding the
AdeptWindows PC option to an existing system, the license must be installed. On a controller that does not have the
license installed, the controller will allow a connection to an AdeptWindows PC interface. However, all the other
license options on your Adept controller are disabled. This allows you to install the license and then restart the
controller. After restarting, all controller options will initialize normally.

To install the license on the Adept controller, type the following at the Monitor prompt:

INSTALL password

where “password” is the password for AdeptWindows on your Adept controller.

AdeptWindows User's Guide 7


What is AdeptWindows?

Setting up a Serial Connection


This section describes how to set up a serial communication link between your PC and the Adept controller. If you
are using an Ethernet communication link, see Working With Ethernet.

Note: The serial connection works only with the RS−232/TERM serial port on the AWC board being used as the
Adept controller’s main system processor. It cannot be used with the controller’s global serial ports located on an
SIO board or serial ports on an auxiliary processor board.

Additionally, this item works only with Adept MV controllers that are equipped with an AWC board. It will not
work with the Adept SmartController.

Required Cabling

The serial interface cable is provided with the AdeptWindows Controller board.

The controller end of the cable has a circular mini−DIN male connector. This connector plugs into the
RS−232/TERM port (circular mini−DIN female connector) located on the AWC board. See the Adept MV
Controller User's Guide or Adept SmartController User's Guide for pinout details.

The PC end of the cable is terminated with a DB 25−pin serial connector. This plugs into a 25−pin serial port on
your PC. A 25− to 9−pin adapter is included that can be used to connect the cable to a 9−pin serial port.

Hardware Connection

To set up the serial connection:

1. Connect one end of the serial interface cable to a COM port in your PC. Make a note of the COM port you
are using (this information is required during the software startup).
2. Connect the other end of the cable to the RS−232/TERM port on the AWC board or RS−232 port on the
Adept SmartController.
3. Set the DIP switches on SW1 on the AWC board or Adept SmartController. More...

Note: When the DIP switches on the AWC board are set for AdeptWindows, the AdeptWindows option must be
enabled (see “Installing the AdeptWindows License” on page 28 for details). Otherwise, the connection will succeed
but all other installed license options on the controller will be unavailable.

Configuring the Serial Protocol

The serial ports are automatically configured by the AdeptWindows PC software and V+ 14.0 (or later) operating
system. Therefore, you do not need to manually configure the serial protocol.

The V+ version 14.0 (or later) operating system (running on the Adept controller) and the AdeptWindows PC
application (running on the PC) are configured to operate at a predefined baud rate. This protocol automatically
overrides any previously defined serial configuration for the serial port on the Adept controller and on the PC.

You are now ready to start AdeptWindows PC.

8 AdeptWindows User's Guide


What is AdeptWindows?

Working With Ethernet


You can set up a simple Ethernet communication link between one or more PCs and one or more Adept controllers
as shown below.

To test the Ethernet connection, it is useful to know how to "PING" between the PC and the controller. The PING
command sends a quick message between the two devices to verify that the Ethernet connection is working.

A Note on IP Addresses

The IP address is the logical means by which the higher−level Ethernet software identifies a specific node. The IP
address must be unique for each node within a LAN.

The Default IP Address

For Adept MV controllers, when an AWC board is installed in the Adept MV controller, V + version 13.0 (or later)
will automatically create a “default” IP address for the controller that is based on the AWC board’s serial number
(not the controller’s serial number). The default IP address will take the form:

172.16.1xx.1yy

where “xx” and “yy” are the right−most 4 decimal digits of the AWC board’s serial number as shown below.

Note: The AWC board serial number is located on a bar−code label attached to the backplane connectors at the rear
of the board.

The default IP address will be used whenever:

• the NVRAM has not been initialized

AdeptWindows User's Guide 9


What is AdeptWindows?

• the IP address in the NVRAM has been set to 0


• a hardware or software switch on the Adept controller forces use of the default IP address.

If you are using the default IP address for the Adept controller (either AWC−equipped MV controller, or Adept
SmartController), then you must use the following IP address and subnet mask for the PC:

IP address: 172.16.aa.bb

subnet mask: 255.255.0.0

where "aa" and "bb" in the IP address define a unique node address for each PC in the system. Adept recommends
using 1 for the first PC, 2 for the second PC, 3 for the third PC, etc. See Installing TCP/IP for details on setting the
IP address and subnet mask in Windows 95/NT.

Putting names and IP addresses of your controllers in your HOST file

To simplify the process of referencing controllers, the names of your controllers can be mapped to the controller IP
addresses. Use Windows Explorer to select WINNT => SYSTEM32 => DRIVERS => ETC => HOSTS. Then
you can use WordPad or NotePad to edit the file. (see the example below).

# Copyright (c) 1993−1999 Microsoft Corp.


#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server

38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

Required Interface Hardware

Each PC requires a user−supplied Ethernet interface card. These are available at most PC supply outlets.

10 AdeptWindows User's Guide


What is AdeptWindows?

A shielded cross−over Ethernet cable is provided with the AdeptWindows Software Kit (Adept PN 90963−00210).
This cable can be used in place of a network hub when one PC is connected to one Adept controller.

If more than one PC or Adept controller is being connected, you must use a user−supplied network hub and
user−supplied Ethernet cables. These are available at most PC supply outlets.

CAUTION: If the Adept−supplied crossover cable is used, it must be directly connected between the PC's Ethernet
card and the Adept controller. DO NOT mix the crossover cable with user−supplied hubs or cables.

The AWC board and Adept SmartController are equipped with an Ethernet interface connector. Therefore, no
additional hardware is required for the Adept controller.

Using PING to Test the Ethernet Setup

To test the Ethernet connection, it is useful to know how to “PING” between the PC and the controller. The PING
command sends a quick message between the two devices to verify that the Ethernet connection is working.

Pinging the Adept Controller

Pinging the PC

Pinging the Adept Controller

To test the communication from the PC to the Adept controller, you can execute the PING command at the PC’s
MS−DOS prompt. From the Windows taskbar, select:

Start => Programs => MS DOS Prompt

At the MS−DOS prompt, type the PING command followed by the IP address (or node name) for the Adept
controller. If you do not know the IP address of the controller, you will have to scan for it using AdeptWindows.

For example, to PING a controller with the IP address 172.16.113.170, type:

PING 172.16.113.170

If the PING is successful, a message similar to the following is displayed:

Pinging 172.16.113.170 with 32 bytes of data:

Reply from 172.16.113.170: bytes=32 time=39ms TTL=15

Reply from 172.16.113.170: bytes=32 time=39ms TTL=15

Reply from 172.16.113.170: bytes=32 time=39ms TTL=15

Pinging the PC

You can also use the PING command to test the communication from the Adept controller to your PC. At the
Monitor prompt, type the PING command followed by the IP address (or node name) for the PC:

PING 172.16.200.1

AdeptWindows User's Guide 11


What is AdeptWindows?

If the PING is successful, the following message is displayed:

.Success

Configuring Your System


There are many ways to configure your AdeptWindows system. You can setup a basic Ethernet installation between
one or more PCs (with only one PC configured as an NFS server), a hub or crossover cable, and one or more Adept
controllers.

The basic configurations are:

• One PC and controller using default IP address


• One PC and controller with user−assigned IP address

The basic configurations using Adept default settings and the NFS server component are:

• One PC, controller, and NFS server


• One PC, multiple controllers, and one NFS server
• Multiple PCs, multiple controllers, and one NFS server

There are also other network configurations that use more complex installations with multiple PCs, multiple
controllers, and multiple NFS servers, these include:

• Multiple PCs, controllers, and NFS servers


• Multiple PCs, controllers, NFS servers, and networks

Using the Controller Network Configuration Utility

The Controller Network Configuration Utility simplifies the process of bringing up a new Adept controller. With previous
versions of AdeptWindows, this process involved configuring a PC to a specific IP address that was accessible from
the Adept controller, running AdeptWindows PC to communicate with the Adept controller, running a V+
configuration utility to set the desired IP address (and subnet mask) for the Adept controller, and then finally
reconfiguring the PC to be able to communicate with the specified IP address.

The Controller Network Configuration Utility allows you to set the IP address (and subnet mask) of the Adept controller
regardless of the current IP address of the controller and of the PC. You can also use the tool to set other Adept
controller startup features such as use of AdeptWindows PC as the default system user interface, and enabling
auto−start (i.e., use of the disk file AUTO.V2). You can record the IP address of the PC so it will be accessed as the
default NFS server for the controller. Lastly, you can initiate a reboot of the Adept controller, so that the
configuration changes will take effect.

Note: The Controller Network Configuration Utility depends on UDP broadcasts for its functioning. Therefore, the Adept
controller and the PC running the configuration utility must exist on the same LAN segment, either through a Cat 5
shielded crossover cable (provided with the AdeptWindows product) or a simple network hub. Some network hubs,
most network switches and bridges, and all network routers prevent the transmission of UDP broadcasts.

To Run the Controller Network Configuration Utility:

Before performing the steps below, you must have your PC and Adept controller connected through a network
crossover cable or through a network hub. More...

12 AdeptWindows User's Guide


What is AdeptWindows?

1. Select Start => Programs => Adept => Controller Network Configuration Utility from the Windows
taskbar. The following window is displayed:

2. Click on Next. The Controller Network Configuration Utility prompts you to make sure the Adept
controller is turned off.
3. Turn off the Adept controller.
4. Click on Next. The Controller Network Configuration Utility prompts you to turn the Adept controller back on
and wait until it boots completely.
5. Turn the Adept controller on. Once the controller is detected, the following window is displayed.

AdeptWindows User's Guide 13


What is AdeptWindows?

6. Choose one of the following:

If you want to... Then...

Use the IP address shown Click on Update.

Change the IP address shown Enter the new IP address and subnet mask.

Click on Update.

Configuring One PC, Controller, and NFS Server

As shown in the figure below, there is one PC networked to one Adept controller. The controller is using the default
IP address assigned by V+. Additionally, the controller has mounted NFS drives exported by the PC node
ASERVER.

14 AdeptWindows User's Guide


What is AdeptWindows?

To create the network shown above, complete the following steps:

1. Connect the Adept controller and your PC to a network hub, or use a crossover cable in place of the hub
and its connecting cables.
2. Install the AdeptWindows software on the PC. More...
3. Install TCP/IP on the PC using the IP address and subnet mask. More...
4. Start the Adept controller and test the Ethernet connection. More...
5. If the Omni−NFS software was not installed on the PC during the installation of the AdeptWindows
software, install the Omni−NFS software on the PC. After installing the Omni−NFS software, verify that
the Omni−NFS server is running. More...
6. If required, install the AdeptWindows license on the controller. More...
7. Restart the Adept controller to automatically mount the default NFS directories exported by the PC.
8. Start AdeptWindows on the PC and connect to the controller. Since you are starting AdeptWindows for the
first time, you will have to enter the controller’s IP address. More...
9. Test the NFS mounted drives. More...

Configuring One PC, Multiple Controllers, and One NFS Server

In this example, there is one PC networked to multiple Adept controllers. Each controller is using the default IP
address assigned by V+ . Additionally, all the controllers have mounted the same NFS drives exported by the PC
node named ASERVER.

AdeptWindows User's Guide 15


What is AdeptWindows?

To create the network shown above, complete the following steps:

1. Connect the Adept controllers and your PC to a network hub.


2. Install the AdeptWindows software on the PC. More...
3. Install TCP/IP on the PC using the IP address and subnet mask. More...
4. Start the Adept controllers and test the Ethernet connections. More...
5. If the Omni−NFS software was not installed on the PC during the installation of the AdeptWindows
software, install the Omni−NFS software on the PC. After installing the Omni−NFS software, verify that
the Omni−NFS server is running. More...
6. Install an AdeptWindows license on each Adept controller. More...
7. Restart the Adept controllers to automatically mount the default NFS directories exported by the PC.
8. Start AdeptWindows on the PC and connect to the desired controller. Since you are starting AdeptWindows
for the first time, you will have to enter the available IP addresses. More...

Note: You can connect to multiple controllers from one PC by simply starting additional AdeptWindows sessions
and entering the appropriate IP addresses in the Ethernet connection dialog boxes.

9. Test the NFS mounted drives. More...

Configuring Multiple PCs, Multiple Controllers, and One NFS Server

In this example, there are multiple PCs networked to multiple Adept controllers. Each controller is using the default
IP address assigned by V+. Additionally, all the controllers have mounted the same NFS drives exported by the PC
node named ASERVER.

16 AdeptWindows User's Guide


What is AdeptWindows?

To create the network shown above, complete the following steps:

1. Connect the Adept controllers and your PCs to a network hub.


2. Install AdeptWindows software on each PC. More...
3. Install TCP/IP on each PC using the IP addresses and subnet mask shown above. More...
4. Start the Adept controller and test the Ethernet connection. More...
5. If the Omni−NFS software was not installed on the PC during the installation of the AdeptWindows
software, install the Omni−NFS software on the PC. After installing the Omni−NFS software, verify that
the Omni−NFS server is running. More...
6. Install an AdeptWindows license on each Adept controller. More...
7. Restart the Adept controllers to automatically mount the default NFS directories exported by the NFS
server PC.
8. Start AdeptWindows on each PC and connect to the desired controller. Since you are starting
AdeptWindows for the first time, you will have to enter the available IP addresses. More...

Note: You can connect to multiple controllers from one PC by simply starting additional AdeptWindows sessions
and entering the appropriate IP addresses in the Ethernet connection dialog boxes. However, only one PC can be
connected through Ethernet to each controller.

9. Test the NFS mounted drives. More...

Configuring Multiple PCs, Controllers, and NFS Servers

In this example, there are multiple PCs networked to multiple Adept controllers. Each controller is using the default
IP address assigned by V+. Additionally, Controller 1 has mounted two NFS drives exported by the PC node
ASERVER; Controller 2 has mounted two NFS drives exported by the PC node BSERVER.

AdeptWindows User's Guide 17


What is AdeptWindows?

To create the network shown above, complete the following steps:

1. Connect the Adept controllers and your PCs to a network hub.


2. Install AdeptWindows software on each PC. More...
3. Install TCP/IP on each PC using the IP address and subnet mask. More...
4. Start the Adept controllers and test the Ethernet connections. More...
5. If the Omni−NFS software was not installed on the PC during the installation of the AdeptWindows
software, install the Omni−NFS software on the PC. After installing the Omni−NFS software, verify that
the Omni−NFS server is running. More...
6. Install the AdeptWindows license on each controller. More...
7. Set the IP address of the Adept controller using the Controller Network Configuration Utility. More...
8. Modify the NETWORK section of the V+ System Configuration file for each controller. More...
9. Restart the Adept controllers to automatically mount the default NFS directories exported by the NFS
server PCs.
10. Start AdeptWindows on each PC and connect to the desired controller. Since you are starting
AdeptWindows for the first time, you will have to enter the available IP addresses. More...

Note: You can connect to multiple controllers from one PC by simply starting additional AdeptWindows sessions
and entering the appropriate IP addresses in the Ethernet connection dialog boxes. However, only one PC can be
connected through Ethernet to each controller.

10. Test the NFS mounted drives. More...

Configuring Multiple PCs, Controllers, NFS Servers, and Networks

In this example, there are multiple PCs networked to multiple Adept controllers. This network is attached to another
network by a hub/gateway. In this situation, all PC node names, IP addresses, and subnet masks are assigned by the
network administrator.

18 AdeptWindows User's Guide


What is AdeptWindows?

To create the network shown above, complete the following steps:

1. Connect the Adept controllers and PCs to one or more network hubs.
2. Install AdeptWindows software on the PCs. More...
3. Install TCP/IP on each PC using the IP addresses and subnet mask assigned by your system administrator.
More...
4. Start the Adept controllers and test the Ethernet connections. More...
5. If the Omni−NFS software was not installed on the PC during the installation of the AdeptWindows
software, install the Omni−NFS software on the PC. After installing the Omni−NFS software, verify that
the Omni−NFS server is running. More...
6. Install the AdeptWindows license on each controller. More...
7. Set the IP address of the Adept controller using the Controller Network Configuration Utility. More...
8. Using the CONFIG_C utility on each Adept controller, modify the NETWORK section of the V+ System
Configuration data for each controller. The node names, IP addresses, mount names, etc., must be assigned
by your system administrator. More...
9. Restart the Adept controllers to automatically mount the default NFS directories exported by the NFS
server PC(s).
10. Start AdeptWindows on each PC and connect to the desired controller. Since you are starting
AdeptWindows for the first time, you will have to enter the available IP addresses. More...

Note: You can connect to multiple controllers from one PC by simply starting additional AdeptWindows sessions
and entering the appropriate IP addresses in the Ethernet connection dialog boxes. However, only one PC can be
connected through Ethernet to each controller.

11. Test the NFS mounted drives. More...

Installing TCP/IP
TCP/IP is a networking protocol that is used to establish Ethernet communications between a PC and an Adept
controller. The setups for Microsoft Windows 95/98 and NT 4.0 are slightly different.

AdeptWindows User's Guide 19


What is AdeptWindows?

Installing TCP/IP on a PC Running Windows 95/98

To install the TCP/IP protocol on a PC running Windows 95:

1. Choose Start => Settings => Control Panel => Network from the START menu in Windows 95/98. The
following dialog box is displayed:

2. If TCP/IP is on the list of installed components, go to Step 3. If TCP/IP is not on the list of installed
components, choose Add to add a new protocol. The Select Network Component Type window is
displayed as shown below.

1. Select Protocol from the list of network components.

2. Choose Add to display the Network Protocol selection. The Select Network Protocol window is displayed
as shown below.

20 AdeptWindows User's Guide


What is AdeptWindows?

3. Select Microsoft from the Manufacturers list.


4. Select TCP/IP from the Network Protocols list.
5. Choose OK to save these selections and return to the Network dialog box.

3. From the Network dialog box, select TCP/IP.


4. Choose the Properties button to display the TCP/IP Properties dialog box shown below.

5. Choose the IP Address tab and type in the correct IP Address and Subnet Mask. If you are using the
default IP address (in NVRAM) for the Adept controller, then you must use the following IP address and
subnet mask for the PC:

AdeptWindows User's Guide 21


What is AdeptWindows?

IP Address: 172.16.2aa.bb

Subnet Mask: 255.255.0.0

where “aa” and "bb" in the IP address define a unique node address for each PC in the network. Adept recommends
using 1 for the first PC, 2 for the second PC, 3 for the third PC, etc. If you are not using the default IP address for the
Adept controller, see your network system administrator for the IP address and subnet mask to use.

6. Choose OK on the TCP/IP Properties dialog box and on the Network dialog box.
7. Reboot your PC.

Installing TCP/IP on a PC Running Windows 2000

To install the TCP/IP protocol on a PC running Windows 2000:

1. Choose Start => Settings => Control Panel from the Windows taskbar.
2. Select Network and Dial−up Connections from the Control Panel.
3. Choose one of the following:

If you want to... Then...


Use the Microsoft Networking Components Click on Add Network Components from the
Wizard column on the left in the Network and Dial−up
Connections window.

Goto Using the Wizard.


Setup the network components manually Select Local Area Connection from the
Network and Dial−up Connections window.

Goto Manually Setting up network components.

4. Select Internet Protocol [TCP/IP] from the Local Area Connection Properties window if it is not already
highlighted.

22 AdeptWindows User's Guide


What is AdeptWindows?

5. Click on Properties to assign an IP address. The Internet Protocol (TCP/IP) Properties window is
displayed as shown below.

6. Toggle Use the following IP address.


7. Enter the IP address, subnet mask, and default gateway information.
8. Click OK.
9. Reboot your PC.

AdeptWindows User's Guide 23


What is AdeptWindows?

Using the Wizard

After clicking on Add Network Components from the column on the left in the Network and Dial−up Connections
window, the Windows Optional Networking Components Wizard starts.

a. Check Networking Services from the Windows Optional Networking Components Wizard window as
shown below.

b. Click on Details. The Networking Services window is displayed as shown below.

c. Uncheck RIP Listener in the Subcomponents of Networking Services box.


d. Click on OK.
e. Click on Next from the Windows Optional Networking Components Wizard window. The Network and
Dial−up Connections window is displayed.
f. Select Local Area Connection. The Local Area Connection Status window is displayed.

24 AdeptWindows User's Guide


What is AdeptWindows?

g. Click on Properties. The Local Area Connection Properties window is displayed.


h. Goto Step 4 .

Manually Setting Up Network Components

After you have selected Local Area Connection from the Network and Dial−up Connections window, the Local
Area Connection Status window is displayed as shown below.

1. Click on Properties. The Local Area Connection Properties window is displayed as shown below.

2. Select Internet Protocol [TCP/IP] as the component you want associated with the connection.
3. Click on Install. The Select Network Component Type window is displayed as shown below.

AdeptWindows User's Guide 25


What is AdeptWindows?

4. Select Protocol as the type of network component you want to install.


5. Click on Add. The Select Network Protocol window is displayed as shown below.

6. Select Internet Protocol [TCP/IP] as the network protocol.


7. Click on OK. The Select Network Protocol window closes.
8. Goto Step 4.

Installing TCP/IP on a PC Running Windows NT

To install TCP/IP on your Windows NT 4.0 PC:

1. Choose Start => Settings => Control Panel => Network from the START menu in Windows NT 4.0.
The following dialog box is displayed:

26 AdeptWindows User's Guide


What is AdeptWindows?

2. If TCP/IP is on the list of installed components, go to Step 3. If TCP/IP is not on the list of installed
components, choose Add to add a new protocol. The Select Network Protocol dialog box is displayed as
shown below.

a. Select TPC/IP Protocol from the list of network components.


b. Choose OK to add the Network Protocol selection. The Bindings Storing status box is displayed
as shown below.

AdeptWindows User's Guide 27


What is AdeptWindows?

c. Choose OK from the Select Network Protocols dialog box to save these selections and return to
the Network dialog box.
3. Select Protocols from the Network dialog box.
4. Choose the Properties button to display the TCP/IP Properties dialog box shown below.

28 AdeptWindows User's Guide


What is AdeptWindows?

5. Choose the IP Address tab and type in the correct IP Address and Subnet Mask. If you are using the
default IP address (in NVRAM) for the Adept controller, then you must use the following IP address and
subnet mask for the PC:

IP Address: 172.16.2aa.bb

Subnet Mask: 255.255.0.0

where “aa” and "bb" in the IP address define a unique node address for each PC in the network. Adept recommends
using 1 for the first PC, 2 for the second PC, 3 for the third PC, etc. If you are not using the default IP address for the
Adept controller, see your network system administrator for the IP address and subnet mask to use.

6. Choose OK on the TCP/IP Properties dialog box and on the Network dialog box.
7. Reboot your PC.

Installing NFS
Network Files System (NFS) capability requires two parts: an NFS client and an NFS server. AdeptNet, included
with the AWC board or SmartController, provides the NFS client portion on the Adept controller side. To complete
the package, you must also install NFS server software on the PC.

Once both parts have been installed on their respective systems, the client system can “mount” additional
drives/directories exported by any “server”. After mounting the drives, the client can access files on these drives in
the same manner as any local drive. This allows the Adept controller to:

• Load or store files from/to the server.


• Create or delete files and directories on the server.
• Attach, read, and write files on the server under program control.

Your AdeptWindows software includes an NFS software package for the PC named “Omni−NFS”, manufactured by
XLink Technology, Inc.

Configuring the Omni−NFS Server

NOTE: The configuration of Omni−NFS server requires a different procedure on Windows NT/2000/XP systems
versus Windows 95/98 systems. Please see the following instructions for details.

After installing the Omni−NFS Server, you need to configure it to run on your PC. The Omni−NFS Server supports
multiple operating systems including Windows 95/98 and Windows NT/2000/XP. The steps required to complete
configuration are:

Step 1 Set sharing properties for the 3.5 inch floppy drive

Step 2 Specify configuration parameters for the Omni−NFS server

Step 3 for Windows 95/98 Users:

Specify start−up options for NFS Server

Step 3 for Windows NT/2000/XP Users:

AdeptWindows User's Guide 29


What is AdeptWindows?

Map group and user ids. Then, specify autostart settings for the NFS Server

Step 1

To set sharing properties for the 3.5 inch floppy drive (A:).

1. Double−click on the My Computer icon or select Start => Programs => Windows Explorer to access the
A drive.
2. Highlight the A drive.
3. Click the right mouse button and select Properties from the pop−up menu. The 3.5" Floppy (A:) Properties
window is displayed.
4. Click the NFS Sharing tab.
5. Select the Shared button.
6. Click the Exported to All Clients check box.
7. Select the Read/Write button in the Directory Access Rights section.
8. Click OK to close the 3.5 Floppy (A:) Properties window.

Step 2

To configure the NFS Server:

1. Select Start => Programs => Omni−NFS Server V4.1 => NFS Server to start the Omni−NFS Server
configuration utility program. The Omni−NFS Server Configuration window is displayed.

Note: The A drive is shown in the configuration window as exported to all clients.

2. Set sharing properties for the Adept folder located on the C drive.

1. Click the New button. The NFS Server Export window is displayed as shown below.

30 AdeptWindows User's Guide


What is AdeptWindows?

2. Select the C drive in the Drive field.


3. Double−click Adept in the Path selection box.
4. Double−click Disks in the Path selection box. Then, click Drive_C in the Path selection box.
5. Click the Exported to All Clients check box.
6. Select the Read/Write button in the Directory Access Rights section.
7. Click Ok to close the NFS Server Export window.

Click Yes when asked to restart the server. The NFS Server icon appears in the Windows taskbar
to indicate that the NFS Server is running. The new, exported path is displayed in the Omni−NFS
server window.

Step 3 depends on the operating system you are using. Choose either Windows 95/98 or Windows NT/2000/XP.

Step 3 Windows 95/98 Users Only

To set autostart options for the NFS Server.

1. Click on the NFS Server icon using the right mouse button.
2. Be sure the Run at Boot Time option is enabled (checked).
3. Click on the desktop to close the Omni−NFS Server menu. Then, click the Exit button in the Omni−NFS
Server window.

Installation is complete. You can now access the Omni−NFS Server from a V+ system.

Step 3 − Windows NT/2000/XP Users Only

To complete the NFS configuration for Windows NT/2000, you need to map group and user IDs and specify
autostart settings.

1. Click the Mapping button on the Omni−NFS Server Configuration window. The UID & GID Mapping
window is displayed as shown below

AdeptWindows User's Guide 31


What is AdeptWindows?

a. Click on the Group Name to GID mapping tab.


b. Select the local computer name from the Windows NT domain pull down list.
c. Highlight Administrators in the Windows NT Groups scroll list.
d. Set the Group ID to zero.
e. Click the Add button. You should see Administrators displayed in the group column of the
Mappings in Group File section.

b. Click on the User Name to UID tab at the top of the UID & GID Mapping window. The settings for
mapping a user name to a UID are displayed as shown below.

32 AdeptWindows User's Guide


What is AdeptWindows?

a. Highlight Administrator in the Windows NT Accounts scroll list.


b. Set the User ID to zero.
c. Click the Add button.

c. Click the Default Group button. The Default Group Mapping window is displayed as shown below.

AdeptWindows User's Guide 33


What is AdeptWindows?

a. Select Local Administrator. Administrators should appear in the unmarked box.


b. Click Administrators.
c. Click the Assign button.
d. Click the Close button to dismiss the Default Group Mapping window. You should see
administrators displayed in the Default Group column of the Mappings in Password File section.
d. Click OK to close the UID & GID Mapping window and finish mapping the user and group IDs.
e. Click Yes when asked to restart the server.
f. Verify the NFS server is running.
a. Choose Start => 'Settings => 'Control Panel to display the Control Panel window.
b. Double click on the Services icon. The Services window is displayed as shown below.

3. Scroll to and highlight the line for the Omni−NFS Server.


4. Click the Start button if it has not already started.
5. Double click the Omni−NFS Server entry if Automatic is not listed under the Startup column and
select Automatic as the service type.
6. Click the Close button to close the Services window.

Installation is complete. You can now access the Omni−NFS Server from a V+ system and mount an NFS drive.
More...

Mounting an NFS Drive from the Adept Controller

At startup, provided that the NFS server software is already running, the Adept controller performs the necessary
network initialization and mounting procedure to mount the external drive(s) defined by the MOUNT statement(s)
contained in the V+ configuration data. More...

If the NFS server does not respond, the mounts fail. A failure occurs, for example, if the server software is not
running or if the server is disconnected from the network. Use the NET monitor command after startup to determine
which mounts were successful. More...

You cannot initialize the network after the V+ system has completed its initialization. You can use the PING
monitor command to verify network connectivity. If a problem exists with the network connection, correct it and

34 AdeptWindows User's Guide


What is AdeptWindows?

restart the V+ system.

You can also mount additional NFS drives using the FSET monitor command or the FSET program instruction, or
add additional statements to the V+ configuration data (using CONFIG_C) to automatically mount the additional
drives. See the AdeptNet User's Guide for details.

Referring to Mounted Drives

The following syntax is used to fully specify any file in the V+ environment:

device>disk_unit:directory_path\filename

For example, the full specification of a file called MY_FILE.DAT, residing in the directory NEW_DATA on an
Adept controller’s local D drive, is:

DISK>D:\NEW_DATA\MY_FILE.DAT

With the NFS functionality, the device name NFS has been added to V+. If the same file is in a directory with the
same name but on a remote disk mount called DISK1, the full description is:

NFS>DISK1:\NEW_DATA\MY_FILE.DAT

In the case of the “default” NETWORK configuration statements, the mounted drives are designated “XC” and
“XA”. So, the specification for the same file (MY_FILE.DAT) on the XC mounted drive would look like:

NFS>XC:MY_FILE.DAT

You can use the CD monitor command to specify the default device, unit, and directory to access if those elements
are omitted from a file specification.

Testing the NFS Mounted Drives

The NET command can be used to display the status of any mounted drives. At the dot prompt, type

NET

The network status is displayed:

AdeptWindows User's Guide 35


What is AdeptWindows?

Once you have verified that the correct drives are mounted, you can list the files on any of the mounted drives by
typing:

fdir NFS>[MOUNT]:\

where [MOUNT] is the mount name assigned to the drive. For example, in Figure 2−39 the mount name XC is
assigned to the directory C:\ADEPT\DISKS\DISK_C. So, to display a list of the files in that directory, simply type:

dir NFS>XC:\

A directory listing similar to the following is displayed.

36 AdeptWindows User's Guide


What is AdeptWindows?

Setting the DIP Switches on the Controller


The factory default settings for hardware DIP switch SW1 are:

With the factory DIP switch setting, the system will read the configuration data from the NVRAM chip. This allows
you to set all the configuration options in software without changing the physical DIP switches. See the description
of the CONFIG_C program in the Instructions for Adept Utility Programs for details.

AdeptWindows User's Guide 37


What is AdeptWindows?

Note: When the hardware or software switches on the Adept controller are set to use the AdeptWindows interface,
the AdeptWindows option must be enabled (see Installing the AdeptWindows License). Otherwise, the connection
will succeed but the other installed license options on the Adept controller will not be available.

If you decide to use the hardware DIP switch settings, rather than the software switches in NVRAM, you must first
decide which interface you want to use—serial or Ethernet—and then use the appropriate DIP switch settings shown
in the Adept MV Controller User's Guide or SmartController User's Guide for details.

Changing Software Switches and Network Settings


You can use the Adept controller’s CONFIG_C utility to change software switch settings, the IP address stored in
NVRAM, and the names and paths for NFS mounted drives.

Loading and Running the CONFIG_C Utility

To access the CONFIG_C utility:

1. Change to the UTIL directory by typing:

CD UTIL

2. Load the CONFIG_C utility by typing:

LOAD CONFIG_C

3. Run the CONFIG_C utility by typing:

EXECUTE A.CONFIG_C

The following menu is displayed:

38 AdeptWindows User's Guide


What is AdeptWindows?

Changing the Software Switch Settings

The Adept controller is equipped with hardware and software switches. The software switches that are stored in an
NVRAM, can be viewed and changed using the CONFIG_C utility.

See the Instructions for Adept Utility Programs for details.

Changing the User−Defined IP Address in NVRAM

If you are connecting your Adept controller to an existing network, you will need to set the user−defined IP address
to match your existing network. In this situation, your network system administrator will need to specify the correct
IP address (and subnet mask) for the Adept controller.

The user−defined IP address is set to:

0.0.0.0

when the Adept controller is shipped from the Adept factory. That setting causes the default IP address to be used.
More...

The user−defined IP address can be viewed and changed using the CONFIG_C utility.

See the Instructions for Adept Utility Programs for details.

Changing the Names and Paths for NFS Mounted Drives

In certain situations, it may be necessary to change the node names, IP addresses, or paths for NFS
mounted drives. This information is stored in the NETWORK section of the V+ system
configuration data. It can be viewed and changed using the CONFIG_C utility.

AdeptWindows User's Guide 39


What is AdeptWindows?

Before editing the NETWORK section of the V+ system configuration data, you need the
following information:

♦ The IP address of each PC that contains the drives/directories you wish to mount
♦ The path/name of each directory you wish to mount
♦ A node “name” that you wish to assign to each PC
♦ A mount “name” that you wish to assign to each mounted drive.
For example, the following NETWORK configuration statements define two mounted drives: XC
and XA, and associate the PC node name ASERVER with the IP address 172.16.200.1:

.network

MOUNT 1="/MOUNT 'XC'/NODE 'ASERVER' /PATH


'C:/ADEPT/DISKS/DISK_c'"

MOUNT 2=" /MOUNT 'XA' /NODE 'ASERVER' /PATH 'A:/'"

MOUNT 3=" /NODE 'ASERVER' /ADDRESS 172 16 200 1"

For more information on viewing and editing the configuration data, see the Instructions for Adept
Utility Programs for details.

Installing DDE With AIM


The DDE driver software is part of the standard AIM version 3.1 or later Baseline module. However, it is not
automatically enabled.

To enable the AIM DDE server:

Setup => Initialization Data => double−click “baseini.db”

Seek => Index => double−click “DDE enable”

The DDE Enable record is displayed.

Select On to enable the DDE server (the default setting is Off).

40 AdeptWindows User's Guide


What is AdeptWindows?

Shut down the AIM system and then restart it. The DDE server is automatically enabled.

AdeptWindows User's Guide 41


What is AdeptWindows?

42 AdeptWindows User's Guide


Using AdeptWindows PC
The AdeptWindows PC user interface (AdeptWindows PC) allows direct communication between your PC and the
Adept controller. With AdeptWindows PC running on your PC, you can operate the Adept controller from your PC
using the same commands and keystrokes that you would use with the Adept keyboard and VGA monitor.

Note: If you are using the Ethernet option, it is possible to connect to multiple Adept controllers at the same time
(each connection requires a separate AdeptWindows PC session running on the PC). The maximum number of open
AdeptWindows PC sessions is limited only by the amount of memory (RAM) installed on your PC.

Starting AdeptWindows PC

Working With the AdeptWindows Interface

Disconnecting From the Adept Controller

Closing AdeptWindows PC

Starting AdeptWindows PC
To start AdeptWindows PC from the Windows toolbar, select:

Start => Programs => Adept => AdeptWindows PC

If this is the first time that AdeptWindows PC has been started on the system, the AdeptWindows PC introductory
screen is displayed followed by the Connection type dialog box. For other AdeptWindows PC startup options, click
here.

Select the connection type: either Ethernet or a COM port (for serial communication). Choose OK to save the
selection.

The system “remembers” your connection preference. It prompts you appropriately the next time you try to connect.

There are two ways to connect to a system:

• Connecting through Ethernet


• Connecting through serial port

Connecting Through Ethernet

Selecting Ethernet displays the following dialog box:

AdeptWindows User's Guide 43


Using AdeptWindows PC

In the IP field, type the IP address (or host name) for the Adept controller (if you do not know the IP address, see
Scanning Ethernet for Available IP Addresses). This should be the same address used when you PINGed the
controller during installation (see Using PING to Test the Ethernet Setup for details).

Scanning Ethernet for Available IP Addresses

If you do not know what IP addresses are available, you can select File => Scan Ethernet to display a list of the IP
addresses for Adept controllers on your network that support AdeptWindows PC. The following window is
displayed:

Simply select the desired IP address from the list and click Connect to connect to that system.

Connecting Through a Serial Port

NOTE: This item works only with Adept MV controllers that are equipped with an AWC board. It will not work
with the Adept SmartController.

Selecting COM Port displays the following dialog box:

44 AdeptWindows User's Guide


Using AdeptWindows PC

Use the scrolling COM Port list to select the COM port your PC uses to connect to the Adept controller.

The AdeptWindows PC Main Window


If autoboot is enabled and the controller is booted and waiting, the communication should happen immediately
(within a few seconds) after you choose OK . When communication begins, the V+ Monitor window is displayed as
shown below.

NOTE: If autoboot is not enabled and the Adept controller is on when you try to connect, the DDT window (black
window with yellow text) will be displayed when the connection is made. You will then see the “Load from local
disk...” prompt and DDT will wait for your input before proceeding. See Booting the Adept Controller Over
Ethernet for details.

You can reduce the window size by double−clicking on the AdeptWindows PC menu bar or clicking:

File => Normal Size

Once the Monitor window is opened, you can execute Monitor commands, use the SEE editor, start up AIM, etc.

If the AdeptFTP or AdeptNFS license is installed on your Adept controller and the appropriate software is installed
on your PC, then you can perform file transfers between the Adept controller and your PC. This allows you, for

AdeptWindows User's Guide 45


Using AdeptWindows PC

instance, to write and edit programs on the PC (for example, using the AdeptWindows Offline Editor) and then
transfer them to the Adept controller using AdeptFTP or AdeptNFS. See the Instructions for Adept Utility Programs
for details on the Adept FTP client/server utility. See the AdeptNet User's Guide for details on Adept NFS software.

NOTE: File transfers require either the AdeptFTP or AdeptNFS license and File Transfer Protocol (FTP) or
Network File System (NFS) software running on your PC. Windows contains an FTP program that can be accessed
by typing “FTP” (no quotes) at the MS−DOS prompt (or type “FTP ?” for a list of commands). NFS software is
included with the AdeptWindows software.

The AdeptWindows PC Menus


These menus are displayed whenever AdeptWindows PC is running.

• File
• Adept

The File Menu

The Adept Menu

Disconnecting From the Controller


In certain situations, you may want to disconnect from the current Adept controller and then connect to a different
Adept controller without closing AdeptWindows PC.

To disconnect from an Adept controller:

1. Choose File => Disconnect. The AdeptWindows PC dialog box is displayed as shown below.

46 AdeptWindows User's Guide


Using AdeptWindows PC

2. Choose Yes to disconnect. You can now reconnect to a different Adept controller by following the
procedure described in Connecting Through Ethernet or Connecting Through a Serial Port.

Closing AdeptWindows PC
To close AdeptWindows PC, choose:

1. Choose File => Exit. The AdeptWindows PC dialog box is displayed as shown below.

2. Choose Yes to exit.

NOTE: If you are still connected to the Adept controller, the message shown above is displayed.

The Windows desktop is displayed.

AdeptWindows User's Guide 47


Using AdeptWindows PC

48 AdeptWindows User's Guide


Using the AdeptWindows TFTP Server
The AdeptWindows TFTP Server is automatically started whenever AdeptWindows PC is started. It runs in the
background and reacts only when the Adept controller requests data. The TFTP Server also includes a diagnostic
capability for displaying messages when booting the Adept controller over Ethernet.

What do you want to do?

Start the AdeptWindows TFTP Server

Become Familiar With the TFTP Menus

Boot the Adept Controller Over Ethernet

Understand TFTP Server Diagnostics

Close the AdeptWindows TFTP Server

Starting the AdeptWindows TFTP Server


AdeptWindows TFTP Server starts automatically whenever the AdeptWindows PC program is started. See Starting
AdeptWindows PC for details.

Or, to manually start AdeptWindows TFTP Server from the Windows Program Manager:

Start => Programs => Adept => AdeptWindows TFTP Server

The program displays the following window:

Once the TFTP Server is initialized, the window is minimized on the Windows Taskbar. To view the TFTP Server
window, simply double−click the Adept TFTP Server task on the Taskbar.

The AdeptWindows TFTP Server Menus


The following menus are displayed whenever the TFTP server is running:

• File
• Help

AdeptWindows User's Guide 49


Using the AdeptWindows TFTP Server

The File Menu

The Help Menu

Booting the Adept Controller Over Ethernet


The TFTP Server is used to boot the Adept controller (either an MV controller equipped with an AWC board, or an
Adept SmartController) over Ethernet.

NOTE: All screen messages shown in this section are displayed in the DDT window (black window with yellow
text).

To boot the Adept controller over Ethernet:

1. Set the hardware DIP or software switches on the Adept controller so that auto boot is disabled. See for
details on setting the hardware DIP switches. See the Instructions for Adept Utility Programs for details on
setting the NVRAM software switches using the CONFIG_C utility.
2. Start the PC.
3. Start AdeptWindows PC and check that the TFTP Server window is displayed (it will appear as a
minimized task on the Windows Taskbar). See Starting the AdeptWindows TFTP Server for details.

If you are using the Adept VGB/monitor/keyboard interface in place of AdeptWindows PC, you can
manually start the TFTP Server without starting AdeptWindows.
4. Start the Adept controller. See the Adept MV Controller User's Guide for details. After the controller
completes the self tests, the following prompt is displayed:

Load from local disk (B or D) or network disk (X) [default is D]?

If an SIO board is present, the list of local disks is A, B, C, or D, and the default disk is A.
5. Type "X" to choose the network disk and press the ENTER key. The following prompt is displayed:

Enter IP address of server (e.g., 172.16.200.1):


6. Type the IP address of the PC and press the ENTER key. If you do not know the IP address of your PC,
you should contact your network administrator. The following prompt is displayed:

Enter directory path (e.g., "A:\" or


"C:\Adept\Disks\Disk_C\"):
7. Type the directory path containing the V+ version 13.0 or later system files and then press the ENTER key.
The directory path must be in the format that is native to the machine that is running TFTP. That is, for
PCs, backslashes are used to separate directory names.

50 AdeptWindows User's Guide


Using the AdeptWindows TFTP Server

NOTE: A separator (slash or backslash) must be included at the end of the path if a directory is specified.

The boot process continues and the following messages are displayed:

Reading C:\Adept\Disks\Disk_C\ADEPTSYS.ADM

Reading C:\Adept\Disks\Disk_C\ADEPTSYS.CFG

Reading C:\Adept\Disks\Disk_C\ADEPTSYS.SYS

You can abort the Ethernet boot process by pressing the ENTER key one time. The system returns to the "Load from
local disk..." prompt.

Understanding TFTP Server Diagnostics


The AdeptWindows TFTP Server window contains a diagnostics capability for displaying messages while booting
the Adept controller over Ethernet.

Enabling Diagnostic Messages

To enable diagnostics:

File => Settings

The program displays the Settings window:

After the Settings window appears, select the Display diagnostics checkbox. Close the Settings window by choosing
OK .

Once the diagnostics are enabled, the AdeptWindows program will display all connect messages when booting over
Ethernet such as the IP address of the node that is requesting files, the names of files being sent, and error messages.

AdeptWindows User's Guide 51


Using the AdeptWindows TFTP Server

Clearing the Messages

When the AdeptWindows TFTP Server diagnostics are enabled, the diagnostic messages will continue to
accumulate in the server window until they are manually cleared or until the server window is closed. To manually
clear the messages:

File => Clear display

All messages are cleared from the AdeptWindows TFTP Server window.

Closing the AdeptWindows TFTP Server


AdeptWindows TFTP Server does not close automatically whenever the AdeptWindows PC program is closed.
Therefore, it must be closed manually.

To close AdeptWindows TFTP Server, from the TFTP Server menu bar select:

File => Exit

The AdeptWindows TFTP Server window closes.

52 AdeptWindows User's Guide


Using AdeptWindows DDE
Dynamic Data Exchange (DDE) is a protocol defined by Microsoft for data exchange between different tasks
running under Windows. AdeptWindows DDE allows a PC application to access data on an Adept controller that is
running AIM 3.1 or later.

Note: AdeptWindows DDE works only with an Ethernet TCP/IP link between the PC and Adept controller.

AdeptWindows DDE consists of two major parts:

• PC An application that runs on your PC and acts as a DDE Server to DDE client programs on the same PC.
This application forwards messages to the Adept controller using a TCP/IP link over Ethernet.
• V+ A driver task that runs on the Adept controller under AIM 3.1 or later. This task receives messages
from the DDE Server and accesses V+ and AIM variables to provide data items as requested.

The DDE driver runs in task 9 on the Adept controller. Therefore, the V+ Extensions license on the Adept
controller is required in order to exchange DDE variables with your PC.

Starting AdeptWindows DDE


This section describes how to start the AdeptWindows DDE Server from the Windows Program Manager. You can
start AdeptWindows in two ways:

• From the Windows Program Manager


• From the MS−DOS Prompt

Starting AdeptWindows From the Windows Program Manager

To start the AdeptWindows DDE Server from the Windows Program Manager, choose:

Start => Programs => Adept => AdeptWindows DDE

Or, from the AdeptWindows PC menu bar:

File => Start AdeptDDE

The program displays the following taskbar icon:

To display the Adept DDE Server window, double−click the DDE Server icon on the Windows taskbar. The
following window is displayed:

AdeptWindows User's Guide 53


Using AdeptWindows DDE

The Adept DDE window has three buttons:

• Display displays a list of active hosts, the number of variables for each host, and the current value of each
variable. See Getting DDE Status Information for details.
• Terminate stops the DDE Server and closes the program.
• Ok minimizes the Adept DDE Server window as an icon on the Windows taskbar (see AdeptWindows
DDE Taskbar Icon ).

From the MS−DOS Prompt

To start AdeptWindows DDE Server from the MS−DOS prompt, use the following command:

<path>adept

where <path> is the full path name to the directory where the file ADEPT.EXE is located, and adept executes the
program file ADEPT.EXE.

Note: Since the DDE Server now uses the Windows system hosts, you no longer specify the node name when
starting DDE Server from the MS−DOS propt.

For example, if the file ADEPT.EXE is located in the subdirectory C:\ADEPT\ADEPTWINDOWS\PROGRAMS,


you must type:

c:\adept\adeptwindows\program\adept

Command line execution can be used to manually start the server by typing the commands at the MS−DOS prompt,
or these commands can be embedded in your AUTOEXEC.BAT or WIN.INI file to automatically start the server
each time your PC is booted.

Defining, Modifying, or Deleting a V+ Host


The AdeptWindows DDE Server uses a V+ host address to define the routing of information to a certain Adept
controller on a local area network (LAN). A Windows TCP/IP system host name is used to represent the IP address
of a specific Adept controller. (You must define a unique host name for each Adept controller that is connected to
the LAN.) In your DDE applications you use only the host name to specify the Adept controller you would like to
exchange data with.

54 AdeptWindows User's Guide


Using AdeptWindows DDE

Once a host is defined, the DDE Server automatically senses if a host is requesting information and then sends it to
the defined address. The connection to and disconnection from the host is handled automatically through the
software.

The Windows HOSTS file is used to define, modify, or delete a V+ host. You can edit the Windows HOSTS file
using Notepad, Wordpad, or any other text editor that can output an ASCII text file.

To define, modify, or delete a host:

1. Start Notepad, Wordpad, or your favorite text editing program.


2. Open the Windows HOSTS file. On Windows 95/98 systems, there is a HOSTS template file (named
HOSTS.SAM) located in the directory:

C:\WINDOWS\HOSTS.SAM

Note: After you are done editing HOSTS.SAM, you must save it as HOSTS (without the .SAM extension) so that
Windows 95 will recognize the defined host names.

On Windows NT systems, the Windows HOSTS file is located in the directory:

C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS

Note: If the Windows HOSTS file does not exist, you must create it.

3. Define, modify, or delete hosts in the Windows HOSTS file. An example file is shown below.

Enter the IP address followed by the corresponding host name and an optional comment (all comments
must start with the # character). You must enter the IP address in decimal format (e.g., 172.16.144.1).

4. Save the edited file into the same directory from which it was opened. The file must be saved as HOSTS
(without any extension) so that Windows will recognize the host names defined in the file.

AdeptWindows User's Guide 55


Using AdeptWindows DDE

Running the DDE Driver on the Adept Controller


The DDE driver on the Adept controller is part of the DDE module included in the AIM Baseline package. It is
enabled using the Initialization Data setup menu in AIM. See the MotionWare User's Guide for details.

Once it is enabled, the DDE driver loads automatically when AIM is started. It executes as a separate program task
in V+ task 9 and uses negligible CPU time until it is accessed by the AdeptWindows DDE Server through the
network.

Caution: The V+ Extensions license must be installed on the Adept controller in order to run AIM and the DDE
driver.

Specifying DDE Item Names


The DDE data format is a triplet: an application name, a topic name, and an item name. For the AdeptWindows
DDE Server, the application name is “Adept”; the topic name is mapped to an Adept controller name that is defined
by the “Hosts” pull−down in the AdeptWindows DDE File menu. See Defining, Modifying, or Deleting a V+ Host
for details.

The item name identifies a V+ system item or an AIM variable. It consists of a number of names or numbers
delimited by “\” (backslash without quotes) characters. Currently, all item names must begin with one of the
following:

• sys\ Specifies a V+ system data item.


• aim\ Specifies an AIM variable database item.

For example, the item name “sys\controller_serial_number” returns the serial number of the Adept controller.

The system names are defined in the DDE initialization database, DDEINI.DB, which you may modify as desired.
The system names refer to V+ expressions with optional arguments. You can use up to three different arguments in
each expression. The values of the three optional fields following the argument name are substituted into the V+
expression in place of dummy parameters “#1”, “#2”, and “#3”.

For example, the item name “sys\switch\robot\1” is defined as the V+ expression:

switch(#1[#2])

In this example, “robot” is the first argument, and “1” is the second argument.

AIM variables are specified as: “aim\module\variable” where “module” is the name of a loaded (but not necessarily
selected) resource module, and “variable” is the name of a Variable database record in that module. If “module” is
omitted (as in “aim\\variable”), the global Variable database is accessed.

Using Hot and Cold Links


A DDE client can ask for a data item to be accessed once and its value returned. This access is called a "cold link".
Alternatively, the client can ask that a data item value be sent every time it changes. This access is called a "hot
link". To implement hot links, the V+ DDE driver polls the values of hot link items periodically.

In the current implementation, all "sys\" items may have their polling time set in the BASEINI.DB record. All

56 AdeptWindows User's Guide


Using AdeptWindows DDE

"aim\" items in the Variable database allow you to set the polling time and control read−write access for all AIM
variables. To minimize system overhead, static data items (such as "controller_serial_number") should have the
polling time set to zero (do not poll).

Note: Even if the polling interval is set to zero, AIM variable values are always sent to the client whenever they are
changed by an AIM SET or SETS statement or by an AIM menu page. Therefore, to improve efficiency, always use
a polling interval of zero for AIM variables unless they are being changed by some other method.

Database record fields that are linked to an AIM variable are not automatically polled when the field value changes.

Getting DDE Status Information


AdeptWindows DDE provides a convenient way of monitoring the status of your DDE connections and links. This
can be useful if you are gathering information from multiple hosts (controllers) and have multiple links established
with each V+ host.

To obtain DDE status information:

Double click the DDE Server icon => Display

A status window is displayed:

The window lists the names of all connected hosts and the number of variables for each host. Once the window is
opened, the information is dynamically updated as connections and links are established or terminated. This feature
is helpful for status information during operation of a DDE connection and for debugging a new DDE application.

To obtain details about a specific host, click the corresponding Expand button. The following window is displayed:

AdeptWindows User's Guide 57


Using AdeptWindows DDE

Like the DDE Status Window, once the Host Information window is opened, the information is dynamically updated
as connections and links are established or terminated.

Customizing DDE Variable Records in AIM


All DDE records are stored in the DDE initialization database (DDEINI.DB). Once the DDE driver is enabled, the
DDE initialization database automatically appears on the list of available databases on the Select Initialization
Database page:

Caution: The DDE initialization records control the interaction between the Adept DDE driver and other DDE
applications. Therefore, it is recommended that you have a good understanding of DDE, AIM customizing, and your
application before attempting to create or modify DDE initialization records.

You can customize DDE variable records by:

Modifying DDE records in AIM

Creating new DDE records in AIM

58 AdeptWindows User's Guide


Using AdeptWindows DDE

Defining the V+ expression associated with the DDE record

Creating variable records

Modifying DDE Records in AIM

To modify the records in the DDE initialization database:

Setup => Initialization Data => double−click "ddeini.db"

Select => Index => double−click record name

Once the record is opened, you can change the values on the record page. AIM automatically saves the changes
when closing the record page.

Creating New DDE Records in AIM

You can now create records that outline specific V + functions and/or V + variables that you want to write to the
AdeptWindows DDE Server task on the PC. There are nine predefined DDE records included in AIM. The function
of each record is fully described in the record's Description field. You can copy and edit one of the existing records
or create a new record from scratch. (The steps below use the copy and edit method.)

To create a new DDE record:

Special => Edit Init Data => double−click "ddeini.db"

Edit => Copy

Edit => Paste

The following record page is displayed:

AdeptWindows User's Guide 59


Using AdeptWindows DDE

To edit the fields on the new record page, select the desired field and enter the information. See the section titled
"Customizing Initialization Databases" in the AIM Customizer's Reference Guide for details. The following
information must be entered:

1. Enter the name in item 1 that will be used by the DDE client to refer to this record. The name must contain
only alphanumeric characters and underscores.
2. Verify the information in item 2. The Page Name field must contain "DDE_SYS". The File Name field
must contain "ini.mnu".
3. Enter a description for the record page in item 3.
4. Verify that the Command Line field (item 4) contains the information shown in the diagram above.
5. Set the #A field in item 5 to zero or blank. All other fields in this group should be blank.
6. Set all fields in item 6 to blank.

After the record is created, you must also create a definition as shown in the following section.

Note: Once the record is saved, you can edit the values on the record. See Modifying DDE Records in AIM for
details.

60 AdeptWindows User's Guide


Using AdeptWindows DDE

Defining the V+ Expression Associated With the DDE Record

Once the DDE record is created you must define the V+ expression that will be associated with that record.

To define the V+ expression:

Setup => Initialization Data => double−click "ddeini.db"

Seek => Index => double−click the record name created in the previous section

The following window is displayed:

1. Enter the name in item 1 that will be used by the DDE client to refer to this record. The name must contain
only alphanumeric characters and underscores.

Note: This name is not used by the expressions defined in items 3 or 4.


2. Check the description contained in item 2 (you may change it if needed). This text comes from the
description entered in the ddeini.db window, item 3.
3. Enter a V+ string or real−valued expression in item 3 that evaluates to the data associated with reading the
DDE item. If the expression begins with a double quote ( " ) or a dollar sign ($), the expression is assumed
to be a string value. Otherwise, it is assumed to be a real value.

When this expression is evaluated, any arguments of the form #1, #2, or #3 are replaced by additional "\"
arguments found in the request from the DDE client.
4. The field in item 4 is optional. If blank, this DDE item cannot be written. If nonblank, it must be a V+
global variable name of the same type as the expression in item 3. This variable occurs on the left side of an
equal (=) sign in an assignment operation. Array variables are permitted and may contain #1−type
arguments.

When this expression is evaluated, any arguments of the form #1, #2, or #3 are replaced by additional "\"
arguments found in the request from the DDE client.
5. Set the optional polling time by entering a value in the Polling time field (item 5). For example, if you

AdeptWindows User's Guide 61


Using AdeptWindows DDE

enter 5, the information is updated every five seconds.

Creating Variable Records

You also can create variables in the Variables database in AIM 3.1 or later that can be accessed (read/write) through
the DDE link. These variables may be of any type available to the Variables database records. See the section titled
"Variable Database" in the MotionWare User's Guide for details on creating Variable records.

Once a Variables database record is created, you can control DDE access to the record using the DDE Access
options:

• Select Read to set up the Variable record for read access from a PC application using DDE.
• Select Write to set up the Variable record for write access from a PC application using DDE.

The Write check box is available only when the Read check box is selected.
• Set the polling time for the variable by entering a value in the Polling time field. For example, if you enter
5, the information is updated every five seconds.

A polling time of zero means that the information is updated only when it changes (see the note in See Hot
and Cold Links). This is useful for items that never change, such as constants, ID numbers, number of
robots, etc.

Simple DDE Examples


This section contains several DDE examples that you can experiment with on your system to see how DDE operates.
For further examples, refer to the documentation for your specific programming application (e.g., Microsoft Visual
Basic).

Reading Data Using Microsoft Excel

Microsoft Excel provides a good example of using DDE to read static and dynamic data.

The following examples assume that you have defined the V+ host as "User1". If not, simply substitute your host
name where "User1" appears.

Important Delimiters for the Definition of DDE Links

The "|" and "!" characters are delimiters for the application name, topic name, and item name. "User1" represents a
V+ host name that you defined in the AdeptWindows DDE Server. See Links\xd2 ying DDE Item Names" on page *
for details on the item name format.

Example of a Static DDE System Variable

62 AdeptWindows User's Guide


Using AdeptWindows DDE

Start Microsoft Excel.

Select any empty cell and type:

=Adept|User1!sys\controller_serial_number

Press the Enter key. The cell displays the serial number of the Adept controller.

Example of a Dynamic DDE System Variable

Start Microsoft Excel

Select any empty cell and type:

=Adept|User1!sys\time_since_boot

Press the Enter key. The cell displays the time that has elapsed since the controller was booted.
Continue watching the screen to see the time update automatically.

Example DDE Link to an AIM Variable

Here is an example of a link to an AIM variable named status in an AIM resource module named assembly_cell. The
V+ host name for the Adept controller that is running AIM is mtr_cell.

=Adept|mtr_cell!aim\assembly_cell\status

AdeptWindows User's Guide 63


Using AdeptWindows DDE

64 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor
AdeptWindows Offline Editor allows you to write and edit V+ programs on your PC. The editor is a comprehensive
program development package that runs under Windows. It is assumed that you are familiar with the Microsoft
Windows environment and basic V+ programming.

You do not have to be connected to the Adept controller to use the AdeptWindows Offline Editor.

The software provides:

• Automatic syntax checking


Syntax errors are trapped and a "?" (question mark without quotes) is inserted at the beginning of the line
containing the error.
• Automatic keyword expansion
For example, "ena po" automatically expands to ENABLE POWER.
• Toolbars with icons that provide shortcuts for common operations
These toolbars contain icons for program editing (cut, copy, paste, etc.), inserting looping/branching
structures (FOR, CASE, IF, WHILE, DO), and inserting motion program instructions (MOVE, APPRO,
DEPART, etc.).
• Automatic dynamic indentation for control constructs
• Customized header templates
A default header template is supplied that can be automatically inserted after a .PROGRAM declaration.
The header template can be customized for your application.
• Menus for CALL Tree listings and Keyword listings
• Color−coded variable names and instructions
All variable names and instructions are color−coded to remind you of their use.
• Separate editing windows
Multiple files may be opened in separate windows, allowing you to cut and paste information between
them.
• Global Find and Replace
These commands can be applied to entire files or to just one program.
• Retrieve, Goto, Cut, Paste, etc.
These commands allow you to share information and navigate between programs.
• Project management tools
This set of tools allows you to maintain V+ files on the PC.
• Online help system
The online help system displays proper keyword syntax and provides online viewing of the keyword
description/details from the appropriate reference guide.

Restrictions
• Although indentation is performed, V+ control structures are not validated
• GOTO labels are not validated
• Some V+ and MicroV+ commands are not currently supported

What do you want to do?

Start the Offline Editor

Use the Toolbars

AdeptWindows User's Guide 65


Using the AdeptWindows Offline Editor

Become Familiar With the Offline Editor Menus

Get Online Help

Get Around

Create and Edit a Program

Work With Projects

List and Rename Program Files

Customize the Programming Environment

Create CALL Tree and Keyword Listings

Printing and Documentation

Starting the Offline Editor


To start the AdeptWindows Offline Editor:

Start => Programs => Adept => AdeptWindows Offline Editor

The editor window expands to the maximum size of the PC monitor screen. You can adjust the size of the window
using the icons located at the upper right−hand corner of the window.

Using the Toolbars


All of the features of the editor can be accessed using the main menu bar or by clicking on a toolbar icon for the
desired feature. See the Offline Editor Menus for details on the pull−down menus.

66 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

Editing Toolbar Icons

The Editing Toolbar icons provide a shortcut for common program editing operations (cut, copy, paste, etc.)

Create a new program file

Open an existing program file

Save the current program file to disk

Cut the selected lines of code to the clipboard

Copy the selected lines of code to the clipboard

Paste the cut/copied lines of code from the clipboard

Access the online help system

Loop/Branch Toolbar Icons

The Loop/Branch Toolbar icons provide a shortcut for inserting looping and branching structures into your
programs.

Inserts an IF structure into the program on the line below the cursor position

Inserts a CASE structure into the program on the line below the cursor position

Inserts a FOR structure into the program on the line below the cursor position

Inserts a WHILE structure into the program on the line below the cursor position

Inserts a DO structure into the program on the line below the cursor position

Motion Toolbar Icons

The Motion Toolbar icons provide a shortcut for inserting motion program instructions into your program.

AdeptWindows User's Guide 67


Using the AdeptWindows Offline Editor

The Offline Editor Menus


The AdeptWindows Offline Editor has the following menus.

• File
• Edit
• Search
• Project
• Insert
• Tools
• Window
• Help

The File Menu

68 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

The Edit Menu

The Search Menu

The Project Menu

The Insert Menu

AdeptWindows User's Guide 69


Using the AdeptWindows Offline Editor

The Tools Menu

The Window Menu

The Help Menu

Getting Online Help


The AdeptWindows Offline Editor features an online help system. The help system provides quick access to proper
keyword syntax, detailed keyword descriptions, and online versions of the V+ Language Reference Guide and the
AdeptWindows User's Guide (the help system you are in currently).

70 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

The online help system should address most of your AdeptWindows usage and V+ programming questions.
However, if you require further assistance, Adept provides an applications questions hotline along with several other
services for applications and software support. See How Can I Get Help? for details.

Keyword Syntax Help

The AdeptWindows Offline Editor provides immediate access to proper keyword syntax. To display the syntax of
any V+ keyword:

1. Place the cursor on the keyword in question in your program.


2. Press the right mouse button. The following menu is displayed:

3. Choose Show abbreviated syntax . The correct syntax for the keyword is displayed.
4. Choose OK to close the syntax display.

Details on Keywords

The AdeptWindows Offline Editor provides immediate access to details on V+ keywords.

Note: This feature requires that Adobe Acrobat Reader is installed on the system and that Adept's Manuals on CD
ROM is available in the CD−ROM drive or copied onto the system's hard drive.

To display reference information on any V+ keyword:

1. Place the cursor on the keyword in question in your program.


2. Press the right mouse button.
3. Choose Display reference guide. The page from the appropriate reference guide that describes the
keyword is displayed in an Acrobat Reader window.
4. Choose from the Acrobat Reader toolbar to return to the Offline Editor window.

Reference Guide Information

You can access the online version of the V+ Language Reference Guide at any time by pressing the F1 key. The V+
Language Reference Guide is displayed in an Acrobat Reader window.

Note: This feature requires that Adobe Acrobat Reader is installed on the system and that Adept's Manuals on
CD−ROM is available in the CD−ROM drive or copied onto the system's hard drive.

Choose from the Acrobat Reader toolbar to return to the Offline Editor window.

Getting Around
When a program file is opened, the first program in the file is displayed. There are several options for moving from
one program in the file to another.

Find and Replace

Goto Program and Previous Program

AdeptWindows User's Guide 71


Using the AdeptWindows Offline Editor

Program Pick Lists

Navigate

Find and Replace

The Find option allows you to quickly locate a specified text string. To use the Find option:

Search => Find...

The following dialog box is displayed

• Use the Find What field to specify the text to search for. You can match the specified case by selecting
Match Case.
• Choose Find Prev. to individually find each occurrence of the specified text.
• Choose Find Next to individually find each occurrence of the specified text.
• Choose Cancel to clear all entries and close the dialog box.

The Replace option allows you to quickly locate a specified text string and then replace it with a different
(specified) text string. To use the Replace option:

Search => Replace...

The following dialog box is displayed:

• Use the Find What field to specify the text to search for. You can match the specified case by selecting
Match Case.
• Use the Replace With field to specify the new (replacement) text.
• Choose Find Next followed by Replace. Then Find to individually find and replace each occurrence of the
specified text.
• Choose Replace All to find and replace every occurrence of the specified text.
• Choose Done to close the dialog box.

72 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

Goto Program and Previous Program

When the cursor is on a line with a CALL instruction, choose the Goto Prgm option (or press Ctrl+G) to open a
new window and display the called program. If the cursor is not on a line with a CALL instruction, the editor
displays a dialog box that asks you for the program name. The following restrictions apply:

• The called program must be in the open project’s file list.


• The called program must be open.

After using the Goto Prgm option, you can use the Prev. Prgm option (or press Ctrl+P) to display the previous
program.

Note: The editor window displays only the previously viewed programs that are contained in the current file. It
cannot switch from the current file window back to the previously displayed file window.

Program Pick Lists

Choose the List All Pgms option (or press Ctrl+A) to display an alphabetical pick list of all the programs in the file.
Double−click one of the programs on the pick list to open that program for editing.

Choose the List Bad Pgms option (or press Ctrl+B) to display a pick list of the programs that have syntax errors.
Once a program is opened (by double−clicking on the program name) use the Next Error menu option (or press
Ctrl+E) to locate each error.

Navigate

It is often useful to see the call/caller relationship among different programs in a program file. This is particularly
true in a large file containing many programs, or when you are trying to understand a V+ application written by
someone else.

Choose

Tools => Navigate to create an interactive CALL tree.

This option provides an interactive display of the CALL hierarchy of programs in a file. Navigate works only for
program files that are open. The CALL relationship is displayed with file icons next to the program names. These
icons can be interpreted as follows:

AdeptWindows User's Guide 73


Using the AdeptWindows Offline Editor

• An open file icon indicates that the branch of the call tree has been expanded.
• A closed file icon indicates that this program is the end of a branch (it calls no other programs).
• A closed file icon with a “+” indicates that this branch is not fully expanded and the program contains calls
to other programs that are not displayed.
• A closed file icon with an “x” indicates that this program is not in the current file.

To expand all branches of the CALL tree, choose

Tools => Expand All.

To open a program for editing, double−click the program name.

To view the original Navigate call tree:

Window => click on the Call tree name

Note: Do not use the Navigate option to return to the original call tree. This option creates a call tree for the current
program. It does not take you back to the original call tree.

Creating and Editing a Program


The following sections describe how to use the AdeptWindows Offline Editor to create and edit a V+ program.

Creating a New File/V+ Program

Opening an Existing V+ Program File

Adding a New Program to an Existing Program File

The Editor Window

Working With Program Variables

Creating a New File/V+ Program

To create a new program file, choose the file icon or:

File => New File...

The following dialog box is displayed:

• Enter the new program name in the New Program Name field. (The disk file and the program use this
name.) The program name must conform to V+ file name restrictions.

74 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

• Select Add Program Header to insert a program header.


• Choose OK to save all entries and close the dialog box, or choose Cancel to clear all entries and close the
dialog box.

Opening an Existing V+ Program File

To open an existing program file, choose the open folder icon or:

File => Open File...

The following dialog box is displayed:

Use the Look in field to locate the drive/directory where the file is stored.

Double−click the desired file name. You also can enter the desired file name in the File name: field.

Use the Files of type field to control the file type(s) displayed in window.

Choose Open to display the file. Choose Cancel to clear all entries and close the dialog box.

Adding a New Program to an Existing Program File

To add a new program to an existing program file:

Edit => New Pgm...

The New file/program name dialog box is displayed.

The Editor Window

The editor window is displayed after you create a new program file or open an existing program file:

AdeptWindows User's Guide 75


Using the AdeptWindows Offline Editor

At this point, you can begin typing V+ code just as you would if you were using the SEE editor on the Adept
controller. See the V+ Language User's Guide for information on using the SEE editor. See the V+ Language User's
Guide for information on V+ commands.

The AdeptWindows Offline Editor has several “automated” features to assist you:

• It checks the program instructions for the proper syntax as they are entered. If you type an unknown
command or use a command incorrectly, the line is flagged with a question mark (?).
• It formats each line with the proper indentation for all logic loops (FOR, WHILE, etc.).
• It color codes variable names, instructions, and comments for easy identification. You can select the color
used for each item (see page 124 for details).

You can use the Loop/Branch and Motion toolbars to access icons that automatically insert For, While, Do, etc.,
structures and motion program instructions into your programs.

76 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

Additionally, the Edit menu and Editing toolbar include a list of options, such as Undo, Cut, Copy, Paste, etc., that
simplify program editing.

Working With Program Variables

The AdeptWindows Offline Editor includes several useful tools for working with program variables.

Displaying Variable Properties

To display the properties of any variable in your V+ program:

1. Place the cursor on the variable.


2. Press the right mouse button. The following menu is displayed:

3. Choose Display variable properties. The variable’s properties are displayed in a window.
4. Choose &#9;OK to close the window.

Replacing a Variable

The AdeptWindows Offline Editor allows you to easily replace a variable with another variable in the current
program or in the module. To replace any variable in your V+ program:

1. Place the cursor on the variable.


2. Press the right mouse button. The following menu is displayed:

3. Choose Replace with another variable from current program or Replace with another variable from
current module. A listing of available program or module variables is displayed.
4. Choose the new variable from the variable list.
5. Choose OK to close the list and insert the new variable into the program.

Working With Projects


A project is a tool to manage the V+ files that you create and store on the PC. This tool creates a list of the files you
want to keep together as a “project”. When you build your project into the source files for transfer to the Adept
controller, the project file is used to locate all of the different files. In addition to V+ source code, you can also
attach documentation files (such as Microsoft Word, text files, or other file types), spreadsheet files, project
management files, and AIM database files (archived on the PC’s hard drive) to a project.

When you build a project, the AdeptWindows Offline Editor locates the source files and transfers them from the
source directories to the target directories.

Creating a New Project

Opening an Existing Project

AdeptWindows User's Guide 77


Using the AdeptWindows Offline Editor

Getting Information on the Current Project

Modifying Project Files

Modifying Project File Attributes

Building a Project

Creating a New Project

To create a new project, choose:

File => New Project...

The following dialog box is displayed:

• Enter the directory and path where the project will be stored. You can type the information or choose
Browse to scroll through a list of available drives/directories.
• Enter the project name. The name must conform to filename specifications defined in Windows 95 and
Windows NT 4.0. The file name can contain up to 255 characters (including spaces) except for the
following:

/ : * ? " < > |


• Enter the project description. This description appears when you access the Project Information dialog box.
• Enter the project version. For example, if you are creating version 3.1 of your project, Major = 3, Minor =
1.
• Enter the V+ version. (This enables the correct syntax checking for the V+ programs.) You can type the
information or choose Browse to scroll through a list of available versions.

Note: V+ versions 8.4 and 10.5 apply to all releases of version 8.x and version 10.x, respectively.
• Choose OK to save all entries and close the dialog box, or choose Cancel to clear all entries and close the
dialog box.

At this point, you must create the V+ program files for the project and place these files on the project file list.

78 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

Opening an Existing Project

To open an existing project:

File => Open Project... => double−click project name

The Project Information dialog box is displayed.

Getting Information on the Current Project

To get information about the current (open) project:

Project => Project Info...

The following dialog box is displayed:

The Project Information dialog box displays information about the project (name, description, date created, date
modified, etc.). You also have the option to edit the following items:

• You can edit the project description directly in the Description field.
• You can edit the Major and Minor Project Version numbers.
• You can change the V+ version by typing the new version number or by choosing Browse to scroll through
a list of available versions.
• After you have finished viewing/editing the dialog box, choose Done to close the dialog box.

Modifying Project Files

The Project Files dialog box is used to modify the files within the current (loaded) project. To display the Project
Files dialog box:

Project => Files...

The following dialog box is displayed:

AdeptWindows User's Guide 79


Using the AdeptWindows Offline Editor

The window contains a list of the files in the current project.

• Choose OK to save all changes and close the dialog box.


• Choose Cancel to close the dialog box prior to making any changes.
• Choose Add to add more files to the current project.
• Choose Add All to add all files in the working directory to the current project.
• Choose Remove to remove the selected file from the current project.
• The file name is removed from the project file list. The file is not deleted from the hard disk.
• Choose Edit to edit the selected file.
• Choose Properties to display the File Attributes dialog box for the selected file.

Modifying Project File Attributes

The File Attributes dialog box allows you to change the attributes (Source/Destination File Type and Target
Directory) for the file selected on the Project File dialog box. To display the File Attributes dialog box:

Project => Files... => select a file name => Properties

The following dialog box is displayed:

80 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

• The File Name field displays the name of the selected file.
• The Read Only option is not enabled in this release.
• Use the Source File Type group to set the file type for the source file.
• V+ Source Code: a V+ file that can be edited with the AdeptWindows Offline Editor.
• Data File: any source file on the PC.
• Documentation: a text file created by a text editing program.
• Project File: a file with a .PRO extension. This file is used as a directory to other files in the project.
• Select Squeezed if you want all comments and blank lines removed from the destination file. The .SQU
extension is automatically added to the destination file name.

Note: The Destination File Name is enabled only for V+ Source Code files.
• Enter the destination directory and file name. This is the location that the file is copied to when you build
the project. You can type the information or choose Browse to scroll through a list of available directories.
• Choose OK to save all entries and close the dialog box. Choose Cancel to clear all entries and close the
dialog box.

Building a Project

Once your project is completed (you have created a project and written all of the V+ programs for the project), you
are ready to “build” the project. The Build menu option, located on the Project menu, copies all of the V+ program
files for the project to the specified target directories.

The target directory can be a floppy disk (for transfer to the Adept controller, creation of a utility disk, etc.) or any
directory on the hard disk drive of your PC. If the Ethernet NFS option is installed on your PC and on the Adept
controller, you can directly access the hard disk drive on the controller and use any directory on that drive as a
“target” directory. See the AdeptNet User's Guide for details on installing the NFS option.

If you select the Squeezed option (on the File Attributes dialog box), all header information, comments, and blank
lines are removed from the specified file(s) as they are being copied to the target directories.

Listing and Renaming Program Files


The Program List dialog box provides a pop−up list of all the V+ programs contained in a file. It provides an easy
way to navigate between all of the programs. It also provides an option for renaming a program.

AdeptWindows User's Guide 81


Using the AdeptWindows Offline Editor

To display the Program List dialog box:

Search => List All Pgms...

The following dialog box is displayed:

Program List Dialog Box

• Choose Select to display the selected program in the editor window.


• Choose Delete to delete the selected program from the file.

The program name is removed from the list and the program is deleted from the file.
• Choose New to create a new program in the file.
• Choose Rename to rename the selected program.
• Choose Copy to make a copy of the selected program and insert it in the current file.
• Choose Done to close the Program List dialog box.

Customizing the Programming Environment


The AdeptWindows Offline Editor has two areas that you can customize:

Program Header Template

Highlighting Colors

The Standard Program Header

The AdeptWindows Offline Editor can insert a standard header template at the top of every program. This is an
option that is selected on the New File/Program Name dialog box.

The editor includes a dialog box that allows you to customize the header template information. This is useful for
adding header information that is used in every program (this eliminates retyping it each time). For example, you
could have a standard template that includes your company name and address; your name as the program author;
and categories for typing program−specific information (abstract, input/output parameters, side effects, etc.).

To customize the program header:

Edit => Properties => Define Pgm. Header...

82 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

The following dialog box is displayed:

The template has six predefined categories: ABSTRACT, INPUT PARAM, OUTPUT PARAM, SIDE EFFECTS,
DATA STRUCT, and MISC. You can edit the template as follows:

• The scroll window displays the program header template.


• To add a new line, select an existing line and choose Add. The new line is inserted below the selected line.
• To edit an existing line, double−click the line or select the line and choose Edit. The selected line is
displayed in the edit dialog box.
• To delete a line, select the line and choose Delete. The selected line is removed from the template.
• Choose Save to save the changes and close the dialog box.
• Choose Cancel to clear all changes and close the dialog box.

Customizing the Highlighting Colors

The AdeptWindows Offline Editor allows you to customize the colors used to identify variables, comments, and
other parts of a program.

To edit the color scheme:

Edit => Properties => Set Color

The following dialog box is displayed:

AdeptWindows User's Guide 83


Using the AdeptWindows Offline Editor

• Select the category that you want to change in the scroll window.
• Foreground Color sets the color of the text.
• Background Color sets the color of the area behind the text.

Note: Always use different (contrasting) colors for the foreground and background. Otherwise, the
corresponding text line(s) will not be legible.
• Choose Change to save the new settings.
• Choose Cancel to clear the new settings and close the dialog box. This must be done instead of selecting
Change.

Displaying or Hiding the Toolbars

The AdeptWindows Offline Editor allows you to display or hide the toolbars in the Offline Editor window.

To display or hide a toolbar:

Tools => Editing Toolbar

or

Tools => Loop/Branch Toolbar

or

Tools => Motion Toolbar

Each of these menu items works like a toggle switch—each time you select it, the display mode changes. A check
mark next to the menu item indicates that the toolbar is displayed.

Creating CALL Tree and Keyword Listings


You can create calling tree listings for your V+ program files using the AdeptWindows Offline Editor. This is useful
for debugging the code and for documentation purposes.

84 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

CALL Tree Listing

To create a call tree listing, load a program file and then:

Tools => CallTrees...

The following window is displayed:

The window displays a text file with the call tree listing. The file is displayed using Windows Notepad. It can be
viewed, edited, and saved with Notepad or any text editor.

Keyword Listing

The keyword listing menu item searches the program file for all occurrences of a keyword and outputs this to a text
file.

To create a keyword listing:

Tools => Listings...

The following dialog box is displayed:

AdeptWindows User's Guide 85


Using the AdeptWindows Offline Editor

• Enter the Input File to process. This automatically defaults to the path and file name of the file currently
being edited. However, you can enter the path and file name of any program file.
• Enter the Output File name (this is the text file that contains the search results). The default file name is
LISTING.OUT.
• Check the Program Attributes box to insert the input file header information at the beginning of the
listing.
• Check Keyword Listing box to search for a specific keyword. Enter the keyword(s) in the corresponding
field. If you wish to search for multiple keywords, enter all keywords separated by a comma.
• Choose OK to save all entries and close the dialog box. Choose Cancel to clear all entries and close the
dialog box. If you choose OK, a window displays the search results:

The window displays a text file with the keyword listing. The file is displayed using Windows Notepad. It can be
viewed, edited, and saved with Notepad or any text editor.

86 AdeptWindows User's Guide


Using the AdeptWindows Offline Editor

Printing and Documentation


To make creation of program documentation easier, the AdeptWindows Offline Editor allows you to print programs
and CALL trees. Print and Print Preview options are found on the File menu. See the Windows online help system
for more information on using these options.

Note: The Print and Print Preview options use the standard Windows printer interface.

AdeptWindows User's Guide 87


Using the AdeptWindows Offline Editor

88 AdeptWindows User's Guide


Using Existing V+ Routines
This section describes the changes required when upgrading existing V+ version 12.x or later routines for use with
AdeptWindows and V+ version 14.x.

The BUFFERED keyword

The EVENT_CONNECT keyword

The ID keyword

The MENU keyword

MENU events

Window Size

Example V+ Program

The BUFFERED Keyword


FOPEN(lun) "Iconname/ICON/BUFFERED"

The /BUFFERED keyword may appear in the FOPEN instruction when used for creating new icons. It causes the
subsequent WRITEs to the icon to be buffered to 512−byte blocks. The syntax for WRITE remains unchanged.

The EVENT_CONNECT Keyword


FSET(lun) "/EVENT CONNECT"

The new /EVENT CONNECT keyword enables connect and disconnect event notification.

The event values are:

20 −− Connected to the PC front end

21 −− Disconnected from the PC front end

The ID Keyword
ID(11,1)

In V+ version 14.x, the above code returns a bit mask value. The first bit and the last bit apply to AdeptWindows
applications.

AdeptWindows User's Guide 89


Using Existing V+ Routines

For example, if the above command returns a value of ^H1B on a system that is running AdeptWindows, this hex
value translates to the binary value:

The MENU Keyword


FSET(lun) "Filename/MENU ..."

In V+ version 14.x and later, the /MENU keyword may appear only in the FSET instruction. (In version 11.x, the
/MENU keyword was also allowed in the FOPEN instruction.)

Menu Events
Menu events may arrive at any time (if they are enabled) rather than just when the user clicks on the menu bar.
These apparently random events always have menu ID (event[1]) equal to zero. For example, when you enter the
following command:

FSET /MENU 'xxx' 'yyy' 'zzz'

Three events will be received

<event[1] = 0, event[2] = 1;

followed by:

event[1] = 0, event[2] = 2>;

followed by:

<event[1] = 0, event[2] = 3>).

These events are intended to elicit the FSET /PULLDOWN instructions from V+ to set the contents of all possible
pulldown menus.

Window Size
In V+ version 11.x, the minimum window size (for windows containing a title bar) is 64 x 64. (This means that
windows with a dimension of less than 64 x 64 are automatically increased to 64 x 64.)

In V+ version 12.x or later, the minimum window size is 8 x 8 (this is the same as the minimum size for windows
without title bars).

90 AdeptWindows User's Guide


Using Existing V+ Routines

If your program specifies a window dimension less than 64 x 64, the window displayed in V+ version 14.x will be
smaller than it was in V+ version 11.x.

Example V+ Program
The following V+ program illustrates the correct use of the items discussed in this appendix.

.PROGRAM example()

; ABSTRACT: The following example program shows how to use an event loop
; to make selections in a menu program.
;
; INPUT PARM: None
;
; OUTPUT PARM: None
;
; SIDE EFFECTS: None
;
;* Copyright (c) 1997 by Adept Technology Inc.
;−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

AUTO glun, $name

; Attach a graphics Logical Unit (LUN).

ATTACH (glun, 4) "GRAPHICS"

; Open the window "example" with a maximum size of 400x300 pixels.

$name = "example" ;Name of the window


FOPEN (glun) $name, "/MAXSIZE 400 300"

; Check to see if system is running AdeptWindows or is using the VGB.


; If the system is using AdeptWindows, write the Adept icon to the
; window.

IF (ID(11,1) BAND BMASK(5)) AND (ID(11,1) BAND BMASK(1)) THEN


GICON (glun) 365, 1, "system_adept"
END

; Set the top−level menu bar and enable monitoring of events.

FSET (glun) "/menu 'File 1' 'Edit 2' 'Menu 3'"


FSET (glun) "/event button menu connect"

; Define the strings for the pull−down menus.

$menu[1] = "'Item 1−1' 'Item 1−2'"


$menu[2] = "'Item 2−1' 'Item 2−2' 'Item 2−3'"
$menu[3] = "'Quit'"

; Set variables for events to be monitored.

wn.e.menu = 14
wn.e.connect = 20
wn.e.disconnect = 21

AdeptWindows User's Guide 91


Using Existing V+ Routines
; Start the processing loop.

quit = FALSE
DO
GETEVENT (glun) event[]
CASE event[0] OF
VALUE wn.e.menu: ;Menu selection

; The menu event (14) has two components: a button−down


; component corresponding to a click on a menu−bar
; selection, and a button−up component corresponding to
; the pull−down selection made when the button is released.
;
; For the first component (pointer down on the menu bar),
; event[1] will be 0 and event[2] will have the number of
; the menu bar selection.

IF event[1] == 0 THEN

; Top−level menu selected. Use the value in event[2]


; to specify the pull−down menu to define.

FSET (glun) "/pulldown", event[2], $menu[event[2]]

ELSE

; If event[1] is not 0, the button has been released


; on a menu item.
;
; event[1] will have the value of the top−level
; selection (menu)
;
; event[2] will have the value of the pull−down
; selection (item)
;
; Execute the appropriate code for each menu
; selection.

menu = event[1]
item = event[2]

; The outer CASE structure checks which top−level


; menu has been selected. The inner CASE structures
; check which item has been selected in the menu.

CASE menu OF
VALUE 1: ;Menu 1
CASE item OF
VALUE 1: ;Selection 1
TYPE "Code for Item 1−1"

VALUE 2: ;Selection 2
TYPE "Code for Item 1−2"

END

VALUE 2: ;Menu 2
CASE item OF
VALUE 1: ;Selection 1
TYPE "Code for Item 2−1"

92 AdeptWindows User's Guide


Using Existing V+ Routines
VALUE 2: ;Selection 2
TYPE "Code for Item 2−2"

VALUE 3: ;Selection 3
TYPE "Code for Item 2−3"

END

VALUE 3: ;Menu 3
CASE item OF
VALUE 1:
quit = TRUE ;Request to quit
END
END ;CASE menu OF
END ;IF event[1]

VALUE wn.e.connect: ;Redraw

; Perform any operations related to reconnect


; (e.g., redraw user−defined icons).

VALUE wn.e.disconnect: ;Disconnect

; Perform any operations related to disconnect.

END ;Case event[0]


UNTIL quit

; When the window is no longer needed, delete it and detach from the
; logical unit.

FCLOSE (glun) ;Release the window


FDELETE (glun) $name ;Delete the window
DETACH (glun) ;Detach the LUN

RETURN
.END

AdeptWindows User's Guide 93


Using Existing V+ Routines

94 AdeptWindows User's Guide


Troubleshooting
Use this section to help you resolve problems that you may encounter when using AdeptWindows.

DDE Errors

Energy Star Compliant Systems

Ethernet TCP/IP

PC or Adept Controller Problems

TIFF Image Export

V+ License

DDE Errors
You may receive DDE errors in the following situations:

• Connecting to a host
• Using DDE in Microsoft Excel

Connecting to Host

When connecting to a host, the connection is typically made within several seconds. If the Connect to Host dialog
box and hourglass symbol continue to remain on the screen, check the following:

1. The host must be correctly defined. You can display the host information by double−clicking the host name
in the Connect to Host dialog box. See Defining, Modifying, or Deleting a V+ Host for details.
2. AIM must be running on the Adept controller. See Specifying DDE Item Names for details.
3. The AIM DDE Enabled option must be initialized. If it is not, you must turn it on and then restart AIM. See
Installing DDE With AIM for details.

Using Microsoft Excel

• If the AdeptWindows DDE server is not running, Microsoft Excel reports:

Remote data not accessible, start application "Adept.exe"?

Choose No and start up the AdeptWindows DDE server. If the AdeptWindows DDE server is running,
check that the host name is correct in the Excel formula and that the named host is connected (see Defining,
Modifying, or Deleting a V+ Host).
• If the cell shows "#NAME?", it means the AdeptWindows DDE server does not support the item (variable)
name. Check the spelling of the item name. Once Excel has established a connection with the
AdeptWindows DDE server, and cells have been defined with links to the server, you can check all the
linked connections by selecting the Links option from the Excel Edit menu.

AdeptWindows User's Guide 95


Troubleshooting

Energy Star Compliant Systems


On some computers that use "Energy Star" compliant motherboards, any network connections may be disrupted
when the BIOS power−save function activates. If your system exhibits this problem, you can correct it by disabling
the power−save feature in the BIOS.

See your PC user's guide or installation manual for details.

Ethernet Communications
Connecting to an Adept Controller Through TCP/IP

The Adept controller and the PC must use the same IP network address and subnet mask to enable communications
through TCP/IP. Note, in the table below, that the network section of the IP address must match exactly (the node
number [marked with "x" below] consists of any legal values and must be different for each node on your network),
and the entire subnet mask must match exactly.

PC Adept Controller
IP address 172.16.xxx.xxx 172.16.xxx.xxx
Subnet Mask 255.255.0.0 255.255.0.0

• Check the IP network address and subnet mask setting for the PC using the Network option located on the
Windows Control Panel. See the Windows online help for details.
• Check the IP address and subnet mask setting for the Adept controller using the CONFIG_C utility. See the
topic Changing Software Switches and Network Settings for details.

NetManage's TCP/IP

It is recommended that you not run NetManage's TCP/IP in conjunction with Microsoft's TCP/IP. Doing so can
cause a one−second delay when displaying characters in the monitor window that are typed on the keyboard.

To correct this problem, disable the NetManage TCP/IP connection. See the Windows online help system for
details.

Other Ethernet Problems

• Ethernet Cable: Check that the Ethernet cable is a crossover (not straight−through) type (for direct
connection between PC and controller; no hubs). Are you using a shielded Ethernet cable? The crossover,
shielded Ethernet cable supplied with the AdeptWindows Software Kit is for direct connections (no
network hub).
• Ethernet Communications: Do the PC and controller have common network numbers? Do they have
identical subnet masks? Did you restart Windows after setting the IP address and subnet mask on your
PC?

If communicating with the controller using the default IP address, check that your PC IP address is on the
network number “172.16.xxx.xxx” and that the subnet mask is “255.255.0.0”.
• PING Command: The “ping” command can be used in the PC MS−DOS Prompt window to check the
Ethernet connection with the controller. For details, see the topic Using PING to Test the Ethernet Setup.

96 AdeptWindows User's Guide


Troubleshooting

For more information about troubleshooting your Ethernet connection, please see “Troubleshooting Ethernet
Problems” in Knowledge Express on Adept’s web site at:
http://www1.adept.com/main/ke/data/Procedures/EtherTrouble/EtherTroubleTOC.html

For more information about IP addresses, please see “Understanding IP Addresses” in Knowledge Express on
Adept’s web site at: http://www1.adept.com/main/ke/data/Procedures/EtherTrouble/ethernet_trouble_IP.html

PC or Adept Controller Problems


PC or Windows Program Problems

When any of your Windows programs cause your PC to lock up or crash while AdeptWindows PC is running, you
may lose the AdeptWindows PC connection. This section describes how to reestablish your AdeptWindows PC
connection.

If you see the error message "V+ not responding":

1. Disconnect from AdeptWindows PC. More...


2. Connect to AdeptWindows PC. More...

If your Windows operating system is locked up:

1. Reboot your PC.


2. Start AdeptWindows PC. More...

In most cases, this reestablishes the connection. However, if you receive a timeout error (10060), simply reconnect
AdeptWindows PC.

Adept Controller Problems

If the Adept controller locks up or crashes while AdeptWindows PC is running, you can reestablish the connection
as follows:

1. Exit AdeptWindows PC. More...


2. Reboot the Adept controller.
3. Start AdeptWindows PC. More...

If the controller crashes repeatedly, report the problem to customer service. More...

TIFF Image Export


TIFF image export is supported only for Vision images when running AdeptWindows PC.

To export any other window, you can use any PC−based screen capture program (such as HiJaak by Quarterdeck
Corporation). Once the window is captured, it can be saved to a file on the PC.

You can also use the Windows screen copy command to capture the screen contents.

AdeptWindows User's Guide 97


Troubleshooting

1. Press ALT + PRINT SCREEN to copy the active window to the Windows clipboard.
2. Press PRINT SCREEN to copy the entire screen to the Windows clipboard.

The clipboard contents can be pasted into a program or saved to a file. See the Windows online help for details.

V+ License
When upgrading a system from V+ version 11 to V+ version 14 (version 12.2C or higher is required for
AdeptWindows), the V+ Version 14 license must be installed on the controller. Otherwise, all other licenses (such as
V+ Extensions, etc.) are deactivated until the V+ Version 14 license is installed (and the V+ system is rebooted from
disk).

98 AdeptWindows User's Guide

You might also like