With the Measure Serial Add-in for Microsoft Excel, you can control instruments and acquire data with the serial communications port on your computer directly from Microsoft Excel. With Measure, you can control any instrument with an RS-232 or RS-485 interface, such as electronic balances, meters, analyzers, calipers, and remote I/O modules.
You configure instrument settings, such as COM port connection, baud rate, data bits, and so on, with easy-to-use dialog boxes. Then you can create specific serial tasks to send or capture serial data from a connected instrument. You can also specify parsing algorithms, so you keep only the data that you want and discard the rest.
Click on the arrow button to continue.
!
BEGIN_TEXT
!
Introduction
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
SERDEMO2.AVI
0
1
2355
3390
5625
2205
0
0
0
0
BEGIN_TEXT
You access the Measure Serial Add-in through the Serial menu, which automatically appears in your Microsoft Excel menu bar when you install Measure.
Pull-down the Serial menu and select Instruments to configure a new instrument.
!
BEGIN_TEXT
!
Configuring an Instrument
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_U1R.BMP
ARR_U1_.BMP
36
494
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
5
4470
3705
5625
2205
0
0
0
0
BEGIN_TEXT
From this dialog box, you can configure Measure with serial communications parameters for controlling your particular serial instrument.
Click on the New button to configure a new instrument.
!
BEGIN_TEXT
!
Configuring an Instrument
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_R1R.BMP
ARR_R1_.BMP
235
52
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
7
4665
3870
5625
2400
0
0
0
0
BEGIN_TEXT
You can give your new instrument any name. For this example, you will simulate communication with an electronic balance.
Standard communication parameters, such as COM port, Baud Rate, Parity, Data, and Stop bits are all set from this dialog box.
Click on the arrow button to continue.
!
BEGIN_TEXT
!
Configuring an Instrument
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
SERDEMO2.AVI
0
8
5115
3975
5595
2010
0
0
0
0
BEGIN_TEXT
After you configure the communication parameters for your instrument, you can interactively test the connection to ensure that your instrument is operating correctly and communicating properly with your computer.
Click on the Test button to test the electronic balance.
!
BEGIN_TEXT
!
Testing Your Instrument Setup
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
10
3915
555
5595
2835
0
0
0
0
BEGIN_TEXT
From this dialog box, you can interactively send data to your instrument based on the settings you made in the previous dialog box. You can then read the serial port to see whether the instrument is responding properly.
The simulated scale returns its readout value when you send it a P followed by a question mark (?).
Enter "P?" in the Transmit input box and then click on the Send Data button to send this string to the balance.
!
BEGIN_TEXT
!
Testing Your Instrument Setup
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
14
3915
555
5535
1665
0
0
0
0
BEGIN_TEXT
Click on the Read Serial Port to read the response from the electronic balance.
!
BEGIN_TEXT
!
Testing Your Instrument Setup
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_U1R.BMP
ARR_U1_.BMP
234
434
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
16
4575
195
5640
2640
0
0
0
0
BEGIN_TEXT
You see that the balance is communicating properly with the computer. The balance returned a reading of 5.323 LBS. The data is encoded within a number of carriage return characters (\13), line feed characters (\10), and space characters (\32). Later, when you use this balance in Measure tasks, you will learn how to parse this response string to keep only the important information and omit carriage returns and line feeds.
Click on the OK button to continue.
!
BEGIN_TEXT
!
Testing Your Instrument Setup
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
18
4575
195
5370
1575
0
0
0
0
BEGIN_TEXT
Now that you have configured your electronic balance and tested its operation, click on the OK button to continue.
!
BEGIN_TEXT
!
Testing Your Instrument Setup
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
20
2055
3645
5490
1425
0
0
0
0
BEGIN_TEXT
Pull-down the Serial menu and select Tasks to configure a capture task for the electronic balance.
!
BEGIN_TEXT
!
Configuring Serial Tasks
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
24
4245
3030
5490
1425
0
0
0
0
BEGIN_TEXT
Click on the Capture button to define a capture task for the electronic balance.
!
BEGIN_TEXT
!
Configuring Serial Tasks
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_R1R.BMP
ARR_R1_.BMP
160
391
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
26
4350
555
4830
2520
0
0
0
0
BEGIN_TEXT
Now you will create a capture task to transmit measurement values from the balance. As you learned earlier, the balance will return its readout value after you send it the P? message.
Enter P? in the Transmit input box.
!
BEGIN_TEXT
!
Configuring a Capture Task
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_R1R.BMP
ARR_R1_.BMP
104
316
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
28
4095
3540
4830
2520
0
0
0
0
BEGIN_TEXT
Now you must decide where in your worksheet you would like Measure to store the value retrieved from the balance. You can enter a worksheet cell address, or simply click on a cell with your mouse to specify an input starting point.
Click on the cell A1 to specify the upper-left cell for holding the retrieved data.
!
BEGIN_TEXT
!
Specifying the Worksheet Range
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_L1R.BMP
ARR_L1_.BMP
119
85
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
30
4080
4665
4830
2520
0
0
0
0
BEGIN_TEXT
The balance sends a carriage return and line feed character to Measure to show that it has finished sending its data.
Click on the Define Fields button to specify a parsing algorithm that will keep only the important information from the balance response string.
!
BEGIN_TEXT
!
Specifying the Worksheet Range
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_R1R.BMP
ARR_R1_.BMP
385
57
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
32
4050
4140
4830
2520
0
0
0
0
BEGIN_TEXT
From this dialog box, you specify which data fields in the instrument response to keep and which fields to discard. You can parse strings based on field widths or field delimiters, such as commas or tabs.
Click on the arrow button to continue.
!
BEGIN_TEXT
!
Defining Fields
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
-1
3
0
0
SERDEMO2.AVI
0
34
3870
450
5055
3360
0
0
0
0
BEGIN_TEXT
The response string from the electronic balance can be divided into the following five fields:
1. leading carriage return and line feed characters
2. the readout value
3. two spaces
4. the unit of measurement for the readout value
5. trailing carriage return and line feed characters
For this example, you can use the width of each field to determine how the string will be parsed.
Click on the Width button to define each field by its character width.
!
BEGIN_TEXT
!
Defining Fields
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_R1R.BMP
ARR_R1_.BMP
134
376
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
36
4050
1845
5025
1980
0
0
0
0
BEGIN_TEXT
For each field, you can specify a character width and set a flag to include or exclude it from the worksheet.
Click on the arrow button to continue.
!
BEGIN_TEXT
!
Defining Fields
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
38
3900
15
4380
3195
0
0
0
0
BEGIN_TEXT
Now the parsing algorithm is complete. The initial carriage return and line feed characters are set up as Field 1, which is excluded from the worksheet. Field 2 contains the five characters that make up the actual balance readout value. This field will be placed in the worksheet.
As you can see, only two fields from the balance response string are kept: the readout value and the units.
Click on the OK button to continue.
!
BEGIN_TEXT
!
Defining Fields
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
40
3210
4755
4530
2115
0
0
0
0
BEGIN_TEXT
Now your capture task is complete. You have read values from the electronic balance and stored them in a worksheet cell.
Click on the OK button to continue.
!
BEGIN_TEXT
!
Defining Fields
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
42
2655
1275
4530
2115
0
0
0
0
BEGIN_TEXT
Notice that the Read Scale task is now available in the Task list.
Click on the Run button to test the Read Scale task.
!
BEGIN_TEXT
!
Running the Task
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
ARR_R1R.BMP
ARR_R1_.BMP
209
388
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
44
3030
390
4380
2940
0
0
0
0
BEGIN_TEXT
Your serial task is successful! Notice that two fields were placed in your worksheet, the readout value and the units for the readout. Making multiple measurements with this task is easy -- specify more cells in your worksheet, and the task will automatically fill them with balance readings.
Click on the Edit button to edit the Read Scale task.
!
BEGIN_TEXT
!
Running the Task
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
46
3960
3915
4485
2280
0
0
0
0
BEGIN_TEXT
If you would like to make ten consecutive readings from the balance instead of just one, you can select ten cells in the worksheet. The task will automatically take ten readings to fill the cells with data.
Click on the arrow button to continue.
!
BEGIN_TEXT
!
Specifying Multiple Readings
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
-1
3
0
0
SERDEMO2.AVI
0
48
3765
4725
4455
1740
0
0
0
0
BEGIN_TEXT
Now that ten cells are selected, click on the OK button to continue.
!
BEGIN_TEXT
!
Specifying Multiple Readings
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
50
3765
4725
4455
1740
0
0
0
0
BEGIN_TEXT
Click on the Run button to run the Read Scale task again.
!
BEGIN_TEXT
!
Specifying Multiple Readings
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
52
1965
3975
5340
2520
0
0
0
0
BEGIN_TEXT
Using these simple Measure dialog boxes, you can configure extensive serial communication transmit and capture tasks to control your instruments and acquire data over the RS-232 port in your computer. After you configure these tasks, you can add them to the Serial menu so anyone can quickly and easily invoke them to acquire data.
Click on the Serial menu to display the new task added to it.
!
BEGIN_TEXT
!
Running Tasks from the Serial Menu
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
SERDEMO2.AVI
0
54
2025
3585
5430
1935
0
0
0
0
BEGIN_TEXT
As you can see, the Read Scale task is now available under the Serial menu.
Click on the arrow button to complete this module.