LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

altering measurement file labeling information and outputing the correct time increments

I have attached a vi (buffered event counting.vi) I have been working on that will allow me to do buffered event counting.  For some of the development and history (ie what I am trying to achieve) of this vi you can go here, where I have been helped by DavidMN.  I thought I would now move my questions to here, since the questions I am asking now and more specific labview questions and not just how to get acquire my data using the counters on my card.

 

I have also attached a txt data file (TIRM_12.txt).  So my first question relates to altering the measurement file labeling information.  David suggested I check out this thread, but I gave this a try and couldn’t seem to work out how to do it (I haven’t included those changes here as I think they would confuse things a bit).  Could I get some help in trying to understand what I need to do here.  I want to rename the x-axis to Time and the y-axis to Counts.

 

The second question relates to the vi and the x-values it outputs.  I want the time values in the x-axis to show as the time-step increments I am interested in.  Generally this will be 5ms, but not always.  How I set the timestep time up in my vi is to use a control on the rate connector on the DAQmx timing.vi.  So if I want 5 ms timestep then I put in a rate of 200.  In my output file I want the x-axis to reflect this 5ms increment as 0.005.  To do this I have used a for loop with a shift register.  I have wired the samples per channel to N and to get my time increment to show I am dividing 1 by the rate (so I have wired the rate value to the y connector on the divide vi).

 

However, my problem here is that when I test run the vi (note - I am simulating my card on the computer I am currently using) the x-values increment by 1, not the 0.005 I want them to.  Does anyone know why this is happening and what I can do about it.

 

 

I have also attached a second vi as well (buffered event counting mod.vi).  This vi I modified from the one discussed above because I thought it might be easier to directly use the File I/O vi’s to add header information and name the columns.  I thought I was going well until I ran the vi and got a 1430 error:

Open/Create/Replace File in buffered event counting mod.vi<APPEND> test

 

Can anyone help me out and explaing what is actually happening here.  This question is more to do with me trying to understand what is going on and what I need to be aware of when trying to do this and what I need to do to fix it. 

 

If I can get both of these vi’s to work I can thus choose what is better suited to what we want, and also it will enhance my understanding of how to use labview.

 

I am using Labview 8.6.

0 Kudos
Message 1 of 2
(2,078 Views)

I had a similar problem yesterday after I updated to LV 8.6.1.  The problem ended up being related to some NI-DAQmx tasks that got corrupted by the driver install.  The code ran, but I got waveform dt values of 1 instead of 1e-6 as I expected.  So you might want to double check that your DAQmx timing VI is actually working and getting counts.  In my case, when I checked the DAQmx task, there was a problem with the physical channel from the driver corruption.

 

Good luck.

 

Craig

0 Kudos
Message 2 of 2
(2,065 Views)