Finally, I have had some success with MySQL stored procedures in phpMyAdmin.
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
Tuesday, March 30, 2010
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.
Subscribe to:
Comments (Atom)