<PAGE>   1


                                                                     EXHIBIT 4.0



AS OF JUNE 8, 2001 (THE "REPLACEMENT DATE"), THIS MODIFICATION AGREEMENT AND
AMENDMENT TO LOAN DOCUMENTS SUPERSEDES AND REPLACES IN ITS ENTIRETY THAT CERTAIN
MODIFICATION AGREEMENT AND AMENDMENT TO LOAN DOCUMENTS EXECUTED BY BORROWER AND
BANK ON JULY 19, 2000 (THE "FORMER MODIFICATION"). THE FORMER MODIFICATION SHALL
BE OF NO FORCE OR EFFECT AS OF THE REPLACEMENT DATE.


                           MODIFICATION AGREEMENT AND
                           AMENDMENT TO LOAN DOCUMENTS

     THIS MODIFICATION AGREEMENT AND AMENDMENT TO LOAN DOCUMENTS is being
entered into as of the 8th day of June, 2001 by and between COMPASS BANK, a
state banking corporation ("Bank") and OPTIMATION, INC., an Alabama corporation
("Borrower").

                                    PREAMBLE

         On July 9, 1999, Bank and Borrower executed that certain Revolving
Credit and Security Agreement (the "Agreement"), Revolving Credit Commercial
Note in the principal amount of SIX HUNDRED FIFTY THOUSAND AND 00/100 DOLLARS
($650,000.00) (the "Note"), and other Loan Documents, providing for a line of
credit in the maximum aggregate amount of SIX HUNDRED FIFTY THOUSAND AND NO/100
DOLLARS ($650,000.00) (the "Revolving Line"). The Borrower has requested and the
Bank has agreed to, among other things, (i) decrease the aggregate principal
amount available under the Revolving Line to SIX HUNDRED TWENTY THOUSAND AND
NO/100 DOLLARS ($620,000.00), (ii) extend the due date to November 1, 2001, and
(iii) modify certain covenants.

         Accordingly, the Bank and Borrower have agreed that the Revolving Line
shall be modified and that the documents and instruments evidencing, securing,
relating to, guaranteeing, or executed or delivered in connection with the
Revolving Line (collectively the "Loan Documents") shall be amended as set forth
below.

                                    AGREEMENT

         NOW, THEREFORE, in consideration of the premises, the mutual agreements
of the parties as set forth herein, and for other good and valuable
consideration, the receipt and sufficiency of which are hereby acknowledged, and
to induce the Bank to modify the Revolving Line, the parties, intending to be
legally bound hereby, agree as follows:

         1. AMENDMENT OF LOAN AGREEMENT. The Loan Agreement shall be and the
same hereby is amended as follows:

         (A)      The first paragraph of Page 1 shall be deleted in its entirety
                  and in place thereof shall be substituted:

                  "This Revolving Credit and Security Agreement (the
                  "Agreement") is executed and delivered this 9th day of July,
                  1999 by and between OPTIMATION, INC., an Alabama corporation
                  ("Borrower"), with its chief executive office and its
                  principal place of business at 2800 Bob Wallace Avenue, Suite
                  L-3, Huntsville, Alabama 35805, and COMPASS BANK, an Alabama
                  banking corporation ("Bank"), with its principal offices at
                  114 Governors Drive, Huntsville, Alabama 35801. Borrower has
                  applied to Bank for a revolving line of credit not to exceed
                  an aggregate principal amount at any one time outstanding the
                  sum of Six Hundred Twenty Thousand and No/100 Dollars
                  ($620,000.00) to be evidenced by a Revolving Credit Commercial
                  Note (the "Note") in such amount, and to be secured by a
                  security interest in all of the Collateral (as defined herein)
                  now owned or hereafter acquired by Borrower on the terms
                  hereinafter set forth."

         (B)      Section 1.10 shall be deleted in its entirety and in place
                  thereof shall be substituted:

                  ""Loan Documents" shall mean and include the Note, this
                  Agreement and any other agreement, document or instrument now
                  or hereafter evidencing, securing, guaranteeing (including,
                  without limitation, Continuing Limited Guaranty executed in
                  connection herewith by Dennis and Sheila Sierk (up to
                  $166,250.00) and Continuing Unlimited



                                    Page 16
<PAGE>   2

                  Guaranty executed in connection herewith by Nematron
                  Corporation (such individuals and entities are jointly and
                  severally included within the term "guarantor" as the same is
                  used in this Agreement)) or relating to the Revolving Line or
                  any other Liability, obligation or indebtedness of Borrower to
                  Bank, as the same may be amended."

         (C)      Section 3.1 shall be deleted in its entirety and in place
                  thereof shall be substituted:

                  "From the date hereof until November 1, 2001, or such future
                  date to which the expiration date of the Revolving Line may be
                  extended, subject to the terms and conditions of this
                  Agreement and Borrower's and all guarantor's performance of
                  and compliance with each of the Loan Documents, and so long as
                  no event of default hereunder or under any of the other Loan
                  Documents shall have occurred or be continuing, Bank agrees to
                  extend to Borrower an open-end credit line on the basis of the
                  following advance formula (such advance formula being
                  hereinafter referred to as the "Borrowing Base"): eighty
                  percent (80%) of the value of Borrower's Eligible Accounts
                  Receivable, not to exceed $620,000.00 at any one time
                  outstanding, plus fifty percent (50%) of the value of
                  Borrower's Eligible Inventory, not to exceed $350,000.00 at
                  any one time, and provided that in no event shall the
                  aggregate sum of all advances made by Bank to Borrower at any
                  one time outstanding hereunder exceed the sum of $620,000.00.
                  Within such limits and subject to the terms of this Agreement,
                  Borrower may borrow, repay without penalty or premium, and
                  re-borrow hereunder, from the date of this Agreement until the
                  Maturity Date. It is expressly understood and agreed that Bank
                  shall have no obligation to make an advance under the
                  Revolving Line if the amount of such advance together with the
                  amount outstanding under the Revolving Line exceeds or would
                  exceed the lesser of (i) $620,000.00 or (ii) the Borrowing
                  Base."

         (D)      Section 3.3 is hereby amended by deleting the amount
                  "$650,000.00" and substituting in place thereof the amount
                  "$620,000.00".

         (E)      Section 7.1 (iii) shall be deleted in its entirety and in
                  place thereof shall be substituted: "annual personal financial
                  statements of Dennis and Sheila Sierk and quarterly internally
                  prepared financial statements from Nematron Corporation".

         (F)      Section 7.4 shall be deleted in its entirety and in place
                  thereof shall be substituted:

                  "Borrower shall maintain a minimum Tangible Net Worth of not
                  less than $850,000."

         (G)      Section 14 is hereby amended by deleting the date "June 1,
                  2000" and substituting in place thereof "November 1, 2001".

         2. EFFECT ON LOAN DOCUMENTS. Each of the Loan Documents shall be deemed
amended as set forth herein to the extent necessary to carry out the intent of
this Agreement; provided, however, all terms, conditions, representations,
warranties and agreements contained in each of the Loan Documents not amended by
this Agreement shall remain in full force and effect and are hereby reaffirmed.

     IN WITNESS WHEREOF, the parties have caused this Agreement to be fully
executed as of the date first set forth above.

                                    BORROWER:
Attest:                             OPTIMATION, INC.

By:  /s/ David P. Gienapp           By:  /s/ Dennis A. Sierk
     --------------------                -------------------
Its: Secretary                      Its: President

                                    BANK:
Witness:                            COMPASS BANK

/s/ Margaret Henshaw                By:  /s/ Arlene Stackhouse
    ----------------                     ---------------------
                                    Its: Senior Vice President


                                    Page 17