“DiagFName”
A Public string variable or string constant that is used to trigger the creation of a vibrating wire sensor diagnostic file (.vw). This parameter cannot be left blank.
By default, the DiagFName parameter is set to empty quotes (""). With this default, the data logger automatically assigns a default string name for the parameter: _VW_VW_File.
Users can define their own variable or constant name with a Public string variable, or a Public string constant. For example:
Public DiagFile as String
or
Const FName = DiagFile
The DiagFName will always be visible in the Public table. Entering a file name in the DiagFName field triggers the generation of a diagnostic report.
You can enter the file name manually or programmatically using conditional statements in a CRBasic program.
-
Manually Triggering: For details on how to manually trigger a diagnostic report, see Manually triggering a VW diagnostic report.
-
Programmatically Triggering: To trigger the report programmatically, specify an event condition or time to initiate the file write. For example:
Example Condition Trigger:
If VW(1) > 4000Then 'Write diagnostic file to a card if frequency > 4000 Hz
VWFile = "CRD:Diag_File" 'The file generated will be named Diag_File.vw
EndIf
Example Time Trigger:
If IfTime (1430,1440,Min) Then'Write diagnostic file to the CPU each night, 10 min before midnight
Name = "CPU:Diag_File"
EndIf
After the diagnostic file is successfully written, the DiagFName field is cleared. When a new file name is specified, a new diagnostic report will be generated.
NOTE: If the file was not written successfully, the file name is not cleared.
See example program #2 for a complete program.
As with manual file triggering, the resulting diagnostic file can be retrieved either through File Control or by removing the storage card. The file can then be viewed using the Device Configuration Utility in VW Offline Analysis mode.
Type: String Variable or String Constant