Banner
Home
Project
Journal
Timeline
About Me
     
 

Below are several journal entries that record my progress or frustration throughout this project. These will be updated when events occur or on a weekly basis pending progress.

 
     
 
28
 
 
This weekend I spent a lot of time looking into how Steve and Kratz communicated with the track to get sensor information.  I also worked on adding trains and how requesting would be done.  From this, I'm now able to add a train to the track and associate it with a particular color if the track is available.  I now just need to work on requesting track while things move, take care of blocked trains, and monitor sensor hits.

I looked into sensor information but was unable to get much to work and I think I may have to take over direct communication with the track instead of having Kratz's old code do this.

Here's a list of things I wanted to do and their current status':
   - Fix broken turnout - DONE
   - Review collision logic and implement more of the structure - DONE
   - Work on utilizing previous code and communicate with track
        > Get sensor information - IN PROGRESS
        > Be able to change the turnouts - DONE
   - Do further work on interfaces and how different actions will effect them - IN PROGRESS
   - Go over Timeline and create more real goals - DONE but task list will be formed each week
   - Document work and start work on a user guide - STARTED/IN PROGRESS
   - Document how to re-program switchits for other users on this project - DONE
          > Image for programming
          > Manual


Below if a new list of things that I want to do this week:
   - Begin working on client interface and communicating with server
   - Finalizing adding and removing trains
   - Change it to only allow client connections if a train is available
   - Figure out sensor communication and testing
   - Add new colored images for multiple trains
   - Work on new track requests for trains
 
23
 
 
More progress... I've been trying to keep up with my list of tasks this week to complete and I have finished a few:

   - Fix broken turnout - DONE
   - Be able to change turnouts - DONE
   - Collision logic - DONE (this should be good with this form of layout and previous OS concepts)
   - Get sensor information - IN PROGRESS (some issues with how Steve may have been doing it and not making sense)

I also found out that there are some issues with my code and working with sockets - I didn't receive this on my computer but when working on another I received an exception with a thread utilizing an object that was created on the main thread.  I'm going to have to go over the logic and most likely use delegates and an invoking method to change these items.

Hopefully more progress as the week continues...
 
21
 
 
I've been putting in A LOT of work on the server and going over the layout to setup all of the functions that it will perform.  I've set up what the basic layout will be and all of the structures are going to be in visible listviews that I'm planning on puttin gin another tab from the visual layout.  This will allow the processing to be visible so that I can see why things are going the way they are and matching up to the visible layout.  I still have to delve down into how this will communicate with the track and also see how the client will make requests to the server.  Also, it should be noted that I'm trying to make this as dynamic as possible with the server utilizing text files that hold track and turnout information so that nothing is hard-coded.

Here are some previews of my work:
   > Proposed Server
   > Working on Images in Photoshop
   > Coding Basic Layout in C#

Here's a list of things I want to get to this week:
   - Fix broken turnout
   - Review collision logic and implement more of the structure
   - Work on utilizing previous code and communicate with track
        > Get sensor information
        > Be able to change the turnouts
   - Do further work on interfaces and how different actions will effect them
   - Go over Timeline and create more real goals
   - Document work and start work on a user guide
   - Document how to re-program switchits for other users on this project
 
16
 
 
3 updates in a row?  Well, this will be the last time this week until Sunday as things are getting busy.

Here are a few things that I've added to my project so far - I've been working on cleaning things up and also implementing features on the server.  Images for the turnouts, sensors, and track have been added as well as a front-end where it gets the COM port that the user wants (from Steve's code).

Images:
  > COM Port select
  > Server interface

More stuff to still be worked on and hopefully I will have a definitive list of what I want to have done this next week posted on Sunday.  I'm meeting with Dr. Pankratz tomorrow and hopefully I'll have a few more questions answered.
 
15
 
 
Very tired of looking at code and getting a little overwhelmed with looking at Kratz's old code and wondering what I'm going to do about it.  I was however a little productive today and worked on some graphics for this project.  Now I just need to finalize a few things with my Time Line to put some real goals and get to work on more...

  > Track Layout
  > Client Connection Concept
  > Simple Client Mode
  > Single Client Mode
  > Dual Client Mode
 
14
 
  Things are looking much better.  Here's an outlook of things that I've recently done with thoughts and a small list of things that I'm looking to do shortly.

Recently finished:
  > Basic Async Client and Server program tested and verified
-  
Spent a lot of time working on a C# program for asynchronous communication.  Test program created and tested.  This looks VERY promising and I just have to run through a few extraneous things that are left with it before it should be finalized to use and not worry about.
   + Communication
   + Client disconnect
   + Server disconnect
  > All turnouts re-programmed
-  
All turnouts on track have been reprogrammed to numbers that I now know are in working order and have been tested so that they aren't duplicated on track.  They are all divisible by 2 and working!  Manual turnout switches have also been disabled at this time to prevent issues with competition between program - this can easily be re-enabled if desired later on.
  > General maintenance on track
-  
Worked on replacing screws that were stripped and also making sure that track components were lined up and working. It looks as though one of the AIU's is signalling that 2, 5, and 6 are both magnetized even though they shouldn't be - these are on the left-side of the track and is something I have to look at further down the road.
  > Track diagram sketch
-  
Started creating a scaled diagram of the track layout with representations of where sensors are.  Certain sensors are not going to be utilized and speed limits will have to be in place at certain areas.
  > USB/COM port connections tested - good to go!
-  
Verified and tested that the USB-prolific devices works great as long as a driver for it is installed and you know what COM port it is on.  A driver is under my project folder for this.
                                                                  
Left to do:
  > Need to review collision logic and structure design to hold track information
  > Need to work on utilizing previous code into new work
  > Need to finalize track diagram and begin creating interfaces in C#
  > Need to create protocol for server/client communication
  > Need to still fix portions of track that are unstable
 
10
   
 
I just got back from a busy night of working on the track and seeing if I could get some of the irregularities resolved.  After talking with Dr. Pankratz today on the track layout, components, and how to program some of these devices, I spent some time taking things apart and was able to reprogram one of the Switch-it decoders to hold a new address that didn't conflict with another.  I tested that side of the track out and everything went beautifully - both turnouts responded to their correct address and things were working fine.  I hooked the track back up, made sure everything was in place with both sides, and now it looks as though another turnout on the opposite side is conflicting with this same address.... Long story short, this weekend I'm going to take it all apart again and re-program each of these to a separate and established address so that this will be done!

I then looked at the other components of the track and things are not in great shape.  Some of the plywood is starting to bend and things just aren't sitting in place like they originally were.  I have talked to Dr. Pankratz about this and it looks like we're going to have to do some maintenance in making sure that this isn't an obstacle for the main project.

All in all, this is at least a step in the right direction where I know what things lie ahead and I also know that I need to do more coding to refine this Server/Client asynchronous socket program as it is having some issues also.  More to come when things happen... hopefully better news then this.

  > New pictures added from tonight
 
7
   
 
This weekend I did a lot of work at looking at what this project entails and making major progress into how these devices are going to communicate.  Hightlights are shown below:

I spent a lot of time creating a C# application for both a server and client that allows multiple clients to connect to a single server.  In this, the server stands alone at a particular IP and port of which clients can connect to.  The server then runs various threads of which continually wait for other clients to connect and have a dedicated thread for communication with each client that joins.  The client is able to send requests to the server and the server sends back a response (going to be true/false).  From this, I'll be able to check if the request can be completed and provide continual information to the client. Also, when the server disconnects, the clients will be notified about the dropped connection and I should be able to successfully stop all trains on the track.  Many test cases have been run but I still need to delve further into this to create structures and other things to hold track information.  This is looking VERY promising and a lot of time and work were put into this.

    TCP Server and Multiple Client connections
       > Picture (not very clear but the computers are connected!!!)

I also worked on how the interfaces were going to be set up and what makes sense for a user with not much experience to control these trains.  A single client will be able to control one train and they will be able to select an available one from a list. The server will display the track layout and allow for the addition and deletion of trains.  Since the server will be with the track, this seems to be the most logical option and the only place where these two actions should take place.  Sketches for the interfaces I'm thinking are shown below...
 
    Interface drawings:
       > Server
       > Client

Below is a list of some things that I still want to do or am looking to do next:
    - Need to re-program turnout - found documentation and just need to take things apart and do it.
    - Need to talk to Blahnik about C# coding stuff - have ideas of how to do things but need his experience in some areas
    - Need to create protocol between server/clients
    - Need to take more pictures of track and progress
    - Need to still fix portions of track that are unstable
    - Need to keep testing USB connection and other connections to main track for stability purposes
    - Need to review collision logic and structure design to hold track information
    - Need to work on utilizing previous code into new work
    - Need to scale track for server interface and figure out exact sensor/turnout locations
 
3
   
 
GOOD.

Today I met with Dr. Pankratz and Steve to talk further about this project and go over other concerns that I've been having.

I met with Dr. Pankratz first where I got a better understanding of what my project entails and what I should be working on. I'm planning on getting some interfaces drawn and outlining this project in more detail.  Hopefully I will be able to get some code working and finalize communication between applications in C#.

Later that night I met with Steve and we talked about what he did with the project and concerns that he had.  It appears that Kratz's code should be pretty reliable and he went through it himself and cleaned it up a bit (finding a bug or two) - hopefully I won't have to do that also.  We then looked at why his code wasn't working and in the end figured out that it was the prolific USB connector that was seemingly faulty.  This device would work sometimes and make connections and other times not.  We verified all of the connections and then attempted with the serial connector and it seemed to work every time.  I'll have to pick up another one of these and go from there.

Now that this is figured out, it's just a matter of changing the duplicate turnout's address, fixing portions of the track that are unstable, and working on multiple interfaces.  Pictures hopefully coming soon...
 
 
 
     
A Senior Capstone Project - Brice Hilgemann 2010