|
<< Click to Display Table of Contents >> CVTSETTINGS.INI |
![]() ![]()
|
The CVTSETTINGS.INI file is where additional control can be specified when logged data is 'ConVerTed' into a Log Report.
These control the following:
| • | Duplicate Data specify in the [SETTINGS] section of CVTSETTINGS.INI |
| • | Suppress Blank Lines specify in the [SETTINGS] section of CVTSETTINGS.INI |
| • | Error String specify in the [SETTINGS] section of CVTSETTINGS.INI |
| • | Repeated Value String specify in the [SETTINGS] section of CVTSETTINGS.INI |
| • | Show Error Codes specify in the [SETTINGS] section of CVTSETTINGS.INI |
| • | Decimal Places specify in the [DP] section of CVTSETTINGS.INI |
| • | Headings specify in the [NAMES] section of CVTSETTINGS.INI |
| • | Suppress Instrument Name specify in the [LOGFILECONVERSION] section of SETTINGS.INI |
Note that this file does not exist initially, so if there is a need to specify any of these settings then this file will need to be created. Ensure that the file type of this file is 'Configuration settings' not 'Text Document'.
These new features are controlled by a new INI file (in addition to SV3.INI and SETTINGS.INI) called CVTSETTINGS.INI which must be in the same folder as the log data itself (where the .LOG, .IDX and .LNM files are).
This file can be created using Notepad and has the two sections detailed below: (See the end of this topic for an example of a CVTSETTINGS.INI file).
Be sure to check the spelling because they must be exact and there must NOT be any spaces around the equals signs, or at the end of the lines.
Also, the lines added to the [NAMES] section are case sensitive.
Normally, SpecView’s Log File Conversion creates one line per log interval fully populated with the latest data at the time, or blank cells if there is a data error (such as a loss of comms).
If the value does not change much, then there are multiple duplicate values for that item in the final CSV file.
Create a section called [SETTINGS] and add entries to it as follows:
SuppressDuplicateData=Y
SuppressBlankLines=Y
ErrorString=Err
RepeatedValueString=
ShowErrorCodes=
SuppressDuplicateData=Y forces the Log File Convert process to leave out data that does not change on consecutive lines. This means that there will be blanks cells in the CSV file, and so the ErrorString should be used to change how errors are reported.
When this setting is on, the first and last lines of the file will be fully populated with data, even if it has not changed, but in the main body of the file, data is left out. Valid values of SuppressDuplicateData= are Y, N, 1, 0.
SuppressBlankLines=Y tells the Log File Convert process to omit the whole line if all the cells would be blank (i.e. no data has changed at all since the last log interval).
ErrorString=Err tells the Log File Convert process to put the string ‘Err’ in cells where the value could not be obtained from the devices connected to SpecView. Choose this String with care, depending on what will be reading the resulting CSV file. If it is only read by a Human, then “Error” or “Comm Fault” are OK, but if some other computer software is reading the file, then take care to use something that will be interpreted correctly.
Do not use a comma in this String.
RepeatedValueString= replaces a repeated value with a known string. Used for BlueStreak integration.
ShowErrorCodes=Y tells the log file conversion to put the Error code into the log file instead of a blank cell. If ‘ErrorString’ has not been specified, then the error will look like:
Error: 1460
otherwise the Error String is used with a space and the code, eg, if ErrorString is ‘Err=’ then
Err= 1460
will occur in the log file.
The number of decimal places in the CSV file is determined either by the parameter’s address setting, or by the ‘Log Report DP’ override setting (In File->Preferences), which is global to all values in the CSV file.
However, the number of decimal places used for each value in the CSV file can be specified. This mechanism relies on knowing the ‘Unique ID’ of a parameter inside SpecView. To find the UniqueID, open the Variables list and choose the ‘Options -> ToolTips -> Show detailed info’ menu items. Then, hover the cursor over the parameter. the UniqueId is the large number at the beginning of the tooltip, as shown here:

In this example, ‘Input 2’ has a uniqueId of 100120.
Find all the UniqueIDs of all the parameters that need their DP setting changed and then in the CVTSETTINGS.INI file, add a section [DP] listing all the UniqueIds and the number of decimals, as follows:
[DP]
100120=2
This example shows setting the ‘Input 2’ in the above example to 2 Decimal Places.
The DP settings are: 0,1,2,3 or 4 for normal representation and -1,-2,-3,-4 for Scientific Notation.
Examples: Suppose ‘Input 2’ has a value of 123.45678, then:
100120=2 would show 123.46 in the CSV file
100120=4 would show 123.4568
100120=-4 would show 1.2346E+02
If a Unique ID is specified in the CVTSETTINGS.INI file, that overrides the LogReportDP setting from File->Preferences, so use this mechanism to speicy the exceptions to the norm.
Here is a complete example CVTSETTINGS.INI file:
[SETTINGS]
SuppressDuplicateData=y
SuppressBlankLines=1
ErrorString=Error
RepeatedValueString=_
[DP]
11840=0
11830=2
10022=3
10010=-1
Controlling the headings in Log Report files:
The names used in the header row of the Log Report CSV file can be changed as follows:
In CVTSETTINGS.INI add a section called: [NAMES] and add pairs of parameter names and their replacements like this:
[NAMES]
Controller1.ProcessValue=C1.PV
Controller2=C2
In the above example, the first line replaces the whole of a specific parameter name with a shorter one, and the second line replaces all Controller2 with C2 wherever it occurs in any parameter name.
Important Notes:
- The lines in this section are CASE SENSITIVE.
- The replacement text can be blank, e.g. Controller=
- The replacement can be a partial match, e.g. Process=Temp will change 'Process Value' to 'Temp Value'.
- These replacements apply globally to all parameters in ALL Report Formats
- Only one replacement is made per parameter - for example, if there were two lines in the [NAMES] section as follows:
Controller=Kiln
Kiln.PV=Kiln.Temp
where the intention is to 'rename' the Controller to Kiln and then rename specifically the PV to Temp, then only one of them would work because the first one to substitute will end the replacements for that parameter. It is not possible to specify the order, so the actual replacement will be either only Kiln.PV (because the replace of Controller with Kiln got there first) or no change (where Kiln.PV got there first, but the parameter is still called Controller). To deal with situations like this, rename every parameter in full instead of relying on partial replacements. In this example Controller.PV=Kiln.Temp would do that.
There is also another relevant setting in SETTINGS.INI (Note: that this is not CVTSETTINGS.INI)
[LOGFILECONVERSION]
Strips off ALL instrument names in the CSV files, so for example, where the name is 'Controller.PV' it will be replaced by just 'PV'.
Note that can also be done via CVTSETTINGS.INI as described above using:
[NAMES]
Controller.=
Which replaces the name and the dot with nothing, however, SuppressInstrumentName=Y does it across all instruments.
See also: SV3.INI and SETTINGS.INI