Monday, 5 June 2017

Wind Chime and Breezy Setup

Breezy is a PC application that simulates a spectrophotometer. Wind Chime is a library, service and tools app that provides the communications to a spectrophotometer.

The Wind Chime Service runs in its own process, the Breeze app will bind to the service and send commands to the service, the service will sends these commands on to the spectrophotometer and will send back any responses to the client.

The Wind Chime library, is a shared library used by the service and your app. The library is already included in BreezeUI, see /breeze/libs/windchimelibrary.jar. Perform a SVN update if you do not see it.

The Wind Chime Tools app, is used to configure the service's connection to the spectro and perform any initialization on the spectro, eg the 73 Series of spectros do the following when you first power them on:

  • Power On Start Test 
  • Find the zero order light
  • Find the gratings home position
  • Initialize any connected accessories

Getting Started

Here we will connect Breezy to Wind Chime via a TCP/IP socket.

First run breezy and connect to a socket:

Second, install the WindChime APK and open the Wind Chime tools app. The app uses a navigation drawer.

Go to connection, enter the IP address and Port, press connect

Go to Status, here you can check on the service's status, notice that the spectro is not yet initialized

Go to Wavelength screen and press find home. to initialize the spectro. Eventually POST and accessory initialization will be added.

On Breezy go to the Log tab and check you are seeing the comms messages

Back to Wind Chime, you can set the tools app to automatically connect and find home, via the settings screen. The app will automatically run on boot up.

Setting up BreezeUI

The various measurements, such as Photometrics, can be done either with a dummy class or one that binds to the Wind Chime service. To hook up the Breeze app to the service, edit bibby.jenway.breeze.MainModel

Comment out the line
this.spectrophotometer = new DummySpectro(2000L);

and uncomment this line
this.spectrophotometer = new ServiceSpectro(appContext);

Run Breeze and perform a photometrics measurement

Keep an eye on the Breezy log screen to see the messages that are been sent back and forth.

That's it. Note that the current version of Wind Chime is 1.2.0, Breezy were used for this post.

No comments:

Post a Comment