Posts

Showing posts from August, 2009

Scheduling the printing of an Excel file which has an add-in from the command line using visual basic scripting (vbs) via wscript

On a recent project I was required to print out an Excel based report which made extensive use of OSIsoft PI DataLink's Excel Add-in on a sechduled basis (7am daily).

Unfortunately Excel does not easily allow for the printing of an Excel file via the command line via switches or parameters when calling Excel.exe (e.g. C:\Windows\MS Office\Excel.exe -print "C:\Reports\My Report.xls").

I was able to find examples on the Internet which made use of cscript or wscript where one calls VBS code, and where one provides the file name as argument, for example:

wscript "C:\Data\My Scripts\printXLS.vbs" "C:\Data\My Reports\Daily Analyser Excursion Report.xls"

Note the convention of using "" around full path filenames as they contain spaces.

The file printXLS.vbs would contain something akin to the following code:
Dim XLApp
Dim XLWkbk
Dim ObjArgs

set ObjArgs = wscript.arguments
if ObjArgs.count <> 1 then
wscript.echo "Invalid passed arguments"
wscri…

Handling Late Data

Image
Handling "Late Data" into a historian can be tricky when that data changes over time.

For example, we have a situation where material arrives in a truck on a weighbridge for processing. A sample is taken and sent to a laboratory for composition analysis but in order that the process can continue without waiting for the lab results, estimates are made and stored in the historian for temporary use.

After some time, once analysis has taken place, the actual values then replace the initial values (and the temporary historian entries for that timestamp must be updated) so that more accurate calculations on the given data can be performed.

This back-tracking and synchronisation of historical data and more have been incorporated into our IDX Listener technology to allow for efficient handling of these 'late data' into a historian.


Download PPT Show

Profibus PA for Hazardous Areas

Image
Presentation and Paper by Michael Bean on the use of Profibus PA for Hazardous applications.

Profibus PA was designed as a solution for automation in Process Applications where it is often necessary to guarantee levels of safety with regard to potentially explosive atmospheres. In this paper and presentation given at the Hazardous Areas Conference held at Gallagher Estate in 2008 I discuss ProfibusPA's applicability to such applications.

The presentation raised quite a bit of interest as various parties debated their companies' acceptance of the FISCO. Many were surprised at the advantages offered by the "high-powered trunk" concept.

Download Paper
Download Presentation Slides


Profibus Diagnostics

Image
I often have people asking for a copy of my slides from a Profibus Diagnostics Seminar that we gave at the Eskom convention centre last year. I got the last slot of the day so I ended up speaking to only 40 people or so.

If you missed it you can have a look at the slides here.

Download Profibus DP Diagnostics Presentation