1 EXHIBIT 5.1 September 26, 1997 Board of Directors Bioanalytical Systems, Inc. 2701 Kent Avenue West Lafayette, IN 47906 Gentlemen/and Mrs. Kissinger: We have acted as counsel to Bioanalytical Systems, Inc., an Indiana corporation (the "Company"), in connection with the filing of a Registration Statement on Form S-1 (the "Registration Statement") with the Securities and Exchange Commission (the "Commission") for the purposes of registering under the Securities Act of 1933, as amended (the "Securities Act"), an aggregate of up to 1,725,000 Common Shares of the Company (the "Shares") which are to be offered to the public. Of the Shares, up to 225,000 Shares may be issued by the Company to cover the over-allotment option to be granted to the underwriters. In connection therewith, we have investigated those questions of law we have deemed necessary or appropriate for purposes of this opinion. We have also examined originals, or copies certified or otherwise identified to our satisfaction, of those documents, corporate or other records, certificates and other papers that we deemed necessary to examine for the purpose of this opinion, including: 1. The proposed form of Second Restated Articles of Incorporation of the Company. 2. A proposed form of specimen certificate representing the Shares; and 2 Board of Directors September 23, 1997 Page 2 3. The Registration Statement. For purposes of this opinion, we have assumed (i) that the Shares will be issued pursuant to the terms of the Registration Statement; and (ii) that no changes will occur in the applicable law or the pertinent facts before the issuance of the Shares. Based upon the foregoing and subject to the qualifications set forth in this letter, we are of the opinion that when (a) the Second Restated Articles of Incorporation of the Company have been adopted and approved by the Board of Directors and shareholders of the Company and filed with the Secretary of State of the State of Indiana in the manner contemplated by the Indiana Business Corporation Law and the Registration Statement, (b) the pertinent provisions of the Securities Act and all relevant state securities laws have been complied with and (c) the Shares have been delivered against payment therefor as contemplated by the Registration Statement, the Shares will be validly authorized, legally issued, fully paid and non-assessable. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and to the reference to this Firm under the caption "Legal Matters" in the Prospectus included as a part of the Registration Statement. In giving this consent, we do not admit that we are within the category of persons whose consent is required under Section 7 of the Securities Act or under the rules and regulations relating thereto. Very truly yours, /s/ ICE MILLER DONADIO & RYAN