EXHIBIT 4.0
                                                                  -----------
                            Variable Rate Term Note
                            -----------------------
     BORROWER'S NAME AND ADDRESS:
         NEMATRON CORPORATION
         5840 INTERFACE DRIVE
         ANN ARBOR, MI  48103
     LENDER'S NAME AND ADDRESS:
         CHELSEA STATE BANK
         1010 SOUTH MAIN STREET
         CHELSEA, MI  48118
     CODES             22-RO-MLP (3)
     Loan Number:            777664
     Date:               09-30-2002
     Maturity Date:      09-30-2005
     Loan Amount:     $2,700,000.00

"You" means the lender, its successors and assigns. For value received, I
promise to pay you, or your order, at your address listed above the PRINCIPAL
sum of TWO MILLION SEVEN HUNDRED THOUSAND AND NO/100 Dollars $2,700,000.00.

Single  Advance:  I will receive all of this  principal  sum on  09-30-2002.  No
additional advances are contemplated under this note.

INTEREST:  I agree to pay  interest on the  outstanding  principal  balance from
09-30-2002 at the rate of 8.250% per year until 10-01-2002.

Variable Rate: This rate may then change as stated below.

Index Rate: The future rate will be 3.500 PERCENT ABOVE the following index
rate: THE HIGHEST RATE ON CORPORATE LOANS POSTED BY AT LEAST 75% OF THE USA'S
THIRTY LARGEST BANKS KNOWN AS THE WALL STREET JOURNAL PRIME RATE. Frequency and
Timing: The rate on this note may change as often as EVERY DAY BEGINNING
10-01-2002. A change in the interest rate will take effect ON THE SAME DAY.
Effect of Variable Rate: A change in the interest rate will have the following
effect on the payments: The amount of each scheduled payment will change.

ACCRUAL METHOD:  Interest will be calculated on a ACTUAL / 360 basis.

POST MATURITY  RATE: I agree to pay interest on the unpaid  balance of this note
owing after  maturity,  and until paid in full, as stated below: At a rate equal
to 3% OVER STATED NOTE RATE.

LATE CHARGE: If a payment is made more than 10 days after it is due, I agree to
pay a late charge of 2.000% OF THE LATE AMOUNT WITH A MINIMUM OF $10.00 AND A
MAXIMUM OF $100.00.

ADDITIONAL  CHARGES:  In  addition  to  interest,  I agree to pay the  following
charges which are not included in the principal  amount above:  $30,0000.00 FEE,
WITH $10,000.00 DUE AT CLOSING AN $20,000.00 DUE AT MATURITY OF NOTE OR PAYOFF.

PAYMENTS: I agree to pay this note as follows: 35 MONTHLY PAYMENTS OF $31,000.00
BEGINNING  10-30-2002 AND 1 BALLOON PAYMENT OF $2,235038.63 ON 09-30-2005.  THIS
IS A VARIABLE RATE LOAN AND THE PAYMENT AMOUNTS MAY CHANGE AFTER THE 1ST PAYMENT
AND EVERY PAYMENT THEREAFTER.

ADDITIONAL  TERMS:  PAYMENT IS SET AT  $31,000.00  WITH A VARIABLE  RATE OPTION.
NEGATIVE  AMORTIZATION  IS NOT  ALLOWED AND PAYMENT MAY BE ADJUSTED AT THE BANKS
OPTION TO PROHIBIT THIS (ALSO NOTED ABOVE)  BALLOON  BALANCE MAY CHANGE BASED ON
THE INTEREST RATE FLUCTUATIONS. THIS LOAN CAN BE PREPAID WITHOUT PENALTY

SECURITY:  This note is  separately  secured by a  MORTGAGE  ON  PROPERTY  DATED
SEPTEMBER 30, .2002.

PURPOSE: The purpose of this loan is BUILDING REFINANCE

SIGNATURES:  I agree to the  terms of this note  (including  those on page 2). I
have received a copy on today's date.

     NEMATRON CORPORATION
     /s/ David P. Gienapp
     --------------------
     DAVID P. GIENAPP, Vice President

     CHELSEA STATE BANK
     /s/ Mary Lee Penny
     ------------------
     MARY LEE PENNY, LOAN OFFICER
                                     1


"I, " "me" or "my" means each Borrower who signs this note and each other person
or legal entity (including guarantors, endorsers, and sureties) who agrees to
pay this note (together referred to as "us"). "You" or "your" means the Lender
and its successors and assigns.

APPLICABLE LAW: The law of the state in which you are located will govern this
note. Any term of this note which is contrary to applicable law will not be
effective, unless the law permits you and me to agree to such a variation. If
any provision of this agreement cannot be enforced according to its terms, this
fact will not affect the enforceability of the remainder of this agreement. No
modification of this agreement may be made without your express written consent.
Time is of the essence in this agreement.

PAYMENTS: Each payment I make on this note will first reduce the amount I owe
you for charges which are neither interest nor principal. The remainder of each
payment will then reduce accrued unpaid interest, and then unpaid principal. If
you and I agree to a different application of payments, we will describe our
agreement on this note. I may prepay a part of , or the entire balance of this
loan without penalty, unless we specify to the contrary on this note. Any
partial prepayment will not excuse or reduce any later scheduled payment until
this note is paid in full (unless, when I make the prepayment, you and I agree
in writing to the contrary).

INTEREST: Interest accrues on the principal remaining unpaid from time to time,
until paid in full. If I receive the principal in more than one advance, each
advance will start to earn interest only when I receive the advance. The
interest rate in effect on this note at any given time will apply to the entire
principal advanced at that time. Notwithstanding anything to the contrary, I do
not agree to pay and you do not intend to charge any rate of interest that is
higher than the maximum rate of interest you could charge under applicable law
for the extension of credit that is agreed to here (either before of after
maturity). If any notice of interest accrual is sent and is in error, we
mutually agree to correct it, and if you actually collect more interest than
allowed by law and this agreement, you agree to refund it to me.

INDEX RATE: The index will serve only as a device for setting the rate on this
note. You do not guarantee by selecting this index, or the margin, that the rate
on this note will be the same rate you charge on any other loans or class of
loans to me or other borrowers.

ACCRUAL METHOD: The amount of interest that I will pay on this loan will be
calculated using the interest rate and accrual method stated on page 1 of this
note. For the purpose of interest calculation, the accrual method will determine
the number of days in a "year". If no accrual method is stated, then you may use
any reasonable accrual method for calculating interest.

POST MATURITY RATE: For purposes of deciding when the "Post Maturity Rate"
(shown on page 1) applies, the term "maturity" means the date of the last
scheduled payment indicated on page 1 of this note or the date you accelerate
payment on the note, whichever is earlier.

SINGLE ADVANCE LOANS: If this is a single advance loan, you and I expect that
you will make only one advance of principal. However, you may add other amounts
to the principal if you make any payments described in the "PAYMENTS BY LENDER"
paragraph below.

MULTIPLE ADVANCE LOANS: If this is a multiple advance loan, you and I expect
that you will make more than one advance of principal. If this is closed end
credit, repaying a part of the principal will not entitle me to additional
credit.

PAYMENTS BY LENDER: If you are authorized to pay, on my behalf, charges I am
obligated to pay (such as property insurance premiums), then you may treat those
payments made by you as advances and add them to the unpaid principal under this
note, or you may demand immediate payment of the charges.

SET-OFF: I agree that you may set off any amount due and payable under this note
against any right I have to receive money from you. "Right to receive money from
you" means: (1) any deposit account balance I have with you; (2) any money owed
to me on an item presented to you or in your possession for collection or
exchange; and (3) any repurchase agreement or other non-deposit obligation.

"Any amount due and payable under this note" means the total amount of which you
are entitled to demand payment under the terms of this note at the time you set
off. This total includes any balance the due date for which you properly
accelerate under this note.

If my right to receive money from you is also owned by someone who has not
agreed to pay this note, your right of set-off will apply to my interest in the
obligation and to any other amounts I could withdraw on my sole request or
endorsement. Your right of set-off does not apply to an account or other
obligation where my rights are only as a representative. It also does not apply
to any Individual Retirement Account or other tax-deferred retirement account.

You will not be liable for the dishonor of any check when the dishonor occurs
because you set off this debt against any of my accounts. I agree to hold you
harmless from any such claims arising as a result of your exercise of your right
of set-off.

REAL ESTATE OR RESIDENCE SECURITY: If this note is secured by real estate or a
residence that is personal property, the existence of a default and your
remedies for such a default will be determined by applicable law, by the terms
of any separate instrument creating the security interest and, to the extent not
prohibited by law and not contrary to the terms of the separate security
instrument, by the "Default" and "Remedies" paragraphs herein.

                                       2


DEFAULT: I will be in default if any one or more of the following occur: (1) I
fail to make a payment on time or in the amount due; (2) I fail to keep the
property insured, if required; (3) I fail to pay, or keep any promise, on any
debt or agreement I have with you; (4) any other creditor of mine attempts to
collect any debt I owe him through court proceedings; (5) I die, am declared
incompetent, make an assignment for the benefit of creditors, or become
insolvent (either because my liabilities exceed my assets or I am unable to pay
my debts as they become due); (6) I make any written statement or provide any
financial information that is untrue or inaccurate at the time it was provided;
(7) I do or fail to do something which causes you to believe that you will have
difficulty collecting the amount I owe you; (8) any collateral securing this
note is used in a manner or for an purpose which threatens confiscation by a
legal authority (9) I change my name or assume an additional name without first
notifying you before making such a change; (10) I fail to plant, cultivate and
harvest crops in due season if I am a producer of crops; (11) any loan proceeds
are used for a purpose that will contribute to excessive erosion of highly
erodible land or to the conversion of wetlands to produce an agricultural
commodity, as further explained in 7 C.F.R. Part 1940, Subpart G, Exhibit M.

REMEDIES: If I am in default on this note you have, but are not limited to, the
following remedies: (1) You man demand immediate payment of all I owe you under
this note (principal, accrued unpaid interest and other accrued charges). (2)
You may set off this debt against any right I have to the payment of money from
you, subject to the terms of the "Set-Off" paragraph herein. (3) You may demand
security, additional security, or additional parties to be obligated to pay this
note as a condition for not using any other remedy. (4) You may refuse to make
advances to me or allow purchases on credit by me. (5) You may use any remedy
you have under state or federal law. By selecting any one or more of these
remedies you do not give up your right to later use any other remedy. By waiving
your right to declare an event to be a default, you do not waive your right to
later consider the event as a default if it continues or happens again.

COLLECTION COSTS AND ATTORNEY'S FEES: I agree to pay all costs of collection,
replevin or any other or similar type of cost if I am in default. In addition,
if you hire an attorney to collect this note, I also agree to pay any fee you
incur with such attorney plus court costs (except where prohibited by law). To
the extent permitted by the United States Bankruptcy Code, I also agree to pay
the reasonable attorney's fees and costs you incur to collect this debt as
awarded by any court exercising jurisdiction under the Bankruptcy Code.


WAIVER: I give up my rights to require you to do certain things. I will not
require you to: (1) demand payment of amounts due (presentment); (2) obtain
official certification of nonpayment (protest); or (3) give notice that amounts
due have not been paid (notice of dishonor). I waive any defenses I have based
on suretyship or impairment of collateral.

OBLIGATIONS INDEPENDENT: I understand that I must pay this note even if someone
else has also agreed to pay it (by, example, signing this form or a separate
guarantee or endorsement). You may sue me alone, or anyone else who is obligated
on this note, or any number of us together, to collect this note. You may do so
without any notice that it has not been paid (notice of dishonor). You may
without notice release any party to this agreement without releasing any other
party. If you give up any of your rights, with or without notice, it will not
affect my duty to pay this note. Any extension of new credit to any of us, or
renewal of this note by all or less than all of us will not release me from my
duty to pay it. (Of course, you are entitled to only one payment in full.) I
agree that you may at your option extend this note or the debt represented by
this note, or any portion of the note or debt, from time to time without limit
or notice and for any term without affecting my liability for payment of the
note. I will not assign my obligation under this agreement without our prior
written approval.

CREDIT INFORMATION: I agree and authorize you to obtain credit information about
me from time to time (for example, by requesting a credit report) and to report
to others your credit experience with me (such as a credit reporting agency). I
agree to provide you, upon request, any financial statement or information you
may deem necessary. I warrant that the financial statements and information I
provide to you are or will be accurate, correct and complete.

NOTICE: Unless otherwise required by law, any notice to me shall be given by
delivering it or by mailing it by first class mail addressed to me at my last
know address. My current address is on page 1. I agree to inform you in writing
of any change in my address. I will give any notice to you by mailing it first
class to your address stated on page 1 of this agreement, or to any other
address that you have designated.


                                       3