Tuesday, March 30, 2010
GOOOOOAL!
This controller software IDE called AspectFT Studio makes it very difficult to control triggers. Any value sent as a trigger input will trigger the code to execute, and there is no way you can set up logic to sometimes trigger, and other times not. Any logical sequence will result in at least a one or a zero, which will both activate a trigger.
Luckily they allow you to read and write to a database, so I can write my code in a stored procedure. They only have support for MySQL and and SQLite, and they suggest we use XAMPP for small projects (they will provide a server for mucho deniro, and they suggest we go that rout, and I can see why - there stuff hardly works without it).
So after much ado, I have finally harnessed the power of stored procedures in MySQL. I am posting this very much prematurely though, because I still have to test it. Just because I got it to compile doesn't mean my logic is perfect.
*think*
LOL. My logic, not perfect. I'm laughing so hard I'm almost crying.
No, seriously, I might still have some mistakes. Lets check . . . no mistakes, big surprise.
I'm not saying my code is perfect, but it works. Do I have a big head or what?
;p
Monday, March 29, 2010
Logic in AspectFT Studio
You can thank American Auto-Matrix for the lovely diagram below. I was required to figure out this logical sequence as part of their training.

This is all required to check if a day and time is in the schedule or not. Check what day it is, check if that day is checked; check the time, check if that time is between start and end time, if so, set CV = 1, otherwise set CV = 0. That's all it does, and this is the simplest way to do it.
I doubt they even check it. My office mate just BS'd his, and got 97%, counting one mistake he made (out of 30, I think they graded his perfect otherwise). But his logic on this problem clearly is flawed, so they didn't notice that. So, clearly, they didn't check everything. So, did I waste my time? No, I learned how much of a piece of $#!7 AspectFT Studio is.
Okay, it's not that bad. I did accomplish the task. And if we ask a much, much, higher price when working with this architecture, then that's a good thing, because we'll make much more profit with only a little more work. But the military and other government agencies that want this product might consider that if they changed to another system they would be able to save costs installing systems that have a more competitive market. We bid high because we don't want the job, and still get stuck with it.
/sigh
What can you do?
Wednesday, March 24, 2010
JavaScript vs. Java Script
"Are you serious?"
Oh, yeah. I'm serious. This company, American Auto-Matrix, actually uses a Java script in their AspectFT Studio (IDE). Don't be confused, not JavaScript, no, this is actual Java, that runs on a JVM. Look at the screen shot from the training video to see for yourself!

But they call it Java Script like that is actually the name of something. I think a more accurate name would be Java script (with the "s" lower case), because JavaScript (with the "S" capital, and with no space) is something completely different, and the only name in Java script is Java, with script referring to how the Java code is actually being used (as a script).
I guess they should have just stuck with Mocha. ;p
My coworker has told me from the beginning that AspectFT Studio is poop, and does not work. It is supposed to help you develop graphics and web interface that an HVAC controller can host for viewing, that also writes to a database for reports etc.
It's all very cool, in theory. This is only my second day working with it. But so far, I can't view my graphics from the controller. It seems to just not deploy properly 98% of the time. I guess some people have eventually gotten it to deploy properly, but that may be just a rumor.
There are a couple of things still to try. One, turn the termination resistor on on the controller (I think it's supposed to be, but I'm the new guy, so what do I know?). Two, start a new project from scratch with the bare bones required for testing. Get that to work. Add some stuff. Test to see if it still works. Then maybe we can determine where we go wrong.
Before I do all that testing though, I'm going to get through the entire video training. There may be additional insights yet into how this abominable thing works.
Friday, February 26, 2010
Andover Controls Continuum Web Client
Andover Controls is our favorite <3 brand of controller. It is easy to work with, easy to make graphics for, and has the least bugs and difficulties. Probably because it is made by the supplier of most of our parts, Schnider Electric. Continuum is the name of the database/workstation software.
Today, I was learning about the Continuum web client (cleverly named WebClient). It was an interesting thing. WebClient is a program that runs on the server with Continuum, and provides web access to the Continuum Graphics pages.
Unfortunately, all that was necessary background for the one short little statement I have. That is, "WebClient provides ASPX pages that open up Java applets running Continuum graphics!" A beautiful marriage of Microsoft and Sun. Oh, I'm such a newb. I just got excited because that's basically exactly what I learned in school: C#/ASPX, and Java. Probably someone else did too.
Anyways, there is hope. I may still program professionally yet. My little detour into assistant engineering is quite educational. Although it is not necessarily my prefered or first choice of curriculum, I am grateful to learn what I can. And, it is all quite interesting and valuable information I am learning, none the less. Like what points a typical MAU has, and why.
(A Make-up Air Unit is installed to provide air to make up for the air lost due to an exhaust fan. Typically it will have a current sensor to detect if the exhaust fan is on or off, but the exhaust fan does not need a command output from the controller. It is just manually controlled. Why we don't just wire the MAU fan straight to the exhaust fan switch? I didn't ask, so I don't know. We could do that to be cheap, and it would save us on an output command, and we could leave the current sensor to both fans just to monitor them, but . . . that's just not how we do it.)
Sunday, January 17, 2010
Internet Security 2010
- My browser close
- My background was changed to say something like, "you've been infected" (I only saw this for 1 second or less, so I couldn't read it. Basically, it looked like some cheap MSPaint job.)
- Blue screen of death
Then I couldn't even boot my computer, unless in safe mode, and even then, I had to hit escape to not run STDP.SYS. I still don't know what that file is, but I know when I went into REGEDIT and made it not run at startup, I could finally boot my computer normally.
That was really no help though. Even after removing this virus that seemed to be Internet Security 2010 at the heart, (which took much effort with existing antivirus, S&D, & other malware remover tools), I got some other, similar annoying spam virus remover software popping up asking me to buy it, telling me I'm infected.
This second part wasn't so bad. I could use my web browsers at this point. But when I tried to update AVG, I couldn't. I don't know what the deal was. I ended up uninstalling it, trying to reinstall it, but couldn't. The only thing wrong at this point was the annoying spamming thing, I forget what the name was, but the symbol was the blue striped shield that matches Search & Destroy's immunize symbol. The IS2010 symbol looked like the Windows defender shield.
So I got Avast! antivirus (which I have never heard of - so maybe that was a mistake), and now when I boot, I can't do jack f'ing $#!7. No, not really. I just can't get online in a web browser, IE, Chrome, or Safari (haven't tried Firefox). I'm only online now because I noticed I could ping any site and get immediate responses from the command line. So I tried remote desktop, and boom. I can get online that way. The virus is doing some very specific things to keep me offline.
At first my internet was simply disabled in the network settings. Well, simply being that it actually said it was. I changed that and no effect. No surprise, but, I don't know what to do.
I'm going to try safe mode, but I think at this point, because I've been messing in the registry haphazardly and such, and my system is all kinds of f'ed up, that I just need to backup and reinstall. I'm lucky to have access to my computer I guess. It's not fried or anything. I can even get online in this round about way. I can access my files.
Well, this is my problem. I think it could be a scam set up by some investors or people with interest in products with the words, "Internet Security 2010," in their product name. (*cough* Norton & Trend Micro. *cough*) While searching I saw on Yahoo! I think, "Internet Security 2010 Trending."
Whoever it was who was behind this, I think they can pat themselves on the back and call it a success. And I'm sure the antivirus vendors are happy about it. A few websites claimed the only way to get rid of it is to purchace certain antivirus removers at a cost of around $30. Heck, that's all the virus wanted to purchase the Internet Security 2010 package that it came with. Maybe that would have solved the problem too.
Anyways, that's all for now. I'll attempt a few more fixes, but likely, it will be goodbye to this 4 year old installation of Windows XP.
Friday, October 2, 2009
Work? Maybe later.
Wednesday, August 12, 2009
1:1 Relationships
The issue is this: 1:1 relationships are really the most complicated IMO. They can be done either like 1:N, or like N:N. Of course when you use a third table to describe the relationship (like N:N) this is more normalized. But using a foreign key, like in a typical denormalized 1:N, is much more common.
At first I didn't realize this. I though, "oh, I'll start with 1:1, go to 1:N, and then do N:N." But I ended up just moving 1:1 to the end, since it could be done like either of the other two. I realize now I left out the part where a 1:N relationship can be described with a third table, but maybe I'll put that in a quiz to see if they can figure it out on their own. (smirk)
Also, its kind of hard to come up with examples, in my opinion. I used Oregon Drivers License record and Social Security record as my two records that have a one to one relationship. Since ODL will only be associated with one SSN, and they won't issue an ODL to someone who has a SSN with an ODL already associated with it, this is perfect.
And I've only written one program that actually uses a table with a 1:1 relationship. I guess its common to use when you have a special group of users. I might have to go back and do that. User ID foreign key . . . reason for being serperate from the rest of the table . . . sounds good to me.
Anyways,
:p