Jump to content

Thang Nguyen

Members
  • Posts

    299
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Thang Nguyen

  1. Herbert,

    Thank you so much for your meanful information.

    I want to confirm this information:

    Is it always true that storing the Y value of waveform and seperate it with the timestamp is more efficient than storing the waveform?

    Based on the property of TDMS channel (wf_increment, wf_start_time), I think TDMS naturally used to store waveform.

    But in this case, it is easier for me to read data out, if I seperate the data and timestamp.

    Love to hear about this:

    QUOTE

    Unrelated) I see from the flags on your account that you're from Vietnam. I just came back from 2 weeks of vacation, visiting friends in Vietnam. They took me on a roundtrip through the country, including Hanoi, Ha Long, Nha Trang and Saigon. Best vacation I had in a long time. I'm addicted to Caffee Suo Da now :thumbup:

    I have never come to Caffee Suoi Da, actually, there are a lot of coffee in Vietnam ( a lot ...). I lived in Saigon. :). Do you feel hot there?

    Thank you again,

    Thang Nguyen

  2. QUOTE(Herbert @ Jun 18 2007, 01:58 PM)

    Looking at the file with the TDMS Viewer, what you have is:
    • different channel lengths (high freq channels have 618 values, low freq channels have 224)
    • same dT (1.00 for all channels)
    • varying starting times (T0) for every channel

    It looks like you are using waveforms to save single values. In that case, I'm not sure that DAQmx or other functions that put out waveforms will set dT correctly, because there is no second value to reference to. If you save a series of single values to a waveform channel, you need to be really sure that they are equally sampled. If you're not sure, you should rather split up the waveform data type and store the timestamps and the data values to different channels (e.g. one timestamp and one double channel).

    Saving single values to TDMS like this is also not a very efficient thing to do. It is a lot more efficient to gather a bunch of values and write them as a larger array. You can have the TDMS API do that for you by setting the channel property "NI_MinimumBufferSize" to the number of values that you wish to buffer. In your case, good values might be 1000 or 10000.

    Hope that helps,

    Herbert

    In my program I put store VI into the loop. It scans through the array name of channel, then, read and store the correspondent data into the file in that sequence. That why those channel don't have the same start time. But the diffference is just some msec.

    I have two questions for you:

    A) Is the wf_increment depends on the dt? If that is the case, I understand why the data are stored with the same wf_increment.

    B) Do you mean that I should gather all of the Y value of each channel into an array, then put everything into the TDMS file? Could you tell me more detail how to store everything at once into the TDMS file?

    Thank you,

    Thang Nguyen

  3. QUOTE(tcplomp @ Jun 14 2007, 11:19 PM)

    Can you post a short TDMS?

    And maybe the code of the saving?

    Ton

    I attach here the picture of VI I used to write to TDMS.

    A TDMS example. But currently I don't have any input, these values just noise.

    In TDMS, I have two groups of value. One is high frequency, another is low frequency. They have different number of value 1/3. Have the same wf_start_offset, but they have the same wf_increment. So they have different end time store of data.

    Please modify the name of the tdms file. I don't understand why I cannot upload it.

  4. QUOTE(ragglefrock @ Jun 13 2007, 10:52 PM)

    More Correct Method:

    If you write a waveform to a TDMS file, the underlying data is really stored as an array with a special channel property called wf_increment to store the dt value. You can read this property for your channel and get the double-precision dt value. The property for the t0 value I believe is called wf_offset (view the TDMS channel in the TDMS Viewer to get the exact names). Then you just calculate based on the t0 and dt the offset in the channel array where the desired waveform subset begins, and how long the subset will be. Then use the TDMS Read inputs Count and Offset to specify how many datapoints to read out. Then build an waveform from this array with the new t0 and output it.

    Thank you so much for your answer. The only think is although I log two channels with different rate, but the wf_increment the same and they have the value 1. And this is the dt of the waveform, not the dt of the logging rate to the tdms. I am thinking another solution to get the right value. Maybe I will read all of the channel, and divide this number for the number of data I have in the array. But this sounds stupid. Is there any better solution?

    Thank you again,

    Thang Nguyen

  5. Hi,

    I am working on a Testing project. The project will store data from the test in the TDMS file. What I need to do next is reading a sub-set of data from a start time to an end time which are specificed by user? How should I do this? I cannot find any TDMS VI provide the time selection.

    Thank you for your time,

    Thang Nguyen

  6. Hi,

    I have a problem with the time on the waveform chart.

    Although I reset from the begining the XScale.Range.Minimum = XScale.Range.Maximum = current date time. But the Waveform chart still display the time from 1903, or 1997 to current time, or from current time to 2110. The updating of data on the chart are done by reference.

    Thank you for your time.

    Thang Nguyen

  7. QUOTE(Tomi Maila @ Jun 5 2007, 03:35 PM)

    Hi,

    I am sorry but I still can not run my process VI, I attach here what I did

    First is the folder structure of the VI in the class Logging.

    Second is the create VI which I use the clone name for name queue. One problem is the clone name of this VI is different with the name on the title of windows.

    Third is the Launch Process VI which will has the name queue and call the process VI dynamically.

    Fourth is the process VI which use the name queue to get the data pass from the create VI.

    With the process VI, because I cannot open directly the clone of this VI so I cannot debug it. As Jim Kring told about debug with the clone, so please tell me how to do it.

    Please take a look, thank you for your time.

    Thang Nguyen

  8. QUOTE(Tomi Maila @ Apr 26 2007, 04:22 PM)

    Second you don't pass your process VI any data, not event the queue reference you use to pass data around. You need to pass the queue reference to your process VI somehow. One way to do this is to create a named queue. If a queue with the same name already exists you get a reference to this named queue. So create a named queue "ProcessQueue" in the "Launch Process.vi" and enqueue your object to this queue. Then create a named queue "ProcessQueue" in the "Process.vi" and dequeue the object from the queue. This way you can pass your object to your process VI. Just make sure it's not dynamic dispatch VI...

    Tomi

    Hi Tomi,

    I used the name queue to pass data between the main VI and the process VI. But with this solution, I cannot create multiple instance of one class because the name queue is hard code. I still cannot figure out how to make this more flexible so I can create multiple intance for this class.

    Thank you,

    Thang Nguyen

  9. Hi,

    I have some problems which I don't know how to solve.

    I am working on a project. Everything run good on my computer. Then I build the executable file then copy to my client computer. It doesn't work any more.

    One of the problems is the connection (ethernet). I ping the IP address of the device. It replies well. But in LabVIEW it cannot connect.

    Is there anything relating to the firewall? Because this is client's computer, I does not have permission to change the firewall set up.

    Please give me some advices. They are driving me crazy.

  10. Hi,

    I am working with FieldPoint. Everything work fine, until I built the .exe file. When I click on the FieldPoint IO Point I see the browse ... But when I select it there is a pop up window appear for 1 sec then it disappear. I can not select the channel. Can anyone tell me how to fix this?

    THank you,

    Thang Nguyen

  11. Hi,

    You can start to write a class with variable is the path to the file, and with methods such as: add one item, read one item, verify item, delete one item, ...(Those method use basic VI working with configuration file). In those methods you will use the variable path and the parameter is the information of the item.

    Then after that, you can add more features, more specific to these methods thourgh inheritance.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.