Connecting an electronic gage to SPC Express can be very simple. SPC Express allows
sample information to come from:
- the keyboard,
- a serial communications port (1-6),
- a txt file (click for more info), or
- a DDE exchange.
This page deals with interfacing through the serial communications port (Comm port).
SPC Express requires that each sample value received from a gage be contained
within a data transmission from the gage. This data transmission
(hereafter referred to as a "record") should be ASCII data
and be terminated with a Carriage Return [CR].
Each record should contain one sample value and an optional ID field.
The ID field may be used if readings will be sent that belong to different characteristics.
In this way, various readings can be "routed" to the correct characteristic on the screen.
As each record is received by the computer, SPC Express looks for the sample value and
puts that reading into the next empty sample field of a subgroup entry form that is
in the "new" mode. If a Gage ID has been specified (see below) then the sample value will
be place into that subgroup only if the Gage ID matches. As soon as the last sample for that
subgroup is received, the subgroup is saved to disk and also charted if a graph for that
characteristic is open on the screen.
THE BASICS:
- First go to the "Input Options" Tab on the Edit Characteristic screen.
- Set the Comm Port to 1, 2, 3, 4, 5 or 6.
- Be sure that the Baud Rate and Parity on the screen match your gage.
- Define where the sample value appears within the record from the gage.
- Define a Gage ID (15 characters max) if the gage is sending something unique that you want to match on.
- Define where the Gage ID (if any) appears within the record from the gage.
ADVANCED FEATURES:
- Specify a Minimum and Maximum Record Length. This can be used to help
verify that a valid gage transmission was received. (Use zeros to skip checking.)
- Specify a Formula to be performed on the incoming sample value. There are several
math formulas and other functions that may be applied. For example:
- *2.54 would take the reading that was received and multiply it by 2.54
- MIN=1.2, MAX=1.4 would filter out gage readings that fell outside these limits.
This is sometimes referred to as "reasonableness checking".
- -[nnn] would subtract the contents of a traceability field named "nnn" from
the incoming gage reading.
- ##LotNumber##101A## would cause the value "101A" to be placed into the
traceability field named "LotNumber". A record may contain traceability data or
sample data but not both.
- #P001 would use the incoming reading and also "Publish" it as Tag 001 so that other
windows may use this value
(used to perform inter-window math Click for details ).
- +{001} would add the value that had been "Published" as Tag 001
(used to perform inter-window math Click for details ).
Also, {00n:F} and {00n:L} for First and Last Readings.
For example: If Window 1 is using a Difference function and Window 2 is
using an Average function, then the formula +{001:F} -{002:L} will
add the FIRST reading of the series from Window 1's #D function, then
it will subtract the LAST reading of the series from Window 2's #A function.
- Other functions include:
+ - * / +[FieldName]
@ABS @MAXTRUE4 @MAX2 @SQR
#Annnn #Dnnnn #MINnnnn #MAXnnnn #LASTnnnn
#G #T:ARCTANGENT #T:HYPOTENUSE ^2 ODD EVEN
NETNEXTSG RATIONEXTSG RATIONEXTSGI
NETPERCENTNEXTSG NETPERCENTNEXTSG1 NETPERCENTNEXTSG2
NETPERCENTNEXTSG3 NETPERCENTNEXTSG4
POPUP=WARN POPUP=DENY ALLOWVOIDS
{00n:F} {00n:L} CopyRaw AlwaysHot AutoSynch
These are all explained in more detail
in your User Manual and New Features Section.
- Other uses for GageID:
- GageID field = Burst:1, Burst:2, Burst:3, etc. (up to :99)
This is useful when your gage sends multiple readings in a "burst" and no identifying ID information is provided.
For example, if your gage sends:
1.125
2.356
3.105
and you want these 3 readings to go into 3 different characteristics,
then specify the following GageID's for the 3 characteristics: Burst:1, Burst:2, Burst:3
(Note: GageID Position should be set to 1)
It is assumed that this burst of readings will come in fairly quickly. If nothing new is received for 3 seconds,
the burst sequence starts over.
- GageID field = M:01,02,003,DIA4
Allows Multiple GageID's so that a window can take readings from up to 4 different gages (but they
must all be coming in through the same Comm Port).
- GageID field = "quoted string "
Allows the user to put (double) quotes around the GageID to help visualize trailing spaces, if any.
Trailing spaces have always been allowed and worked fine, but just difficult to see.
- GageID field = ~02~03~07~08" (This example assumes your readings are coming from GageID's 02, 03, 07, and 08)
This is used in conjuction with the Formulas: @MAXTRUE4 and @MAX2
EXAMPLE:
Let's say your data from your gage looks like this:
01 1.6125 inches DIA [CR]
12345678901234567890
(the above numbers are a "Ruler" and are shown for ease of counting)
Starting from the left, count the number of characters and you will see that
the sample value (1.6125) starts in byte position 4 and is 6 bytes long (see Note 1 below).
Enter this information on the Input Options screen.
The Gage ID (DIA) starts in byte position 18 and is 3 bytes long.
So enter 18 for the GageID Starting Byte and set the GageID to DIA.
Then only records containing the letters "DIA" will be accepted into this
characteristic.
Note 1: You can alternatively specify a 'field number' instead of a byte number by adding 700 to the field.
For example, if your sample is in the 3rd field, specify 703 for the position of the sample.
(Fields would usually be separated by commas.)
TROUBLESHOOTING:
- If you're having trouble reading your gage, try running the MMS Communications Utility, MMSCOMM.EXE.
It is on your Start menu, under SPC Express for Windows.
Or better yet, run the Communications Test Utility.
It is located on the "Input & Conversion" Tab of Global Preferences.
This will let you try different baud rates, parity, etc. and see what the gage is sending.
There is a 'ruler' at the top of the Utility
screen that will help you count how far over the Sample Value and GageID fields (if any) are.
- In rare cases, the Comm Utility will be able to read your device but SPC Express won't.
If that is the case, check to see if your system has a file called MSCOMM32.OCX and that it is registered.
You want the file dated 6/24/1998, NOT the one dated 8/21/1995.
Download MSCOMM32.OCX (06/24/1998)
(Save in windows system folder and register using REGSVR32)
- You can also enter TRACE=1 in the Formula field.
This will show you step-by-step how SPC Express is trying to handle your gage input.
- It is also a good idea to turn on "Show gage data on StatusBar" in the Global Preferences.
OTHER USEFUL INFO: