Tuesday, January 20, 2015

Debugging of completed PC software for controlling the keypunch interface box

NEW KEYPUNCH INTERFACE DEVELOPMENT

I finished all the coding and debugged everything possible without the keypunch connected. I uploaded the alpha level code to GitHub to allow others to look it over. I then attempted to build a windows executable to make it easy for other project members to download and run the program without having to install Python or the various packages I used.

I did get pyinstaller on my system but the executable it produced vanishes without throwing up a GUI. I need to rebuild it with a console window and debugging, to see what might be wrong, but this is not a priority so I put it aside in order to resume testing.

At that point, I moved out to the workshop, hooked up the 029 keypunch and began testing the connection sequence and other communications between PC and keypunch. I found a few flaws and began correcting them, as well as adding some additional diagnostic output to help until I see that the communications mechanism with the keypunch works correctly.

One example of the bugs is that the Arduino returns \r\n for every line, carrier return followed by new line, while we were looking only for the newline at the end of a line. Now we drop both the terminating characters if it is CR NL, otherwise just the NL.

I ended the evening with solid communication between the keypunch interface box and this program, leaving me the opportunity to try out one test output file which I put together for the purpose. It punched properly except I was off by one on the card being punched (due to origin 0 used on the language arrays but origin 1 used for human counting of cards in a deck).

I had a few other small errors to work on, but I do see that the essence of the program is correct. I discovered some odd characters in the stream, which turned out to be XON and XOFF flow control characters, because I forgot to put my pySerial port into software flow control mode where it would strip these out automatically.

I will do some cleanup and resume testing tomorrow, when I hope to be able to deem it ready to release as a beta version. I had made a few minor improvements to the Arduino code as well, which I should also upload to Github.


No comments:

Post a Comment