232key Pro version 0.9.0 released

This version introduces two new variables which are made available to your script. When 232key Pro receives data from the connected device, it tries to match a regular expression. The string matched by the first capturing group is stored in a variable named value.

The following additional variables were introduced in this version:

  • valueDouble: contains the value string converted to a Double or null if no conversion was possible.
  • valueDecimal: contains the value string converted to a Decimal or null if no conversion was possible.

Example

Data received from the scale:

Requesting the weight from a scale with the MT-SICS "SI" command

S S      5.000 kg<13><10>

Captured in value string:

      5.000

Script to output the weight only if it is greater than 0.1 kg:

if (valueDecimal>0.1m) return valueDecimal.ToString();

Output (note: valueDecimal preserves any trailing zeros, valueDouble does not):

5.000

 

Leave a Reply

Your email address will not be published. Required fields are marked *

The maximum upload file size: 7 MB. You can upload: image. Drop file here