beautypg.com

2 mplogger and vba – Yaskawa MP900 Series MPLOGGER User Manual

Page 80

background image

5 Application

5-4

5.2

MPLOGGER and VBA

MPLOGGER runs on the Excel platform. Very high quality graphics can be created using VBA
and other Excel tools. Some application examples are presented here.

„

Changing from Numerical Values to Character Strings

A system can be set up to detect the operating status of a controller and display it in a cell.
By incorporating a macro to create a reference lookup table, the data output to the cells can
be converted from numerical values to character strings. Using the Excel conditional format-
ting function, character style and cell color can also be changed.

„

Displaying a Trend Graph

1. The easiest way to generate a trend graph is to use the functions of the controller pro-

gram. First, secure a storage area for the latest data in the controller memory (e.g., 100
items) and place the trend data in it using the controller program.
MPLOGGER can read in this data area (100 items) using the block setup function, and
generate a graph using Excel functions to create a real-time trend graph.

2. If the trend data cannot be stored using the Controller program, Excel VBA can be used.

MPLOGGER reads in the latest data into cells and VBA can be used to periodically
move it to a cell area where the trend data can be viewed. Periodic processes can be cre-
ated using the one-shot timer function in VBA.
By making the trend data into a graph, the real time trend can be monitored.

„

Creating a Historical Trend

By specifying the range of trend data in MPLOGGER data logging function, a historical
information MDB file can be created for each day. Excel uses SQL to access these database
records and displays the extracted data in cells for viewing or for generating a historical
trend graph.

This manual is related to the following products: