Posts

Showing posts from February, 2011

Dynamic Object Oriented programming in ArchestrA

As with most developers using Wonderware products, I often have to get creative to compensate for the limitations in the development platform, scripting language, etc. Lately, I've been need to create "objects" (in the object oriented programming sense of the word, not the app server sense). That is I need collections of data describing some real world thing. For example, I have been creating a callout feature for a client's SCADA host system. The callouts are stored in a SQL database and my scripts pull out a whole set at a time. Each callout has various attributes such as the callout type, the comparison operator (>, <, =, >=, <=), the setpoint, etc. This presents two issues. First, how do I keep all of these pieces of information together for each callout without creating & deploying App Server objects for each one. Second, at any given time, there will be a variable number of callouts. I have used the following method (read complete hack

"On Show" script substitute for ArchestrA graphics

While developing a control screen using ArchestrA graphics, I found that the "On Show" script provided for graphics is flaky at best. This is especially apparent when referencing dynamically referenced objects in the script. In this case, the graphic can be used by several different objects. In order to allow it to get it's bearings on startup, it is embedded in another graphic. That graphic has a "while showing" script with a statement something like this: MyGraphic.OwningObject = InTouch:MemoryNodeID + "some other text to dynamically build the object name"; This allows me to use "Me.WhateverUDA" type references in my graphic to interact with the object assigned as "OwningObject" above. The problem is that any "Me.WhateverUDA"-type statements I put in the "On Show" script don't work because of timing issues. The "On Show script apparently fires before the "OwningObject" statement ab

A free, portable PDF Toolkit

I just found another great time saving utility that is worth sharing. I spent too much of my morning trying to merge multiple PDFs efficiently before finding this thing. It allowed me to merge about 30 PDFs in about 7 clicks total, and there's no watermark. Did I mention it's also free (and portable). It's called PDFTK (PDF Toolkit). It allows you to do things that formerly might require a paid app (like splitting & merging PDFs. There is a portable version available on PortableApps.com which gives it a nice front end.