Freesteel Blog » SGM work

SGM work

Thursday, October 12th, 2006 at 7:01 pm Written by:

I did some work in the engineering department of Liverpool University today. Some time ago Carl did a write up of something we had programmed to print undistorted images with one or more rotating print heads, assembled in a row. The inkjet print heads they use are meant for normal printing with paper moving rectangular to the print width. But in their machine the medium to print rotates underneath the print head, with one side of the head closer to the centre of rotation than the other. So, a rectangular bitmap would be distorted to a pie wedge. We wrote a little algorithm that transforms a bitmap into a new bitmap that, when printed on this setup, prints undistorted.
I had read it on the train last night and had a few comments and suggestions to make it clearer what this does.

Then looked into extending the controller of the machine that performs these rotations. In order to shine a light on the same area on the print medium for a specified time they want to be able to stop the rotation, then start it again, and so on. We use a python thread that monitors the machine position and when it has reached the target of the rotation joins the main thread that in turn can sleep for the specified time, then start the motion again.

I had hoped we could use some sort of callback mechanism in the DLL that controls the digital controller card: When a motor has reached it’s target position we get a user specifiable callback. We had found something in the documentation for the DLL and started coding. But we got stuck and had to call the support phone line for the card manufacturer. The friendly support person told us we were following a red herring: The documentation we had used was for a different card, using a different (probably real-time) operating system.

Last week I also spend a day there:
We had looked into rewriting the user interface of the motion controller: The old user interface got out of hand, partly because a master student had used unsuitable GUI code generators on it (python glade). We had decided to shelve this code and write a much simpler new interface. Now that this motion controller has been in use for more than a year we could also reduce the functionality to what was really needed.

Another half day last week was spent in the department of psychology. I am working on a framework to programme visual perception experiments using python, wxwidgets and python image library (PIL) on a mac os x system. More about that some other time.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>