LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delta X in spreadsheet in terms of seconds instead of samples

Hi,
 
I am using LabView 7.0 and I was wondering if anyone knows how I can change the delta X in the Write LabView Measurement file so that I see increments of 0.01 s in my excel spreadsheet.
For my simulated waveform the output time axis seems to be what I want.  But for some reason, the analog inputs increment by samples instead of 0.01 s.  I need the analog inputs and outputs to be updating at the same time.
 
I've included my VI as well as a copy of one of my LVM files. 
 
Help please!
 
Jenna
Download All
0 Kudos
Message 1 of 29
(3,972 Views)
I may be a bit thick, but you can calculate the time by multiplying the sample number times the delta x.  Not sure what the problem is?  You can have excel do this for you. 
I do not have the DAS16.llb so I can not look at exactly what your doing here.  I did notice in your xls file that the delta x for channels 2-4 is 1 and not .01.

Paul
0 Kudos
Message 2 of 29
(3,950 Views)

I wish that were the case, but it wouldn't solve the fact that in my first channel (that represents the analog out) the 0, 0.01 and 0.02.... correspond to every second in the other columns.  I'm looking for all of the columns to update every 0.01 s... and they wouldn't line up if I changed the delta x in the spreadsheet directly.  It would have to be in the LabView program before it is written.  It does seem like a simple thing though (I completely agree with you).  If I could find out how to change the delta x in LabView before it is written to the spreadsheet that would be great!

Maybe this is a problem with the simulated signal?? 

Thanks for the reply 

Jenna

 

0 Kudos
Message 3 of 29
(3,947 Views)
Rather than use the dynamic data type, use the waveform datatype.  You can then change the delta t property in your data arrays. Plus your simulate signal express VI is outputting a single point per iteration.  You can merge them into the dynamic data type fefore your file write operation.  Maybe that will help.

Paul
0 Kudos
Message 4 of 29
(3,939 Views)
In looking your code over, and monkeying a little bit, I have attached a screen shot of what should work.  I am sorry, I only have labVIEW 8+ here, so I could only save as far back as 7.1.  I also tried to clean it up a bit.  One thing I am confused about, is you have a pair of while loops inside, doing something... although what I am NOT sure, but it looks like you manually have to stop them!  In the vernacular... wat up wit dat?
I cleaned up the code a bit.  Hopefully it is a bit more readable now, although with some more time, a better understanding of what the two inner loops are doing and a complete set of VIs... I could have done better.  My assumption on dT is that you want to use the dT from the simulate signal express VI.  Be warned that express VIs are convienent... but do consume a fair amount of memory, especially for simple things.  Like your scaling VIs.  If you select the 'open front panel' from the context menu, and convert them, you can see the amount of overhead they carry.  And they are reentrant, meaning a complete duplication in memory.  I am not meaning to harp, just passing along some pointers.  Use it as you see fit.
If you have more specific questions you can direct them to me at my [first intial][last name]@[my company].com... Or you can post here again. 
good luck.
Paul

Paul
Message 5 of 29
(3,921 Views)
Hi Paul,
 
Everything in there looks great.  The loops are there because they were part of an example program that I modified for my program (I think it has to do with a separate loop for the Get Status VI).  Once I have your suggestions included, I will try and see if I can eliminate them.
 
I was wondering if you could show me where you got the data flow symbol on your block diagram.  I can't seem to find it anywhere, and without it I have an error present right near dt.
 
I've included my VI with everything that you put in except the data flow.
 
Thanks for your help
 
Jenna
0 Kudos
Message 6 of 29
(3,895 Views)
the <<<<<data flow<<<<< is just a comment I laid down to show that my flow was from right to left.  Intrinsically LabVIEW programmers flow data from right to left like we read.  When reversing the flow, it is a good idea to comment it so as not to confuse other programmers. 
Your problem is that the convert from dynamic data type is using the wrong instance.  Right click on it, and select properties, then select single waveform.  You will have to scroll the list down as it is at the bottom.  See attached picture of the property window.

Paul
0 Kudos
Message 7 of 29
(3,889 Views)

Thanks again Paul.  The delta x is definitely fixed... now I just have to figure out how to stop it from returning to zero every second.  I am also trying to update the DC offset column in the spreadsheet at the same rate as the analog inputs are being written.

I really appreciate all the time that you've taken to help me. 

Jenna

 

0 Kudos
Message 8 of 29
(3,875 Views)
I am not sure what you mean by returning to zero every second.  As for the DC offset, you want as many entries in that column as the other columns with the sample numbers to match?

Paul
0 Kudos
Message 9 of 29
(3,867 Views)
In thinking about this over the weekend some, maybe if I understand a little more about what you are seeking in the output, we can attack the problem from that perspective.  can you provide a brief overview of what happens with your data after it is collected?

Paul
0 Kudos
Message 10 of 29
(3,847 Views)