CIULink

Contents

Introduction

CIULink is a program that allows the user to view the data from the CIUMon interface program in different applications, such as Microsoft® Excel or Microsoft® Access, or can be used on its own as a viewer itself. By using the DDE (Dynamic Data Exchange) function in either Microsoft® application, you can request the information from CIUMon and view it in a format that you desire.

Running CIULink

The following will outline the steps involved to ensure that CIULink will run correctly with your chosen application.

Open CIULink from Window Start menu > GMCL DBDOC

Alternately, you can open CIULink in the DBDOC folder at the following path:

After you open CIULink, choose File from the toolbar and select Set IP Address from the pull down menu. The following window will open:

Image:ciulink 1.png

Check to see that the correct IP Address for the unit running CIUMon is in the Setup List. If it is not, then enter all the correct information in the appropriate fields. Edit the IP Address to point at the unit running CIUMon and click the Insert button; the changes will be reflected in the Loop Setup List. If you are running an SPM02 type of CIU, you will have to enter in the specific PCU that the CIU is connected to; if your CIU is of any other type, you can leave the PCU field blank (for example, in our setup Loop 1).

The Port Number is the port that is specified in CIUMon's configuration settings for the particular loop you are defining. The Local CIULink Port is the port that CIULink will actually bind to to send its requests out and listen for responses on. It is best to leave this option blank and let CIULink check for the first available port within the specified range. For the majority of cases, it is fine to leave the default port range of 5000 to 5100. However, if you need to communicate across a firewall, only specific ports may be left open for communication so you will need to modify the range to suit your needs.

If you have more than one loop running, continue entering all valid configurations and click Insert to add them to the Setup List. Once all additions and modifications have been completed, click on OK to finish.

With both CIUMon and CIULink running, you can now begin running the application from which you wish to view the data.

Running CIULink as a Viewer

Configuring CIULink

CIULink on its own can be used as a viewer to observe outputs for various points in the system. If you have not run CIULink before, proceed through the following steps to ensure proper performance. After opening up the program and setting up the IP Address as explained above, the next step is to tell CIULink from which database files to get the correct module information. By selecting Tag Monitoring from the menu and choosing Enter Database File Names, the following window will appear:

Image:ciulink 2.png

You can browse for the correct database files for which you are working on; when you have found and selected the correct file, click the Add button and the full path for the file name will appear in the Current Database File Selection area of the window. Add all the appropriate database files for your system to the list to ensure that all points will be covered. If you have made an incorrect choice, just click and highlight the incorrect file in the Current Database File Selection area and choose Delete; this will remove the database from the CIULink monitoring. When you are satisfied with all your choices, choose Close.

Note: Databases selected have to be in .dbf format. If the original format is not .dbf then select the databases extracted during the build process – these can be found in the TAG subfolder of the project directory.

Adding Points for Monitoring

The next step is to tell CIULink which points you wish to monitor. Again, by choosing Tag Monitoring from the menu and selecting Tag Name Lookup, the following window will open:

Image:ciulink 3.jpg

Continue adding all of the points you would like to monitor. Should you wish to remove a point from the monitoring list, select the point in the Results box and click Delete. When you are finished, click Close to continue.

Set Update Interval

Choose the interval at which to monitor the points by choosing Set Update Interval from the Tag Monitoring option on the menu. Another window will open with a section where you are able to set how frequently you wish for points to be monitored. It can be entered in values of hours, minutes, seconds or a combination of all three.

Image:ciulink 4.jpg

Selecting Viewing Options

You are able to choose the way in which the data on your selected points is displayed on the screen. Choose View from the menu and select either Debug View or Export View; a checkmark will appear beside your chosen view.

Image:ciulink 5.jpg


Debug View

In this particular view, data is displayed as a series of requests that CIULink puts out to CIUMON and the responses it receives back. The outgoing messages are shown in blue and incoming responses are shown in green.

Image:ciulink 6.png

In this example, we are requesting information for Module 1,01,01 Block 1591 and Module 1,01,01 Block 4140 and have subsequently received three responses back from CIUMON with outputs from those points in our system.

Export View

In this view, data is shown in a tabular format and its saved log is more compatible for import into other applications, such as Microsoft® Excel. The log that is created from this view (discussed below) uses commas as delimiters to distinguish between the different columns.

Image:ciulink 7.png

Here, the responses are shown for Blocks 1591 and 4140. In this particular case, we are requesting data every 1 second; the timestamps reflect the response time of the first and last data points received. If a response has not been detected by CIULink by the time the next response is to be sent, MISSING will appear in the respective data position. Note: Additional data points may be added while monitoring; however, deletions are not allowed until monitoring has stopped.

Monitoring data points

To start monitoring, select Monitoring from Tag Monitoring on the menu bar. A check mark will appear beside the option when CIULink is in monitoring mode. To stop monitoring, again select Monitoring from the menu; the check mark will disappear and monitoring will cease.

Creating a Log File

In some cases, you may wish to log the responses from the network for the data points you are monitoring for future reference or manipulation in some other application. You can create a log of past responses or log responses as they are received by CIULink.

By selecting Logging then Log Data from the menu you are presented with the following choices:

Image:ciulink 8.jpg

Log New Data as It Arrives

This option allows you to log data continually as responses come in until you turn logging off. The Log Data selection in the Logging option on the menu will appear with a check mark beside it to indicate that continuous logging is being performed. To turn this off, just select this option again from the menu; the check mark will disappear and writing to the chosen file will stop.

Log Data Already Collected

Choosing this option allows you to create a log of responses CIULink has received. You can either choose All lines to log all lines that have been collected so far or choose to enter a custom value for the most recent number of lines.

Image:ciulink 9.jpg

This will show you the present number of lines available for printing and allow you to enter the number of lines you wish to write to your log; in this case, there have been 1391 responses received by CIULink since monitoring has begun. (Please note that the buffer has a maximum of 10000 lines; any monitoring beyond that will result in the earliest data being lost for logging and display.) Enter the number of lines which you wish to write to the log and click on OK.

Choosing where to save logged data

You are required to choose a path in which to save your logged data. If you know the path you wish to save data to you can type it in manually.

Image:ciulink 10.jpg

Hitting the Browse button will let you navigate to a directory where you wish to save your data to. An example of the Browse dialog box is shown in the image below.

Image:ciulink 11.jpg

Once you have chosen a directory to log your data to it will be saved to a file in the directory specified.

If you are in Export View your data will be saved to a CSV (Comma Separated Values) file. This data displays very nicely in Microsoft® Excel. The default name for your log file is as follows:

CIULink_<Taglist Name Being Monitored>_<Date if option is chosen>.csv

For example,

CIULink_Bichem Tag Set_2-26-2008.CSV

To have the date appended to your filename, click the Append the date to the log's filename.

The Reset button sets the path in the textbox back to the default and also selects the Append the date to the log's filename checkbox.

There is an additional option at the bottom of the dialog box, Delete all existing data from the specified log file. Checking this option will clear all values present in the log file selected.

Logging Options

Clicking the Logging Options button will allow you to have more control over your logging. An example of the dialog box is shown below:

Image:ciulink 12.jpg

At the top of the Logging Options dialog the directory and filename of the file being logged to are shown.

Log File Size is the next section shown on the screen. Entering a number in the box will set a maximum size for your log file. Your values will stop logging to this file once it reaches the maximum size you have specified. If you would not like to set a maximum file size for logging you can click the Check here for unlimited logging.

The Export View Logging Options are applicable to Export View only. They let select or deselect data to be included in the log file.

Loading, Saving and Deleting Tag Lists

You may have instances in which you wish to monitor different sets of points at different times. CIULink allows you save different lists of points so that you do not have delete and enter your different points each time you want to switch between data points. You can also export your list of points so that you can view them on another computer, or in Hyperview's Watch Window. All of the tag list options are located under the File menu.

Specify the points you want to monitor in CIULink with the Tag Name Lookup option under Tag Monitoring.

Save your points to different lists and load the appropriate one for viewing when desired. After you have entered in a set of points using the Tag Name Lookup dialog, save them in a list by selecting Save Tag List from under the File menu.

Image:ciulink 13.png Shows the name of the currently loaded list at the top as well as highlighting it in the list. Choose an existing list name to save your current set of points to or type in a new name in the edit box provided.

Switch between sets of points by selecting File | Load Tag List. This option will only be enabled if you are not currently monitoring in CIULink. Choose the appropriate tag list from the list that appears in the dialog. There is a special option in the list named (Blank Taglist) - this will let you start a fresh blank tag list in CIULink.

Delete obsolete lists of tags with the Delete Tag List menu option. Again, this option will only be enabled if monitoring is turned off.

Image:ciulink 14.png Choose the list that you want to delete and click the Delete button. The actual deletion of the chosen list(s) does not occur until you press the OK button.

On all tag list dialogs is the Review List button that gives you the chance to see what points have been included in a particular list. Highlight the name of a tag list in a given dialog box and click the button. Another window will open up showing the points contained within the chosen list:

Image:ciulink 15.png


Export Tag List

You can save any of your tag lists to a file so that you can take them to another computer or import them in Hyperview's Watch Window. There are two ways to export your tags:

  1. If you want to export the tags that you are currently viewing, select the Export Current Tags option from under the File menu.
  2. Launch either the Load Tag List or Save Tag List dialog and select the tag list that you want to export from the choices that appear. Click the Export Taglist button.

In both instances, CIULink will launch the standard Windows Save As dialog to let you specify the location and filename to which to save the tag information.

Import Tag List

To import a tag list on a different computer, start up CIULink and select the Import Tag List option from under the File menu. The following dialog will appear:

Image:ciulink 16.png

Learn about importing a tag list into Hyperview's Watch Window.


Significant Digits

Specify the number of significant digits that you want in the display in Export View. Select Set Significant Digits for Export View from the Tag Monitoring menu and enter the appropriate number of digits in the dialog box that appears. You can enter 0 (zero) to remove the significant digit specification.

Image:ciulink 17.png

For example, if we enter 3 for our significant digit specification, then in our Export View the value "1329" will appear as "1.33E+003".

Begin monitoring by selecting Monitoring from the Tag Monitoring menu. A checkmark will appear beside the option if monitoring is on.

Check here to have no limit on significant digits: Selecting this option will not limit the amount of digits collected by CIULink.

Running from Microsoft® Excel

Creating a new workbook

In Excel, click in the cell that will be displaying the data and initiate the DDE function. For example, to observe the output from Module 1,01,02 Block 4185, enter the following formula into the cell:

=CIULink|Output!'Module 1,01,02 Block 4185'

If both CIUMON and CIULink are running, Excel will begin displaying the data requested. It is important to note that the syntax of the DDE function must be entered exactly as shown above in order for the link to work.

Export lists from CIULink and import them into Excel

CIULink can automatically create a file that you can open in Excel to monitor your data.

To create a file to monitor the points that you are currently looking at in CIULink, from the File menu, select Save Current Tags to Excel DDE File and choose a location for your file. When you open that file in Excel, you will see data automatically appear for your points.

If you would like to create a file for one of your saved tag lists, instead of the tags you are currently looking at, simply select either Load Tag List... or Save Tag List... from the File menu, highlight the tag list that you want to look at in Excel, and press Excel DDE Export.

Running from a workbook with existing DDE function

If you have previously created an Excel workbook with the correct DDE function call(s) in it, upon re-opening the workbook the following window will appear:

Image:ciulink 18.gif

Again, with both CIUMON and CIULink already running, clicking on "Yes" will begin the updating of the data requested.

Running from Microsoft® Access

One way to view the data in Access is to create a form with the text control that has a DDE function as its control source. For example, to observe the output from Module 1,01,02 Block 4185, enter the following formula into the Control Source< /strong> line of the properties for the text box:

=DDE("CIULink","Output","Module 1,01,02 Block 4185")

When the form is opened, the data requested will be updated in the text box, provided both CIUMON and CIULink are running. For the link to work, make sure that the DDE function call is entered in the same syntax as shown above.