Stacker update, and a business layer – data layer question…

May 18th, 2010 by admin

The robotic cranes are coming along nicely. I completely re-worked all my logic about 3 weeks ago and so have been a little behind schedule. I’ve had the opportunity to do some really good testing recently though, and the changes I implemented are working well. The system is based on a sort of state-processor type model. This means that based on a bunch of flags that represent the state of the device decisions are made regarding the ability to do certain tasks, such as transfer, do a command (store, pull, etc.). The program falls through this logic every so often, determining all it’s state flags, and then doing things based on those flags. This sort of programming is prevalent in device controls, but was something it took me some time to get used to as the logic can get very very complex. Anyway, the purpose of this post is to express a quandary… When is it appropriate to have business logic in the database. Of course I mean as stored procedures. I see people leaning both ways on this. Some say business logic should be there because as a stored procedure it’s super fast, others say it only belongs in one place, the business logic layer. I have found myself wondering why I shouldn’t put some business logic in the database stored procs, simply because this system is such a one off, that there is no chance of code reuse. I haven’t done it yet, I guess because it just feels weird to me, but sometimes I think it would be OK, and I know it would make my life easier. Oh well.

Later,
Tim

April 22nd, 2010 by admin

Stacker update

April 15th, 2010 by admin

So I’m going to start updating my trials and travails regarding my current project. So basically I’m creating a custom Warehouse Controls System. We’re trying to replace an old system that was built in an old language and running on old hardware. The project basically has 2 parts, The robotic stacker crane manger, and the conveyor manager. The conveyors bring the loads to the cranes which store, retrieve, and also have the ability to pick (a person rides the cranes and will be taken to a location where they retrieve only one parcel from a specific pallet location). The crane then takes the load back to the conveyor and it’s conveyed out to the depalitization area. So far I’m the guy for the Stackers. It’s been super super fun and VERY challenging. So far we can connect to the cranes and send a few commands. Our first big test is Saturday. Gonna try a Store, Retrieve, and transfer from one aisle to another. These are huge machines, in a huge facility. 4 warehouses, each one 325 x 325 x 90tall. Each warehouse has several stackers and dozens of aisles. Stackers are super tall and weigh over 15 tons. They can move at 14 mph at full speed. So it gets very complex. Have to make sure stackers don’t crash, optimize movements, etc. etc. Super fun! The newer ASR’s (automated storage and retrieval systems) do a lot of this stuff in their PLC logic, but these are old enough we get to do a lot of it. It’s totally one of a kind stuff, completely custom. I’m up to about 4000 lines so far, and it’s based at it’s heart on a state processor that checks dozens (hundreds) of flags (flags with bitmasks being and’ed and or’ed) to determine state and then process. Multithreaded, and asynchronous communication.

MSDN Subscription got upgraded today

April 15th, 2010 by admin

My MSDN subscription was upgraded to “Ultimate” today because I used to have a Team Suite license. So I know have access to EVERYTHING Microsoft puts out! I love my job!

test form for city

February 4th, 2010 by admin

     
   


 

   
     

Got my Google wave invite.

November 15th, 2009 by admin

google-wave-logoI finally got my Google Wave invite.  I have 7 invites left.  If you can tell me what a good use for Wave is I’ll send you one.  Right now I just kinda don’t get it…

Cheers,

Tim

communication, and traffic

October 11th, 2009 by admin

Just saw the most interesting story on CBS’ “Sunday Morning” Mo Rocca did a piece about how in some parts of Europe all traffic signs are being removed. For example, at a typical four way stop intersection the signs are removed and the intersection is replaced with a traffic circle without signage of any kind. According to the story, accidents not only fell, but were eliminated entirely. This effect was attributed to drivers increased communication and their inability to use the signage as a sort of offload of there own responsibility to think, not simply trust the signs. i.e. there’s a stop sign there, so that driver must be going to stop, I won’t even look…

How interesting this is. I wonder if there are implications here for user interface. I’m gonna have to think about this one.

How to do multiple key down in C# control + P for example

August 17th, 2009 by admin

So I needed to set up an app to print when the user presses control+p. Seems fairly straight forward right, after all there are all kinds of multiple key press codes like this in the world ctrl + P is print, ctrl + F8 could be something else, etc. etc… I was shocked when I went looking on the net for a good way to implement this in C# .NET and found no good examples, so I made my own keydown event handler, so here it is.

private List<string>  pressedKeys = new List<string>();
private void ShellForm_KeyDown(object sender, KeyEventArgs e)
{
pressedKeys.Add(e.KeyValue.ToString());
bool x = pressedKeys.Contains(“80″); //P key

bool y = pressedKeys.Contains(“17″); //CTRL Key

if (x & y & pressedKeys.IndexOf(“80″)>pressedKeys.IndexOf(“17″)) // so it has to have P and CTRL and CTRL has to be before P
{
MessageBox.Show(“you pressed CNTRL+P good job stupid…”);
_btnPrint_Click(null, e);
pressedKeys.Clear();
}
int count = pressedKeys.Count;
if (count>2)
{
pressedKeys.Clear();
}

}

the message window was just for my benefit… gotta remember to take it out. Let me know if you see, or know of, a better way to do this.  The one thing i see missing is some sort of timer to limit the time between key presses. As it is now a user could press “Ctrl” and then wait any amount of time and press “P” and it would print.

Cheers,
Tim

First post from android

August 11th, 2009 by admin

This is my first post from my new android phone. Very very cool and will hopefully lead to more posting!

Super sweet clickonce screencasts

August 11th, 2009 by admin

I found an awesome site for click-once help and super sweet screen-casts (my favorite way to learn)

http://robindotnet.wordpress.com/

Robin is really clear and easily understood. So if you have questions about concurrent clickonce installs, or certificate expiration issues, or other .NET click once troubles, check her out. Don’t check her out, check out her site… Or whatever…