Engineering Tip

Since FactoryLink version 6.0 was released and continuing in version 7.0, FactoryLink has provided a means of getting tags into Excel and WebPages.  This is using the off-the-shelf Microsoft technology called DCOM (used to be called OLE).  The acronym DCOM stands for Distributed Component Object Model.  For the rest of us, it is the way to get data across the network and use it in VB/VBA/VBScript.

To do this, you first must get the DCOM server for FactoryLink started.  This task is included with the system and has no bits, so everyone has it but few use it.  The task and executable name is FLOLE.  Just add this task to your shared system configuration table:

Flags    FR
Task    FLOLE
Desc    OLE Automation - DCOM server
Exe    bin/flole.exe

Before running this, it must be registered with the operating system.  There is a file named flole.reg in the FactoryLink/bin directory.  Browse to this and double click the file.  A dialog box will confirm that it was registered properly.  Now the server can be started.

On the computer used to run Excel or view the Web example, you must install the Active X control.  In FactoryLink version 7, it is found in the directory FactoryLink/installs.   The name of the install is:  flocx.exe.  You can transfer this file to a non-FL computer.

With any DCOM thing, the DCOMCNFG utility is needed.  Check out the notes on DCOM Mysteries Solved.  The same security and DCOM setup is required for any network DCOM object.

In this example Excel file, the first sheet contains the scripting output.  The second page contains the tags that being read from the server (the tags in this spreadsheet should work on any app, so test it first!).  If you change the tags and restart the spreadsheet you will get your new tags.  This code resides on the ThisWorkbook object.  This is required because only the Workbook object can receive the events, the Sheets cannot.  Take a look at the script, you will find a place for the .ServerName where you can put in a remote node name for a server across the network.  This spreadsheet can be used anywhere on the network and get real-time data!

The HTML example has been around for a while.   It uses VBScript to manage the object that is placed on the screen.  The list of tags is in the code.