dewesoft™ rs232 plugindewesoft™ rs232 plugin about this document 1 about this document this is...

27
DEWESoft™ Rs232 Plugin Document-Version: 1.2.1 www.dewesoft.com DEWESoft TM DEWESoft TM DEWESoft TM DEWESoft TM DEWESoft TM DEWESoft TM DEWESoft TM DEWESoft TM DEWESoft TM DEWESoft TM DEWESoft TM DEWESoft TM measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Upload: others

Post on 14-Mar-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin

Document-Version: 1.2.1

www.dewesoft.com

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 2: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232
Page 3: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Table Of Contents

Table Of Contents1 About this document.........................................................................................................................................................1

1.1 Legend......................................................................................................................................................................11.2 Compatibility...........................................................................................................................................................11.3 Files and Directories................................................................................................................................................2

1.3.1 Important DeweSoft 7 Directories..................................................................................................................21.3.1.1 DeweSoft Measurement Unit [recommended].......................................................................................21.3.1.2 Windows Standard..................................................................................................................................2

1.3.2 Important DeweSoft 6 Directories..................................................................................................................21.3.3 Links................................................................................................................................................................2

1.4 Licensing..................................................................................................................................................................31.5 Plug-in Installation...................................................................................................................................................3

2 Configuration....................................................................................................................................................................42.1 Hardware setup........................................................................................................................................................4

2.1.1 Connection settings.........................................................................................................................................42.1.2 Log files...........................................................................................................................................................4

2.1.2.1 Log levels................................................................................................................................................52.2 Channel Setup..........................................................................................................................................................6

2.2.1 Warnings..........................................................................................................................................................63 Protocol specification.......................................................................................................................................................7

3.1 Character escaping...................................................................................................................................................73.1.1 Automatic escaping.........................................................................................................................................73.1.2 Sequence input dialog.....................................................................................................................................83.1.3 ASCII Chars window.......................................................................................................................................83.1.4 Odds and Ends.................................................................................................................................................9

3.2 Packet format.........................................................................................................................................................113.3 Data format.............................................................................................................................................................11

3.3.1 Value format..................................................................................................................................................113.3.1.1 Decimal Separators...............................................................................................................................11

3.4 Format examples....................................................................................................................................................123.4.1 Comma separated values...............................................................................................................................123.4.2 Arbitrary strings.............................................................................................................................................13

4 Raw Data Channel..........................................................................................................................................................134.1 Max. Length...........................................................................................................................................................134.2 Escape sequences...................................................................................................................................................14

5 Testing the plugin............................................................................................................................................................145.1 Null-modem emulator............................................................................................................................................14

5.1.1 Installation.....................................................................................................................................................145.1.2 Checking the Installation...............................................................................................................................165.1.3 Renaming the COM Ports.............................................................................................................................17

5.2 Data emulator.........................................................................................................................................................185.3 Test-data in DEWESoft™......................................................................................................................................21

6 Version History...............................................................................................................................................................236.1 Plugin Version........................................................................................................................................................236.2 Documentation Version..........................................................................................................................................23

www.dewesoft.com Page I

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 4: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232
Page 5: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin About this document

1 About this documentThis is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1.

The Generic RS232 Plugin can extract numeric data from an RS232 data stream.You can specify the number of channels (aka. fields), the start-string, stop-string and field separator,decimal and thousands-separator.Example-stream: "$CSV,123;-123.12;1;4E10;\CR\LF"

1.1 LegendThe following symbols and formats will be used throughout the document.

IMPORTANTGives you a important information about a subject.

Please read carefully!

HINTGives you a hint or provides additional information about a subject.

EXAMPLEGives you an example to a specific subject.

Example Meaning Description

Cancel Button a button that you can clickFile Menu Item a menu item, will open a sub menu or a dialogTimes New Roman List Item an item in a list (or tree) that you can selectEvents Tab Sheet a tab sheet that you can selectC:\Program Files\OpenOffice.org 3\readme.txt File Path and Name a file name or path

Windows Key a term any kind of term (maybe also compound)

Table 1: Layout formats used in the documentation

1.2 CompatibilityThe plugin is compatible with DEWESoft 6 and DEWESoft 7.

It has been tested with the versions: DEWESoft 6.6.7 and DEWESoft 7.0.3.

Document-Version: 1.2.1 www.dewesoft.com Page 1/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 6: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 1About this document

1.3 Files and DirectoriesThe actual location of the directories on your computer may vary dependant on your computer's locale settings and the settings you chose when installing DEWESoft.

1.3.1 Important DeweSoft 7 Directories

1.3.1.1 DeweSoft Measurement Unit [recommended]Directory

nameExplanation Default path

Bin contains DEWSoft.exe D:\DEWESoft7\Bin\V7_0

Addons .dll files for plugins must be copied into this directory D:\DEWESoft7\Bin\V7_0\Addons

Data this is where DeweSoft will store your measurement data D:\DEWESoft7\Data

Setups this is where your DeweSoft setup files will be stored D:\DEWESoft7\Setups

System this is where DeweSoft project files are stored D:\DEWESoft7\System\V7_0

Log this is where DeweSoft will store log files D:\DEWESoft7\System\V7_0\Logs

1.3.1.2 Windows StandardIn this mode your system only needs one partition.

Directory name Default pathBin C:\Programme\DEWESoft7\Bin\V7_0Addons C:\Programme\DEWESoft7\Bin\V7_0\AddonsData user dependant directory:

C:\Dokumente und Einstellungen\All Users\Dokumente\DEWESoft7\DataSetups user dependant directory:

C:\Dokumente und Einstellungen\All Users\Dokumente\DEWESoft7\Setups

System user dependant directory:C:\Dokumente und Einstellungen\All Users\Dokumente\DEWESoft7\System\V7_0

Log user dependant directory:C:\Dokumente und Einstellungen\All Users\Dokumente\DEWESoft7\System\V7_0\Logs

1.3.2 Important DeweSoft 6 DirectoriesDirectory

nameExplanation Default path

Bin contains DEWSoft.exe C:\Programme\Dewetron\DEWESoft66

Addons .dll files for plugins must be copied into this directory C:\Programme\Dewetron\DEWESoft66\Addons

Data this is where DeweSoft will store your measurement data C:\Programme\Dewetron\DEWESoft66\Data

Setups this is where your DeweSoft setup files will be stored C:\Programme\Dewetron\DEWESoft66\Setups

1.3.3 Links• DEWESoft™ 7 homepage

http://www.dewesoft.com/dewesoft7

Page 2/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 7: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin About this document

1.4 LicensingThe plugin requires a valid DEWESoft™ license.

To test the plugin you can use request an Evaluation license from our homepage:http://www.dewesoft.com/registration

Illustration 1: Request Evaluation License

(1) Click on Evaluation license

(2) Fill out all the required fields

(3) Click the Send evaluation license button

1.5 Plug-in InstallationSimply copy the file Rs232.dll into the Addons folder of your DEWESoft™ installation (e.g. D:\DEWESoft7\Bin\V7_0\Addons\) and then start DEWESoft™.

Document-Version: 1.2.1 www.dewesoft.com Page 3/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 8: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 2Configuration

2 Configuration

2.1 Hardware setupWhen you have successfully installed the Rs232 Plug-in (see 1.5 Plug-in Installation), it will show up in the Hardware setup:

Illustration 2: DEWESoft 7 Hardware setup

(1) Make sure that the plugin is set to Used

(2) shows the hardware settings of the plugin: see 2.1.1 Connection settings and 2.1.2 Log files

(3) is only available in DEWESoft™ 7: see 4 Raw Data Channel on page 13

2.1.1 Connection settingsIn the Plugin properties section at the bottom, you must enter the correct RS232 connection settings for you device:

COM Port: the communication port of your PC that your RS232 device is connected toBaud rate: the Baud rate of the RS232 deviceStop bits: the number of Stop bits of the RS232 deviceData bits: the number of Data bits of the RS232 deviceParity: the Parity setting of the RS232 device

Please consult the manual of your device for these settings. If any one of the connection settings is wrong DEWESoft™ may not be able to connect to the device and may not receive any data.

When you select a COM Port that is already in use or cannot be opened for any other reason, you will get a warning message when you try to start the measurement or go to the setup screen:

2.1.2 Log filesThe RS232 plugin will write log files during operation. The amount of log messages is configurable via the Log level drop down box in the Hardware setup. The name of the logfile is RS232Logfile.log.

Page 4/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 9: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Configuration

When the plugin is started, it will immediately start to log to the windows temporary directory.

As soon as the DEWESoft™ application is available to the plugin, all subsequent logs will be written to the standard DEWESoft™ log directory (e.g. D:\DEWESoft7\System\V7_0\Logs).

For DEWESoft™ 6 the logfile will be created in the same directory where the DeweSoft.exe is installed (e.g. C:\Programme\Dewetron\DEWESoft66).

2.1.2.1 Log levelsWith the log level drop down box you can set the detail level of the logging function.

If you set a high log level (e.g. TRACE, ALL) a lot of log messages will be written and the logfiles will roll over quite often. This is also dependent on the sample rate – the higher the sample rate is, the more often data will be fetched and thus more log messages will be written.

For production-use the log level INFO is recommended.

Log level Description

Error Will only log error messages

Warn Will also log warning messages

Info Will also log info messages – this is recommended for production use

Debug Will also log debug messages

Trace will also log trace messages: e.g. data that is received via the RS232 port.

All will log all messages everything

Example log file content:15.04.2011 16:12:33:990 [TRACE] ---OnStartSetup 15.04.2011 16:12:34:505 [TRACE] processing RS232 data: >-1,234.13;2;;4E10;< 15.04.2011 16:12:34:505 [ INFO] we've received more tokens (4) than the device has channels (0) 15.04.2011 16:12:34:505 [DEBUG] Value for channel: 2 is empty 15.04.2011 16:12:35:505 [TRACE] processing RS232 data: >-1234.14;3;1.03e2;<

Document-Version: 1.2.1 www.dewesoft.com Page 5/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 10: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 2Configuration

2.2 Channel SetupWhen you go to the Channel setup of the RS232 plugin you will see a screen similar to this one:

Illustration 3: Channel Setup DEWESoft 7

1. this section shows the connection settings that you have made in the Hardware setup (see 2.1 Hardware setup).

2. In the settings area you can select the number of channels that you want to use and the protocol format (see 3 Protocol specification).

3. Setup Grid: shows information about all channels of the plugin and also live values

• ON/OFF: only channels that are set to Used will show up in Measure Mode and can be stored in DEWESoft™data files.When you click on the header cell (labelled: 'ON/OFF') a pop-up menu will appear and you can set all channels to used/unused at once.For Used channels you can also deactivate the Store button. Then you can see and use the values of this channel in measure mode (and also e.g. in Math channels to do some calculations or data reduction), but the values of this channel will not be stored in the data file.

• Color: this colour will be used by the displays in Measure Mode. You can click on the colour to change it.

• Name: the name of the channel that will be used in Measure Mode. This can be changed by the user.

• Value: shows the live values of this channel

2.2.1 WarningsThe plugin may show you some warnings (the warnings are calculated when you exit a field):

Page 6/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 11: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Configuration

Illustration 4: Warnings

For example:

The Field Separator must only consist of one character. If you enter more characters, only the first one is used.Note: since you could also enter escape sequences (e.g. \TAB) the input field must allow your to enter more than one character.The start-string and stop-string must not be longer than 20 characters.The start-string, field separator and stop-string should not be emptyThe decimal separator should of course not be the same as the stop-string or the field-separator.

3 Protocol specificationThe RS232 device must continuously send data packets. You can specify the start-string, field-separator and stop-string of the message and also the decimal separator to use.

Here are some valid examples if the start string is '$CSV,', the field-separator is ';' and the stop-string is \CR\LF.

• $CSV,1;2;3;• $CSV,-1;;-3;• $CSV,-1.1;-2.1;-3.1;• $CSV,1.3e2;-1.3e3;1.3E4;

3.1 Character escapingSince many protocols use non-printable special characters as separators, you must escape those special characters.

e.g. you cannot directly enter a carriage return into an edit field. You must use an escape sequence instead: e.g. \CR, #13, $0A

For a complete list of escape sequences just open the ASCII Chars dialog (see 3.1.3 ASCII Chars window).

3.1.1 Automatic escapingWhenever you leave an input field that supports character escaping (e.g. Startstring, Stopstring, Field Separator), the content of the field will automatically be escaped.

Document-Version: 1.2.1 www.dewesoft.com Page 7/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 12: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 3Protocol specification

For example, when you enter the space character in the Field separator input field, it will look in the image below. You can see that the cursor moved a little to the right, because you have entered the space character.

When you now leave the Field separator input field by clicking into the Stopstring field (the cursor is now in the Stopstring field), you can see that the space character has automatically been escaped an you can now see the escape sequence for the space character: \SPC.

Illustration 5: Space in Field-separator field Illustration 6: Escaped Space character

You can also click the small I button (the I stands for information) to get a more comfortable view of the input:

3.1.2 Sequence input dialogWhen you click the small I button (the I stands for information) to get a more comfortable view of the input (see Illustration 5):

Illustration 7: Sequence input dialog

1. In the input dialog you can enter or paste arbitrary text. You may need to escape special characters.The escaped version of the input string will be shown below the Input field (see 3.)

2. When you click the Use button, the escaped input (see 3) will be copied to the Input field. In the example above, you can see that the Input field (1.) shows a space character, while the escaped input (3.) shows the escape sequence \SPC for the space character.

3. Will always show the escaped version of the Input field (1.)4. A tabular display of the current Input which makes it easy to identify each input character.

• The first row named # shows the index number of the character• the 2nd row called ASCII shows the ASCII representation of the character or the escape sequence (e.g. the 4th input

character is the escape sequence \SPC)• the 3rd row called Hex shows the hexadecimal representation of the character• the 4th row called Dec shows the decimal representation of the character

5. The Info… button will open another window that shows a detailed list of all ASCII characters and their escape sequences (see 3.1.3 ASCII Chars window)

3.1.3 ASCII Chars windowWhen you click the Info… button (see 5. in Illustration 6) you will see a list of all ASCII characters:

Page 8/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 13: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Protocol specification

Illustration 8: ASCII chars window

Note: you can leave the info window open while you work in the Sequence input dialog. When you double click on a row in the list of ASCII chars, the corresponding character or escape sequence will be inserted at the current cursor position of the Input field (of the Sequence input dialog).

3.1.4 Odds and EndsWhen you want to use any of the escape characters ($, #, \as is, you must escape it with a backslash.E.g. in Illustration 9 below you can see that $D is treated as the carriage return character, but the escaped version (\$D) is treated as the two characters: $ and D.

The same is true for decimal numbers.E.g. in Illustration 10 below you can see that #13 is treated as the carriage return character, but the escaped version (\#13) is treated as the three characters: #, 1 and 3.

Illustration 9: Escape hexadecimal Illustration 10: Escape decimal

The parser is built in a lenient way. It will always try to find matching escape sequences and if it doesn't find them the characters are used as they are.

Document-Version: 1.2.1 www.dewesoft.com Page 9/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 14: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 3Protocol specification

When you enter $CSV the lenient parser will try to find the best match for a hexadecimal sequence after the $. The only valid hexadecimal character that follows the $ sign is the C (S is not a valid hexadecimal char) and thus $C is interpreted as a hexadecimal escape sequence which relates to the Formfeed ASCII character.Note: the input $0CSV would have the same result.

If you want to use $C as it is in your text, you must escape the $ sign with a backslash (see Illustration 12 below).

Illustration 11: Input $CSV Illustration 12: Input: \$CSV

In Illustration 13 you can see that the lenient parser automatically escapes the $ sign, if the following characters form no valid hexadecimal escape sequence.

Illustration 14 shows an example of parsing a decimal escape sequence: only a maximum of the first 3 numbers can form the decimal escape sequence (since the highest possible ordinal value for ASCII characters is 255). Thus the string #123 is interpreted as { character and the remaining 4 character is used as is.

Illustration 13: Invalid hexadecimal Illustration 14: Decimal example

Page 10/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 15: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Protocol specification

Illustration 15: again, only the first character 9 after the decimal escape character # is a valid decimal character (A is not). Thus #9 is interpreted as the TAB character and the remaining A character is used as it is.

Illustration 15: TODO: name

3.2 Packet format[StartString][Data][StopString]

StartString: each data packet must start with these characters: e.g. '$CSV,'Data: the data includes the actual data values for the channels (for detail see 3.3 Data format)StopString: each data packet must end with the stop string: e.g. CR (Carriage Return) LF (Line Feed) characters (decimal representation of these characters is #13, #10, hexadecimal notation is $0D$0A)the stop-string characters must of course NOT be included in the DATA.

3.3 Data formatThe data can be a list of numeric values. You can specify which field-separator to use: a common example is the semi-colon:.

value1;value2;value3; .. valueN;where N is the number of channels

Note, that the trailing field separator is mandatory.

3.3.1 Value formatEach value can be an Integer or Floating point value. DEWESoft uses Delphi variables of type Single precision internally: i.e. a 32 bit floating point value.

valid examples (';' as field-separator and '.' as decimal separator – see 3.3.1.1 Decimal Separators):

7;1.35;1.36e2; channel 1 has an integer value of 7channel 2 has a floating point value of 1.35channel 3 has a floating point value of 136

1.34;1.35;1.36; channel 1 has a floating point value of 1.34channel 2 has a floating point value of 1.35channel 3 has a floating point value of 1.36

3.3.1.1 Decimal SeparatorsThe decimal separator is configurable (see 2.2 Channel Setup).

When the decimal separator is a '.' then the thousand separator will automatically be ','.

Document-Version: 1.2.1 www.dewesoft.com Page 11/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 16: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 3Protocol specification

When the decimal separator is a ',' then the thousand separator will automatically be '.'.

Note, that the thousand separator will simply be cut off the received string, before we further process the values:

so, the following strings will all result in the same data value of 1234.56 (when the decimal separator is set to '.'):

• 1,234.56

• 1,,234.56

• 1,2,34.5,6

Scientific notation is also supported: e.g. 1.2e2 has a value of 120. Note that an upper case E is also okay.

valid examples (when the decimal separator is set to '.'):

Data Note1 integer value of 11. integer value of 1 (trailing decimal separator is okay)

1,234.56 floating point value of 1234.56 (thousand separator is ignored)

1.23456e2 scientific notation – value is 123.456-2 minus 2-2. minus 2 (trailing decimal separator is okay)

-1.4e-1 scientific notation – value is: -0.14if a channel value is missing or cannot be parsed (e.g. string instead of a number), it will be ignored.

Data Note1.34;;1.36; value of channel 1 is 1.34

value of channel 2 is missingvalue of channel 1 is 1.36

1.34;abc;1.36; value of channel 1 is 1.34value of channel 2 is invalidvalue of channel 1 is 1.36

3.4 Format examples

3.4.1 Comma separated valuesExample of the data stream:

$CSV,1.3e-1;-1,234.12;1;1.01e2;4E10;\CR\LF

$CSV,1.3e-1;-1,234.12;1;1.01e2;4E10;\CR\LF

Number of channels 4

Start-string: \$CSV

Field-separator: ;

Decimal-seprator: .

Stop-string: \CR\LF

Page 12/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 17: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Protocol specification

3.4.2 Arbitrary stringsExample of the data stream:

Fr. 31.07.2009 7:44:47 Meßwert(akt.): 1771 ppm Propan 2.ALARM

Fr. 31.07.2009 7:44:52 Meßwert(akt.): 1666 ppm Propan 2.ALARM

Fr. 31.07.2009 7:45:27 Meßwert(akt.): 1077 ppm Propan

Fr. 31.07.2009 7:45:32 Meßwert(akt.): 994,3 ppm Propan

Number of channels

1

Start-string: ):\SPC

Field-separator: \SPC

Decimal-seprator: ,

Stop-string: ppm\SPCPropan

4 Raw Data ChannelA raw data channel can be activated in the hardware setup: see in Illustration 2 on page 4. This allows you to see the complete data between the Start and the Stop-string (see 3.2 Packet format).

IMPORTANTThis feature is only available in DEWESoft™ 7 or higher.

4.1 Max. LengthWhen the Max. Length field in the Hardware setup (see also 2.1 Hardware setup on page 4) is set to 0 the Raw Data Channel is deactivated.

Illustration 16: Hardware setup Raw Data Channel

Every other value is the maximum number of characters that will be used for the channel. If the data is longer than the maximum length that you specify, the data will be truncated. You should not set the value too high because it will increase the size of your datafile (for every data-point the number of characters specified in this field will be stored in the datafile, no matter if it is really used or not).When the Raw data channel is activated, you will see it in the channel list in measure mode. You can assign the Raw data channel to a digital display.

Document-Version: 1.2.1 www.dewesoft.com Page 13/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 18: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 4Raw Data Channel

Illustration 17: Hardware setup Raw Data Channel

4.2 Escape sequencesWhen the Escape sequences check box is activated, special characters in the raw data channel will be escaped (see also 3.1 Character escaping on page 7). This makes it possible to see non-printable characters.

In the following example we use the space character as field separator:

Without any escaping it is not possible to spot the field separator in the Raw data channel.

With escaping it is easy to see the \SPC escape sequence for the space character in the Raw data channel.

Illustration 18: No escapingIllustration 19: Escaping

5 Testing the pluginIt is possible to test the plugin without actual hardware. This requires the installation of some test-programs.

5.1 Null-modem emulatorSince there is now RS232 hardware available, we need to use a program to emulate a COM-port.

We will use the program com0com which is open source and free-ware: http://com0com.sourceforge.net/

5.1.1 InstallationDownload the latest version from the projects download page:

http://sourceforge.net/projects/com0com/files/com0com/

Click on the latest version: e.g. 2.2.2.0 and then download com0com-2.2.2.0-i386-fre.zip to get the installation files for 32-bit Windows Systems (for Windows 7 you may need the com0com-2.2.2.0-x64-fre-signed.zip file).

Extract the archive and start setup.exe.

Page 14/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 19: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Testing the plugin

click Next > read the license agreement carefully and click I Agree if you agree to the terms and conditions.

click Next > click Next >

now the Windows Hardware Assistant will appear and ask you to install the drivers for this new “hardware”.Select “No, not this time” and click Next >.

Now select “Install the software automatically (Recommended)” and click Next >.

Document-Version: 1.2.1 www.dewesoft.com Page 15/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 20: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 5Testing the plugin

wait until the drivers are being installed then click Finish to close the setup wizard

5.1.2 Checking the InstallationNow we will open the Windows Device Manager to check if the installation was successful and to find free COM ports for our tests:

first open the Windows control panel click the System entry

Page 16/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 21: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Testing the plugin

go to the Hardware tab sheet and click the Device Manager button

1) shows all COM and LPT ports on your computer2) shows the emulated COM ports that we have just installed

In this case only COM-port COM1 is used on the computer. So we must not use this port for our emulator (we use COM17 and COM18 instead).

5.1.3 Renaming the COM PortsThe emulator ports are currently called CNCA0 and CNCB0 we will change this to COM17 and COM18 in the next steps:

first start the com0com-Setup program that we have just installed:

Now change the names of the COM-ports:

Document-Version: 1.2.1 www.dewesoft.com Page 17/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 22: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 5Testing the plugin

After you have changed the names, they appear in blue colour. Press the Apply button to actually apply the changes to your system.

When this has finished the names of the ports will be in black colour again and you can also see the new names in the Windows Device Manager

5.2 Data emulatorNow we need to write some data on the COM port. We can use the free-ware program COM Port Data Emulator.

Download the program from here: http://www.aggsoft.com/com-port-emulator/download.htm and start the setup program: asdlemul2.exe.

on the Welcome screen click Next > read the license agreement carefully and if you agree to the terms and conditions, select the 'I accept the agreement' option and click Next >

Page 18/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 23: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Testing the plugin

keep the default installation location and click Next > keep the default settings, and click Next >

choose which additional tasks you want and click Next > check the settings again and click Install to start the installation.

after the installation has finished, make sure, that the 'Launch COM Port Data Emulator' check box is activated click the Finish button

Now the COM Port Data Emulator is started and we will generate some test-data:

Document-Version: 1.2.1 www.dewesoft.com Page 19/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 24: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 5Testing the plugin

in the Device tab-sheet:1) change the Serial port to 17 and 2) keep the connection settings in mind (we will need them later in DEWESoft™'s hardware setup) the comma-separated numbers have the following meaning: Baud Rate, Data Bits, Parity, Stop Bit

then click the Data source tab-sheet:1. select Text strings for the Data source2. enter some test-message: e.g.

$CSV,1.3e-1;-1,234.12;1;1.01e2;4E10;CSV,1237;1;1.01e2;$CSV,1.2e-1;-1,234.13;2;;4E10;$CSV,-1.4e-1;-1234.14;3.;1.03e2;

3. activate the 'Auto sending interval (ms)' check box and change the interval to 1000 ms, so that the test-messages will be sent every second

when the settings are okay, press the Start button.

Page 20/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 25: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Testing the plugin

the application will switch to the Log tab-sheet and show the data that it is now sending to COM port 17 and also some information messages.You can press Stop any time to stop the communication.

The Null-modem emulator (see 5.1 Null-modememulator) will receive all messages that the Data emulator sends to COM Port 17 and copy them to COM Port 18.

5.3 Test-data in DEWESoft™Now we start DEWESoft™ and check if the test-data is received correctly:

Document-Version: 1.2.1 www.dewesoft.com Page 21/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 26: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin 5Testing the plugin

first open Settings... - Hardware setup. Go to the Plugins tab-sheet and select the RS232 plugin. At the bottom enter the Plugin properties.

• COM Port: this must be the COM Port that the Null-modem emulator is sending the output to (in our case we have to choose COM18.

• Baud rate, Stop bits, Data bits and Parity must match the settings that you have selected in the Data emulator setup.In our case: 9600, 1, 8, None

When you are done, press the OK button to leave hardware setup.

Go to Setup files and press the New Setup button to create a new DEWESoft™ channel setup.

Now go to channel setup (Ch. setup). On the right side, you will see which COM port is in use and its communication settings.1) Enter the number of channels that you want to process. Our test data that we have entered in the Data emulator's Data source sheet has 4 channels.2) When all settings are correct, you should already see the live values.Note: if the Data emulator is running, you must restart it (press Stop and then Start)1.Note: When you are using plugin V1.0.0 you must switch to measure mode and back to channel setup once, to see the live data.

Finally we can go to the Recorder screen of the Measure mode and take a look at the data that we receive from the Data emulator.

Page 22/23 www.dewesoft.com Document-Version: 1.2.1

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation

Page 27: DEWESoft™ Rs232 PluginDEWESoft™ Rs232 Plugin About this document 1 About this document This is the user documentation for DEWESoft™ Rs232 Plugin Version 1.2.1. The Generic RS232

DEWESoft™ Rs232 Plugin Version History

6 Version History

6.1 Plugin VersionPlugin-Version Date Notes

1.0.0 15.04.2011 ☑ initial revision for Plugin version 1.0.0

1.0.1 18.04.2011 ☑ plugin: live values in channels setup were only shown after switching to measure mode and back (in DEWESoft 7)

1.0.2 20.04.2011 ☑ internal refactoring of setup utilities (enumeration)

☑ changed thread priority of COM threads to normal (less CPU load)

1.0.3 - ☑ channel setup grid now has a popup menu to select/unselect all channels at once

☑ fixed minor problem in DEWESoft7: when you had a clean installation (or project) the first time you activated the plugin, it did not work

☑ OnHideHWFrame() will now just log exceptions and not re-raise them

1.1.0 09.08.2011 ☑ Startstring, Stopstring and Fieldseparator can now be customizedsupport for special characters and character escaping

☑ the plugin now requires a valid DEWESoft™ license

☑ RawData channel added (DEWESoft™ 7 only)

☑ Channel setup: each channel now has a store button

1.1.1 02.09.2011 ☑ changed the default for DataBits from 5 to 8 (which is more common)

6.2 Documentation VersionDoc-Version Date Notes

1.0.0 15.04.2011 ☑ initial revision for Plugin version 1.0.0

1.1.0 18.04.2011 ☑ added chapter “Testing the plugin”

1.2.0 09.08.2011 ☑ updated to plugin version 1.1.0

☑ updated screenshots

☑ improved Protocol specification

☑ added chapter “2.2.1 Warnings”

☑ added chapter “4 Raw Data Channel”

1.2.1 02.09.2011 ☑ minor: corrected typos

1 this is a limitation of the com0com program. This problem does not occur when you use the Shareware program Virtual Null Modem (http://www.virtual-null-modem.com/)

Document-Version: 1.2.1 www.dewesoft.com Page 23/23

DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM DEWESoftTM

measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation measurement innovation