Capture Settings, Logging

Top  Previous  Next

Capture Settings are set-up separately for each capture channels.  Once these settings have been specified, OK or Apply should be clicked.  This tab specifies how captured data should be logged and manipulated.

 

cm4-set-log2

 

Logging Type

The Logging Type menu specifies how capture data is written to files.

 

Single Files

Each channel captures to its own single file

Common Files

Two or more capture channels save data into the same common file as specified in Common Settings, Log Files

No Files

Captured data is not written to any file, usually where it is just being echoed or saved to a database.  This option is really not recommended.

 

Log Raw Data

ComCap normally processes any received data to remove or translate non-printing characters that may cause problems in capture log files.  Ticking this option causes data to be captured exactly as received.  The data display on the screen will still be processed to remove non-printing characters. 

 

Remove Control Characters

ComCap normally translates superfluous control characters captured into spaces; this includes null, tabs, form feeds, etc.  If this setting is ticked, such control characters are removed completely.  Which option is preferred will depend upon the data being received.  Some data may include tabs to separate columns of information, so conversion to a space is better; other data may include padding nulls which cause formatting problems if converted to spaces so are best removed.  If control characters are needed in the capture log, use the Log Raw Data option, see above.  This is not allowed if Log Raw Data is ticked.

 

Remove Trailing Spaces

If ticked, specifies that trailing spaces at the end of each line should be removed.  Note that leading spaces remain since they may be used for tabular alignment.  This is not allowed if Log Raw Data is ticked.

 

Time Stamp Each Line, Time Stamp Mask

If ticked, adds a time stamp and optional text at the start of each logged line.  This may be useful when logging periodic data such as alarms that don't include the time within the captured data, or where the time may be inaccurate.  The Time Stamp Mask should be specified, this defaults to hh:nn:ss:zzz"|" which would cause something like 12:41:05:107| to precede each captured line.  The :zzz can be removed if millisecond accuracy is not needed.  This option is not available if logging 'Raw Data'.  The mask characters and format are identical to those used for Custom Log Names, see Files.  Note that Escaped Text at the start of the line is added after Time Stamp Each Line, if both are used together.  

 

Add Date Daily

If ticked, causes the date and time to be added before the first data is captured each day, or when logging starts.

 

Ignore Blank Lines

If ticked, causes lines without any printable characters to be ignored.  This will reduce the size of logs that contain far too many blank lines.  This option should generally be used with 'Remove Control Characters'.

 

Log Hex Data

If ticked, causes all captured data to be converted into hexadecimal (doubling the size).  This is primarily intended for capturing binary data, but may be used a debugging tool to find the exact format of data being captured, for instance the type of line endings.  Normal line ending rules are applied when capturing in hex, so lines may be broken on linefeed, etc (also saved in hex).

 

Next Serial Number, Serial Number Digits

ComCap allocates a Serial Number for each line that is captured (unique to each channel).  Next Serial Number specifies the next serial number to be used, and may be changed if necessary.  The serial number increments for each captured line will wrap back to one when it reaches the specified Serial Number Digits length, or zero if it should increment indefinitely.  The Serial Number may be added to each captured line using the Add Escaped Text option below, or used in a database column.  This is primarily for the benefit of other applications that process the data in real time, so they don't process duplicate data.  It may also be used to confirm that lines have not been lost from the capture logs. Note it will not help if data is lost before being written to the logs.

 

Add Escaped Text

To assist in identifying and optionally further processing captured text, extra text may be added to the start or end of each captured line.  The extra text may include escape sequences to added

 

\#

Serial Number, unique to channel incremented for each line, with leading zeros according to Serial Number Digits above

\d

Date and time, ie 21-Jun-2006 20:10:12.  Note this is a fixed date format, if more flexible formatting is needed use the Time Stamp Each Line option above.

\t

Time, ie 20:10:12

\o

ISO date and time, ie 2006-06-21T20:12:11, recommended for database capture

\s

Space, used as a separator at the start or end of the escaped text, not necessary within the text

\p

PC Name (NETBIOS),ie MYCOMPUTER

\i

Local IP address, ie 192.168.44.55

\r

Remote IP address, ie 192.168.44.55

\m

Capture Name, note spaces may cause problems

\n

New Line (CRLF), not generally recommended

\f

Form Feed (FF)), not generally recommended

\c

Carriage Return (CR)), not generally recommended

\l

Line Feed (LF), not generally recommended)

\\

Backslash (\)

\e

Escape (ESC)), not generally recommended

\xnn

Any hex code where nn is 01 to FF

 

For Serial Number Digits set to eight, examples of adding escaped text are as follows:

 

Escaped Text

Resulting Text

\# \o\s

0123567 2006-06-21T20:12:11

|\#

|0124567

,"\#"

,"0123567"

\p,\r,

MYCOMPUTER, 192.168.44.55,

 

Note that Escaped Text at the start of the line is added after Time Stamp Each Line, if both are used together.  Escaped Text is not allowed if Log Raw Data is ticked.