Subscribe to CMM Quarterly



Sponsored Links

  • JoomlaWorks Simple Image Rotator
  • JoomlaWorks Simple Image Rotator
  • JoomlaWorks Simple Image Rotator
  • JoomlaWorks Simple Image Rotator
Datapage Macro Creation
User Rating: / 0
PoorBest 
Written by James Mannes   

A request from one of our customers started me on this project. What they wanted to see was a “real time” statistical process control (SPC) program for their critical characteristics. So with that being the underlying emphasis, I consulted with my PC-DMIS colleagues on the best approach to doing this with the tools I have. I was able to utilize DATAPAGE to get the necessary end result. As stated at Wikipedia.com,

An X-bar/R chart is a specific member of a family of control charts. A control chart is a tool used in quality control, specifically SPC or statistical process control, as originally developed by Walter A. Shewhart at Western Electric in 1924 to improve the quality of telephones.


A control chart is a plot of measurements of a product on two special scales, usually located above and below each other and running horizontally. X-Bar/R charts consist of two charts, both with the same horizontal axis denoting the sample number.

The vertical axis on the top chart depicts the sample means (X-Bar) for a series of lots or subgroup samples. It has a centerline represented by Xdoublebar, which is simply the overall process average, as well as two horizontal lines, one above and one below the centerline, known as the upper control limit or UCL and lower control limit or LCL, respectively. These lines are drawn at a distance of plus and minus three standard deviations (that is, standard deviations of the sampling distribution of sample means) from the process average. In practice, tabulated constants are available to determine the control limits, or they are automatically calculated by the SPC software used.

The bottom chart has the range (R) of each subgroup plotted on the vertical axis. Like an X-Bar chart, R charts have a centerline and two control limits. However, for sample sizes below 7, the LCL is zero.

The purpose of any control chart is to help determine if variations in measurements of a product are caused by small, normal variations that cannot be acted upon ("common causes"), or by some larger "special cause" that can be acted upon or fixed. The type of chart to be used is based on the nature of the data.

The X-bar/R chart is normally used for numerical data that is captured in subgroups in some logical manner – for example 3 production parts measured every hour. A special cause such as a broken tool will then show up as an abnormal pattern of points on the chart.
Author unknown "X bar/R chart." Wikipedia  11 Jan. 2010
http://en.wikipedia.org/wiki/X-bar/R_chart

First Datapage must be opened. Second, the intended database must be opened…

Once the database is opened, the next step is to open the Macro creator. This is found under the OPTIONS|MACRO MODE command…

When Macro mode is opened a new macro is automatically started…


The next step is to then begin the process of learning the keystrokes that you want to have in the new macro. To do this the software must be instructed to go into “learn” mode…

At this point the programmer simply begins using Datapage as they normally would. The intended chart type is a Multi-chart, so once that is opened, and the feature and dates are chosen, that information is stored in the macro along with the command to print the chart …

The next step in the creation of the macro requires more of a “hands on” approach. In order for the macro to close the multi-chart and Datapage, the verbiage must be typed in. So when finished the code would look like this…

The macro is then saved to wherever the programmer decides and then is inserted into PC-DMIS.


A final note, in the creation of the macro the option to use the last 30 parts was chosen. When the code is inserted into PC-DMIS a STATS/UPDATE command is inserted first. This allows the last running of the program to be included in the multi-chart that is created next.

This is a breakdown of the actions required to create the macro…

DATAPAGE ACTIONS
OPEN DATATAPAGE
OPTIONS>MACRO MODE
EDIT>LEARN MODE
CREATE CHART/ REPORT>PRINT>CLOSE>QUIT>SAVE

PC-DMIS ACTIONS


At the end of the program, open up a new line and type….
 

EXTERNALCOMMAND/NO_DISPLAY, NO_WAIT; C:\DataPage 3.33\datapage.exe  -dZ:\HARLEY Z:\33285_07B_H1.MAC

What this command does is insert an external command to stop the processes in PC-DMIS,  go to an external source, and perform a set of instructions or commands. This line is described below…

EXTERNALCOMMAND/NO_DISPLAY, NO_WAIT; C:\DataPage 3.33\datapage.exe  -dZ:\HARLEY Z:\33285_07B_H1.MAC

EXTERNALCOMMAND/NO_DISPLAY, NO_WAIT ; C:\DataPage 3.33\datapage.exe  -dZ:\HARLEY Z:\33285_07B_H1.MAC

…and the result is an X-bar/R chart being printed at the end of the program. This allows for operator interaction, in that they can review the results for out of control conditions and take action.

 

 

 

Advertisement