232key version 2022.1 released

A new release of our popular virtual keyboard wedge software 232key is now available for download.

It contains the following newly added device profiles:

All of these profiles are available in the free and paid versions.

How to start 232key automatically

Our 232key software is a simple solution to transfer the weight from a scale to any application as simulated keystrokes. To start 232key automatically with Windows when a user signs in, please follow these steps.

1. Place a shortcut to 232key in the Windows Startup folder

1.1 Open the Windows Startup folder.

Press the Windows key and R and enter “shell:startup”:
shell:startupThis will open the Startup folder in Windows Explorer:
Windows Startup folder

1.2 Open the 232key program directory

Press the Windows key and R and enter “shell:programfilesx86”:
Windows Program Files x86 directoryIn the new Explorer window that opens, click on the Name column to sort by name:
232key program folder

Double-click on the 232key or 232key MU directory (depending on the installed version). You can now see the 232key.exe application file:
232key program folder open

1.3. Create the shortcut

Hold the Alt key, then click on 232key.exe and drag it to the Startup folder you opened in step 1.1:
create link (shortcut) in startup folderThis creates a shortcut to 232key. 232key will now be started automatically with Windows when the user signs in.
Shortcut in Startup folder

2. Configure 232key to connect to your scale automatically

In 232key, the user normally must press the Start button to connect to the scale. In the paid Plus version, you can configure 232key to connect automatically when the program is started by selecting Start: Auto in the Settings tab:
Settings tab in 232key Plus

See the 232key documentation for further information.

By starting 232key automatically and also connecting to the scale automatically, user intervention is no longer required.

Note: Please ensure your scale is switched on before 232key is started.

How to capture only the end result from a Mettler Toledo H53 Moisture Analyzer with 232key

Real-life example: Moisture Analyzer

One of customers wanted to capture the end result from his Mettler Toledo H53 moisture analyzer using our 232key software. However, the moisture analyzer sent a lot of data at the end of the moisture determination process:

14:08:42 Port opened: COM3 Bitrate: 9600 Data bits: 8 Stop bits: 1 Parity: NONE
...
14:08:45 -MOISTURE DETERMINATION-<13><10>
14:08:45 METTLER TOLEDO<13><10>
14:08:45 Type             HE53/01<13><10>
14:08:45 SNR           B123456789<13><10>
14:08:45 SW                  1.13<13><10>
14:08:45 <13><10>
14:08:45 Drying Prog.       Rapid<13><10>
14:08:45 Drying Temp.      130 <29>C<13><10>
14:08:45 Switch-Off          Auto<13><10>
14:08:45 Display mode         %AM<13><10>
14:08:45 <13><10>
14:08:45 Start Weight   0.637 g  <13><10>
14:08:45 <13><10>
14:08:45 Total Time      4:20 min<13><10>
14:08:45 Dry Weight     0.604 g  <13><10>
14:08:45 End Result      5.46 %AM<13><10>
14:08:45 <13><10>
14:08:45 Date: ..............<13><10>
14:08:45 Time: ..............<13><10>
14:08:45 <13><10>
14:08:45 Comment: ...............<13><10>
14:08:45 Signature: .............<13><10>
14:08:45 – ----- – END – --------<13><10>
14:08:45 <13><10>
14:08:45 <13><10>
14:08:45 <13><10>

Our customer was only interested in the end result (5.46 in the example above), but 232key captured and typed all the numbers it could find, resulting in the following output:

531234567891.131300.63740.6045.46

Regular Expressions to the rescue

Our software includes a powerful tool for such cases: regular expressions. Don’t worry, you don’t have to learn about them in detail. You can simply send us the data received from your device as displayed in the Event Log of our software (as shown above) and we’ll assist you. However, in some cases, all it takes is a small modification.

If you go to the Input tab in 232key and click on the Customize button, the currently used regular expression will be displayed:

Regular Expression in 232key MU

For the “Generic measuring device” and many other device profile, it looks as follows:

([-+]?\s*[0-9]*[\.,]?[0-9]+)

This regular expression captures the first number it encounters in each line of data. If you want to capture only the data of a specific line and ignore all others, look at what makes it unique. In this case, we could use the words “End Result”. Simply inserting them at the beginning, followed by “\s+” (which stands for “one ore more whitespace characters”) ensures that 232key only captures the number following these words:

End Result\s+([-+]?\s*[0-9]*[\.,]?[0-9]+)

That’s all it takes in this case. Alternatively, we could use the “%” character appearing at the end of the “End Result” line. As there’s no other line in the report where a number is followed by a percentage sign, the following regular expression also works (and will continue to work even if the user changes the language of the report):

([-+]?\s*[0-9]*[\.,]?[0-9]+)\s+%

Regular expressions are available in 232key Plus, 232key MU, 232key Pro and our Simple Data Logger software.

232key version 2020.1 released – Radwag and Mars Scale profiles

Version 2020.1 of our free virtual keyboard wedge software 232key is now available!

Improvements in 232key version 2020.1

  • New device profiles for Radwag scales and balances and Mars Scales.
  • UI and accessibility improvements (you can switch between tabs and trigger the start/stop button using an Alt + key combination).
  • We fixed a bug which prevented the import* of a previously exported configuration file. This problem only appeared when more than one license had been applied to the software and when the second or a later license had expired.
  • We’ve included many new keys which 232key can now press before* or after the measurement value:
    232key additional keys to press before measurement value

Download the 232key installer now or visit 232key.com for further information.

* This functionality requires a paid 232key Plus license.

Are you a manufacturer and would like us to include a profile for your devices?

Please contact us and provide us with the following pieces of information:

  • Default connection parameters: bit/s, data bits, stop bits, parity.
  • Terminator (last character in each line of data).
  • An example of the data transmitted (in ASCII and hexadecimal form).
  • Optional: The command used to trigger the device to send the data (this is supported by 232key Pro and Simple Data Logger).
  • Optional: Short instructions to be displayed to the user (e.g. “set communication mode to ‘PC'”).
  • Is this information valid for all your devices?

Note: We’ll try our best, but we cannot guarantee that all submissions will be included.

232key version 2019.1 released – SMA Scale Communication Protocol

Version 2019.1 of our virtual keyboard wedge software 232key is now available.

* This device profile requires a Plus license. Please contact us for trial licenses.

  • Bug fixed: Function keys set under “start with” were not working correctly.

Are you interested in reselling our software? Click here for further information and to apply for a reseller account.

232key version 2018.1.4 released – includes flow control support and new profiles for Mettler Toledo and Sartorius balances

Version 2018.1.4 of our virtual keyboard wedge software for devices with RS-232 interface is now available and includes the following new features:

  • Flow control (handshaking) functionality (XON/XOFF software flow control and RTS/CTS hardware flow control):
    Flow control (handshaking): RTS/CTS and XON/XOFF
  • Device profiles: Mettler Toledo (MT-SICS), Sartorius (SBI), Sartorius (SICS), Denver Instrument.
  • Previous “Sartorius” device profile renamed to “Sartorius (legacy)” and modified to set flow control to “RTS/CTS” automatically. This profile works with older Sartorius balances which require hardware flow control.

These improvements were possible thanks to the feedback from our customers.

How to write the date, time and weight from your scale to Excel

For this article we assume that your scale is equipped with an interface and that it sends the date, time and weight in the following format:

Date 10/30/2018
Time 11:58:45 AM
Gross 376.5 g

We present two methods for transferring these values to Excel.

1. Use a keyboard simulation (virtual keyboard wedge)

You can use our software 232key to enter the values into Excel (or any other application) as if you had typed them on your keyboard. However, by default, 232key captures the first number in each line, which means it would only type the values shown in blue:
Date and time partially captured, weight captured completely

While the weight has been captured correctly, the date and time are incomplete. This can be fixed in 232key Plus as follows.

1. In the Input tab, set the device to “Barcode alphanumeric extended*:
Barcode alphanumeric extended

This enables 232key to type all printable ASCII characters including the slash and colon we need for the date and time.

2. Modify the regular expression 232key uses to capture data by clicking on the Customize button. Replace the existing expression with the following one:

\s*(\d+/\d+/\d+|\d+:\d+:\d+\s[AP]M|[-+]?\s*\d*.?\d+)

This expression will capture the date, time (in 12h AM/PM format) or weight. This only works if the values are transferred in individual lines, as in our example.

3. In the Output tab, instruct 232key to send “TAB” after the two first values and “Enter” after the third one:
Write values in three columns

232key will then write the date, time and weight in separate columns and jump to the next row:
Date, time and weight in Excel

2. Write the weight to a file (with date and time) and later open it in Excel

As an alternative to the “keyboard simulation” method described above, you can use our software Simple Data Logger (SDL) to write the weight to a file. This file can later be opened in Excel (or other applications).

This approach has two advantages:

  • Other keyboard operations can’t interfere with data acquisition and
  • Excel does not have to be open and running in the foreground (it does not even have to be installed on the same computer).

It is therefore particularly suitable for long-running unattended operations.

Concerning the date and time, you have two options when using SDL: Use the computer’s date and time or use the date and time sent by your scale.

a) Use the computer’s date and time

You’d usually choose this option if your scale only sends the weight or if the date and time format used by your scale does not match your requirements.

1. Choose a file in the Output tab in SDL. Click on the Set values button to set the default date and time formats (you can also directly modify the format strings, e.g. to use a 24h time format):
Time and date format

2. To make sure that only the weight is captured (and not the date and time sent from the scale), go to the Input tab, click on the Customize… button and add “\s*g” to the regular expression:
Capture weight in grams

Now, only values expressed in grams [g]  will be captured:
Weight in grams captured (shown in blue)

3. Even though they’re not captured, the other two lines sent from the scale (date and time) will still be written to the file as empty lines. In SDL Plus, we can combine all 3 lines into one row in the Process tab:
Combine 3 lines into one row

The CSV file generated by SDL can later be opened in Excel by simply double-clicking on it:
Excel with computer date/time and weight

As mentioned above, the two empty columns preceding the weight appear due to the date and time values which were sent from the scale, but were not captured. You can simply delete them.

b) Using the date and time sent by your scale

The procedure is very similar to what we did with 232key above.

1. In the Input tab, set the device to “Generic text device” to prevent SDL from treating the captured values as numbers:
Generic text device

2. Replace the regular expression by clicking on the Customize… button:

\s*(\d+/\d+/\d+|\d+:\d+:\d+\s[AP]M|[-+]?\s*\d*.?\d+)

This will ensure that the date, time and weight values sent by the scale are all captured.

3.  In the Process tab, combine the 3 lines sent from the scale into one row (functionality only available in SDL Plus):
Combine 3 lines into one row

4. In the Output tab, make sure that the date and time are set to “None” (unless you also want to add the computer’s date and time to each row):
No date and time added

The event log in SDL shows that all three values were captured:
Simple Data Logger event log: with date time weightThe resulting file contains the date, time and weight sent from the scale neatly written into 3 columns:
Scale date, time and weight in Excel

Links and further information