DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Nicolet .wft format

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
sjroff



Joined: 08 Jul 2003
Posts: 7

PostPosted: Sat Mar 05, 2005 11:34 am    Post subject: Nicolet .wft format Reply with quote

I have a recorder that outputs a binary file with the .wft extention. I believe it to be a modified version of the Nicolet format. The header of this file does not represent the Dplot header shown in the help file, therefore I need to reconstruct this header. Can you please tell me which fields are required for Dplot to plot the graph? Also I am not clear as to the Dplot format, is it as shown below.

tagHeader {
Nic_ido 3 ;
Nic_idi 1 ;
etc....
} Header;

That is, are the semi-colons required as a delimiter? Does the header start and finish with brackets? Do I type in the header name, or just the value? Thanks in advance.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sat Mar 05, 2005 7:15 pm    Post subject: Reply with quote

Quote:
Can you please tell me which fields are required for Dplot to plot the graph?


The header should be the same size as the header shown in the Help file - a total of 1538 bytes. All fields in the header are null-terminated character strings rather than binary values. All descriptions below take for granted that the field is a character string terminated with an ASCII 0. For example, if the description below states that a value "must be 5" then DPlot expects to read the character "5" followed by an ASCII 0.

The critical fields are:

Nic_id0: must be 3 (Intel byte ordering)
Nic_id2: must be 1 (time domain rather than frequency domain)
Bytes_per_data_point: must be 2
Length_of_zone_2,
Length_of_zone_3: must be 0 (multiple zones not supported)

Header_size: Offset from start of file to the data values. Should either be 0 for the default of 1538 bytes or some value >= 1538.

Data_count: number of data points in the file.

The scaling parameters are described in the Help file.

Quote:
That is, are the semi-colons required as a delimiter? Does the header start and finish with brackets? Do I type in the header name, or just the value?


The semicolons and brackets just normal C syntax and how the header would be described in a C program, not something that should be included in the header. If you'll let me know what language you're working with I'll toss back a header for that language.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sjroff



Joined: 08 Jul 2003
Posts: 7

PostPosted: Sat Mar 05, 2005 11:04 pm    Post subject: Reply with quote

I am programing with VB6. My recorder outputs two waveforms at a horizontal rate of 270 seconds, and two others at 280 ms. All are included in the same file. Can I do two horizontal rates on the same plot? Or do I need to separate the file?
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sun Mar 06, 2005 7:47 am    Post subject: Reply with quote

You'll need separate files.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sun Mar 06, 2005 8:30 am    Post subject: Reply with quote

Oh yeah...

Code:
Type NIC_HEADER
    Nic_id0 As String * 2
    Nic_id1 As String * 2
    Nic_id2 As String * 2
    User_id As String * 2
    Header_size As String * 12
    File_size As String * 12
    File_format_version As String * 12
    Waveform_title As String * 81
    Date_year As String * 3
    Date_month As String * 3
    Date_day As String * 3
    Time As String * 12
    Data_Count As String * 12
    Vertical_zero As String * 12
    Vertical_norm As String * 24
    User_vertical_zero As String * 24
    User_vertical_norm As String * 24
    User_vertical_label As String * 11
    User_horizontal_zero As String * 24
    User_horizontal_norm As String * 24
    User_horizontal_label As String * 11
    User_Notes As String * 129
    Audit  As String * 196
    Nicolet_Digitizer_Type As String * 21
    Bytes_per_data_point As String * 3
    Resolution As String * 3
    Forward_link As String * 81
    Backward_link As String * 81
    Process_flag As String * 3
    Data_compression As String * 3
    Number_of_segments As String * 12
    Length_of_each_segment As String * 12
    Number_of_timebases As String * 12
    Reserved_1 As String * 156
    Length_of_zone_1 As String * 12
    Horiz_norm_zone_1 As String * 24
    Horiz_zero_zone_1 As String * 24
    Length_of_zone_2 As String * 12
    Horiz_norm_zone_2 As String * 24
    Horiz_zero_zone_2 As String * 24
    Length_of_zone_3 As String * 12
    Horiz_norm_zone_3 As String * 24
    Horiz_zero_zone_3 As String * 24
    Reserved_2 As String * 332
    End_of_HDELTAS As String * 1
    End_of_readable_file As String * 1
End Type

_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sjroff



Joined: 08 Jul 2003
Posts: 7

PostPosted: Sun Mar 06, 2005 9:06 pm    Post subject: Reply with quote

Thanks! That will be very helpful! As it turns out, there are actualy 8 waveforms in the file. I will simply make 8 header files that point to each start address.

Steve...
Back to top
View user's profile Send private message
sjroff



Joined: 08 Jul 2003
Posts: 7

PostPosted: Sat Mar 12, 2005 2:13 pm    Post subject: Reply with quote

OK I created my VB program which adds the header to my binary file, that works OK. However I tried many different values for each variable, but it still won't open in Dplot! Any clues as to what am I doing wrong? My test wave is basic - 4096 points, 16 bit resolution, 65 µs sampling.

Private Sub Command1_Click()
Dim MPRHeader As NIC_HEADER

MPRHeader.Nic_id0 = 30
MPRHeader.Nic_id1 = 20
MPRHeader.Nic_id2 = 10
MPRHeader.User_id = 0
MPRHeader.Header_size = 0
MPRHeader.File_size = 97300
MPRHeader.File_format_version = 0
MPRHeader.Waveform_title = "TestMPR"
MPRHeader.Date_year = 0
MPRHeader.Date_month = 0
MPRHeader.Date_day = 0
MPRHeader.Time = 0
MPRHeader.Data_Count = 81920
MPRHeader.Vertical_zero = "0.00000000E 00"
MPRHeader.Vertical_norm = "1.00000000E 00"
MPRHeader.User_vertical_zero = 0
MPRHeader.User_vertical_norm = 1
MPRHeader.User_vertical_label = 0
MPRHeader.User_horizontal_zero = 0
MPRHeader.User_horizontal_norm = 1
MPRHeader.User_horizontal_label = 0
MPRHeader.User_Notes = 0
MPRHeader.Audit = 0
MPRHeader.Nicolet_Digitizer_Type = 0
MPRHeader.Bytes_per_data_point = 20
MPRHeader.Resolution = 160
MPRHeader.Forward_link = 0
MPRHeader.Backward_link = 0
MPRHeader.Process_flag = 0
MPRHeader.Data_compression = 0
MPRHeader.Number_of_segments = 1
MPRHeader.Length_of_each_segment = 81920
MPRHeader.Number_of_timebases = 1
MPRHeader.Reserved_1 = 0
MPRHeader.Length_of_zone_1 = 81920
MPRHeader.Horiz_norm_zone_1 = "6.5000000E-05"
MPRHeader.Horiz_zero_zone_1 = "6.5000000E-05"
MPRHeader.Length_of_zone_2 = 0
MPRHeader.Horiz_norm_zone_2 = 0
MPRHeader.Horiz_zero_zone_2 = 0
MPRHeader.Length_of_zone_3 = 0
MPRHeader.Horiz_norm_zone_3 = 0
MPRHeader.Horiz_zero_zone_3 = 0
MPRHeader.Reserved_2 = 0
MPRHeader.End_of_HDELTAS = 0
MPRHeader.End_of_readable_file = "Z"

Open "F:\Captures\1538block840.wft" For Binary As 1
Put #1, , MPRHeader
Close #1


End Sub
Back to top
View user's profile Send private message
sjroff



Joined: 08 Jul 2003
Posts: 7

PostPosted: Sat Mar 12, 2005 5:25 pm    Post subject: Reply with quote

I used an ASCII "0" to terminate each string. However "0" is not hex "00" it is hex "30", this may be the whole problem. Does Dplot need to see ASCII "0" or hex "00"? How can I send an ASCII "Null" from the keyboard?
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sat Mar 12, 2005 10:11 pm    Post subject: Reply with quote

ASCII 0, not the character 0. There's no way that I'm aware of to do this from the keyboard. Your VB program should be able to do this with no problem, though. For example id_0="3" & chr$(0).
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group