scls19fr Posted April 12, 2008 Report Share Posted April 12, 2008 Hello, I'm using the VI Express Write a LVM file I don't understand why but my .lvm file contains only one row. Moreover this row is the latest point. What I call a "strange behaviour of VI Express Write LVM" also means I probably don't understand well the problem... Do you have an idea about it ? Thanks Best regards Download File:post-11213-1207915105.vi Quote Link to comment
Ton Plomp Posted April 12, 2008 Report Share Posted April 12, 2008 If you double click on the Express VI you will see a lot of options including the following: You should change this to 'Append to file' Ton Quote Link to comment
scls19fr Posted April 12, 2008 Author Report Share Posted April 12, 2008 CITATION(tcplomp @ Apr 11 2008, 02:41 PM) You should change this to 'Append to file' Thanks... but I know this ;-( The problem is for example with time column... why 0 ? It should increase by 50ms step... but it doesn't ! I guess that the .lvm file is open for writting each time the measure is put in the file the lvm file is closed next point the lvm file is open (again) for writing ... ... It seams that each time the file is open for writing, time is set to zero That's why I found it very strange ! Quote Link to comment
Ton Plomp Posted April 12, 2008 Report Share Posted April 12, 2008 Well what happens if you change the option? Ton Quote Link to comment
scls19fr Posted April 12, 2008 Author Report Share Posted April 12, 2008 CITATION(tcplomp @ Apr 11 2008, 03:43 PM) Well what happens if you change the option?Ton I select "append" X columns : only one I get LabVIEW Measurement Writer_Version 0.92 Reader_Version 1 Separator Tab Multi_Headings Yes X_Columns One Time_Pref Absolute Operator scls Date 2008/04/11 Time 16:10:58,639664 ***End_of_Header*** Channels 2 Samples 1 1 Date 2008/04/11 2008/04/11 Time 16:10:58,641664 16:10:58,641664 X_Dimension Time Time X0 0.0000000000000000E+0 0.0000000000000000E+0 Delta_X 1.000000 1.000000 ***End_of_Header*** X_Value Untitled Untitled 1 Comment 0.000000 0.000000 20.000000 0.000000 10.000000 20.000000 0.000000 10.000000 25.000000 0.000000 20.000000 25.000000 0.000000 20.000000 30.000000 0.000000 30.000000 30.000000 0.000000 30.000000 35.000000 0.000000 40.000000 35.000000 0.000000 40.000000 40.000000 0.000000 50.000000 40.000000 0.000000 50.000000 45.000000 0.000000 60.000000 45.000000 0.000000 60.000000 50.000000 0.000000 70.000000 50.000000 0.000000 70.000000 55.000000 0.000000 80.000000 55.000000 0.000000 80.000000 60.000000 0.000000 90.000000 60.000000 0.000000 90.000000 65.000000 0.000000 100.000000 65.000000 0.000000 100.000000 70.000000 0.000000 110.000000 70.000000 0.000000 110.000000 75.000000 0.000000 120.000000 75.000000 0.000000 120.000000 80.000000 0.000000 130.000000 80.000000 0.000000 130.000000 85.000000 0.000000 140.000000 85.000000 0.000000 140.000000 90.000000 0.000000 150.000000 90.000000 0.000000 150.000000 95.000000 0.000000 160.000000 95.000000 0.000000 160.000000 100.000000 0.000000 170.000000 100.000000 I don't like what the first column ! (it doesn't means that I want to erase it It means that the value should increase from 50ms) You can also notice that "Samples" contain 1 1 but this is not the number of samples !!!! So when I need to read this LVM file (into for example VI Express Generate Abitrary signal... it fails ... in fact it imports only one line !!!) I also tryed to put this code inside a loop... http://lavag.org/old_files/post-11213-1207924771.vi'>Download File:post-11213-1207924771.vi but the problem is same ! Quote Link to comment
TobyD Posted April 12, 2008 Report Share Posted April 12, 2008 QUOTE (scls19fr @ Apr 11 2008, 07:13 AM) I also tryed to put this code inside a loop...but the problem is same ! I'm not sure exactly what you are looking for, but when I ran this vi the timing was as close to 50ms/reading as you could expect from a non-realtime system. You step data is incremented by the value set in Ystep and Xstep, but the steps appear to occur at the proper interval. As for the multiple columns, I think this is what you are looking for. It's in the configuration of the "Écrire dans un fichier de mesures" express VI. Quote Link to comment
scls19fr Posted April 12, 2008 Author Report Share Posted April 12, 2008 Look at the first column you will see that time is always equal to 0. This is not the standard behaviour of this VI Express. I ever use it... and time was increasing (in this column) See LabVIEW Measurement Writer_Version 0.92 Reader_Version 1 Separator Tab Multi_Headings Yes X_Columns Multi Time_Pref Absolute Operator scls Date 2008/04/11 Time 19:41:37,412999 ***End_of_Header*** Channels 2 Samples 1 1 Date 2008/04/11 2008/04/11 Time 19:41:37,414999 19:41:37,414999 X_Dimension Time Time X0 0.0000000000000000E+0 0.0000000000000000E+0 Delta_X 1.000000 1.000000 ***End_of_Header*** X_Value Untitled X_Value Untitled 1 Comment 0.000000 0.000000 0.000000 20.000000 0.000000 10.000000 0.000000 20.000000 0.000000 10.000000 0.000000 25.000000 0.000000 20.000000 0.000000 25.000000 0.000000 20.000000 0.000000 30.000000 0.000000 30.000000 0.000000 30.000000 0.000000 30.000000 0.000000 35.000000 0.000000 40.000000 0.000000 35.000000 0.000000 40.000000 0.000000 40.000000 0.000000 50.000000 0.000000 40.000000 0.000000 50.000000 0.000000 45.000000 0.000000 60.000000 0.000000 45.000000 0.000000 60.000000 0.000000 50.000000 0.000000 70.000000 0.000000 50.000000 0.000000 70.000000 0.000000 55.000000 0.000000 80.000000 0.000000 55.000000 0.000000 80.000000 0.000000 60.000000 0.000000 90.000000 0.000000 60.000000 0.000000 90.000000 0.000000 65.000000 0.000000 100.000000 0.000000 65.000000 0.000000 100.000000 0.000000 70.000000 0.000000 110.000000 0.000000 70.000000 0.000000 110.000000 0.000000 75.000000 0.000000 120.000000 0.000000 75.000000 0.000000 120.000000 0.000000 80.000000 0.000000 130.000000 0.000000 80.000000 0.000000 130.000000 0.000000 85.000000 0.000000 140.000000 0.000000 85.000000 0.000000 140.000000 0.000000 90.000000 0.000000 150.000000 0.000000 90.000000 0.000000 150.000000 0.000000 95.000000 0.000000 160.000000 0.000000 95.000000 0.000000 160.000000 0.000000 100.000000 0.000000 170.000000 0.000000 100.000000 0.000000 170.000000 0.000000 105.000000 0.000000 180.000000 0.000000 105.000000 Quote Link to comment
TobyD Posted April 12, 2008 Report Share Posted April 12, 2008 QUOTE (scls19fr @ Apr 11 2008, 10:32 AM) Look at the first column you will see that time is always equal to 0. Ahhh, I understand what you are saying now... You currently have reset set to true on the "Write to meaurement file" express VI. Set that to false (or remove it because the default is false) and it should work for you. By setting reset to true you are resetting the timesamp back to 0 each time. Quote Link to comment
scls19fr Posted April 12, 2008 Author Report Share Posted April 12, 2008 The problem is same ! Download File:post-11213-1207943541.vi I send on activate pin the constant "true" I send on reinitialize pin the constant "false" LabVIEW Measurement Writer_Version 0.92 Reader_Version 1 Separator Tab Multi_Headings Yes X_Columns Multi Time_Pref Absolute Operator scls Date 2008/04/11 Time 21:49:53,620999 ***End_of_Header*** Channels 2 Samples 1 1 Date 2008/04/11 2008/04/11 Time 21:49:55,382999 21:49:55,382999 X_Dimension Time Time X0 0.0000000000000000E+0 0.0000000000000000E+0 Delta_X 1.000000 1.000000 ***End_of_Header*** X_Value Untitled X_Value Untitled 1 Comment 0.000000 180.000000 0.000000 105.000000 0.000000 0.000000 0.000000 20.000000 0.000000 10.000000 0.000000 20.000000 0.000000 10.000000 0.000000 25.000000 0.000000 20.000000 0.000000 25.000000 0.000000 20.000000 0.000000 30.000000 0.000000 30.000000 0.000000 30.000000 0.000000 30.000000 0.000000 35.000000 0.000000 40.000000 0.000000 35.000000 0.000000 40.000000 0.000000 40.000000 0.000000 50.000000 0.000000 40.000000 0.000000 50.000000 0.000000 45.000000 0.000000 60.000000 0.000000 45.000000 0.000000 60.000000 0.000000 50.000000 0.000000 70.000000 0.000000 50.000000 0.000000 70.000000 0.000000 55.000000 0.000000 80.000000 0.000000 55.000000 0.000000 80.000000 0.000000 60.000000 0.000000 90.000000 0.000000 60.000000 0.000000 90.000000 0.000000 65.000000 0.000000 100.000000 0.000000 65.000000 0.000000 100.000000 0.000000 70.000000 0.000000 110.000000 0.000000 70.000000 0.000000 110.000000 0.000000 75.000000 0.000000 120.000000 0.000000 75.000000 0.000000 120.000000 0.000000 80.000000 0.000000 130.000000 0.000000 80.000000 0.000000 130.000000 0.000000 85.000000 0.000000 140.000000 0.000000 85.000000 0.000000 140.000000 0.000000 90.000000 0.000000 150.000000 0.000000 90.000000 0.000000 150.000000 0.000000 95.000000 0.000000 160.000000 0.000000 95.000000 0.000000 160.000000 0.000000 100.000000 0.000000 170.000000 0.000000 100.000000 0.000000 170.000000 0.000000 105.000000 0.000000 180.000000 0.000000 105.000000 Quote Link to comment
TobyD Posted April 12, 2008 Report Share Posted April 12, 2008 QUOTE (scls19fr @ Apr 11 2008, 12:55 PM) The problem is same ! I deleted the express VI and recreated it and it works. I'm not sure what is wrong on your end. Try this one... http://lavag.org/old_files/post-8758-1207948458.vi'>Download File:post-8758-1207948458.vi Quote Link to comment
scls19fr Posted April 13, 2008 Author Report Share Posted April 13, 2008 All right ! it works better for generating the lvm file. I can change to "Erase file" (instead of append to file) and as you can see I get all values ! Time is well increasing ! But there is still a problem with sample number... It is always equal to 1 for each channel.... So when I use the VI Express / Input / Generate an arbitrary signal and I want to import the generated signal... only one point (the first one) is imported... I can manualy fix it by changing samples number but that's a (very) dirty hack ! LabVIEW Measurement Writer_Version 0.92 Reader_Version 1 Separator Tab Multi_Headings No X_Columns One Time_Pref Absolute Operator scls Date 2008/04/12 Time 10:16:24,330057 ***End_of_Header*** Channels 2 Samples 1 1 Date 2008/04/12 2008/04/12 Time 10:16:24,331058 10:16:24,331058 X_Dimension Time Time X0 0.0000000000000000E+0 0.0000000000000000E+0 Delta_X 1.000000 1.000000 ***End_of_Header*** X_Value Untitled Untitled 1 Comment 0.000000 0.000000 20.000000 0.041000 10.000000 20.000000 0.141000 10.000000 25.000000 0.241000 20.000000 25.000000 0.341000 20.000000 30.000000 0.441000 30.000000 30.000000 0.541000 30.000000 35.000000 0.641000 40.000000 35.000000 0.741000 40.000000 40.000000 0.841000 50.000000 40.000000 0.941000 50.000000 45.000000 1.041000 60.000000 45.000000 1.216000 60.000000 50.000000 1.241000 70.000000 50.000000 1.341000 70.000000 55.000000 1.441000 80.000000 55.000000 1.541000 80.000000 60.000000 1.641000 90.000000 60.000000 1.741000 90.000000 65.000000 1.841000 100.000000 65.000000 1.941000 100.000000 70.000000 2.041000 110.000000 70.000000 2.141000 110.000000 75.000000 2.241000 120.000000 75.000000 2.341000 120.000000 80.000000 2.441000 130.000000 80.000000 2.541000 130.000000 85.000000 2.641000 140.000000 85.000000 2.741000 140.000000 90.000000 2.841000 150.000000 90.000000 2.941000 150.000000 95.000000 3.041000 160.000000 95.000000 3.141000 160.000000 100.000000 3.241000 170.000000 100.000000 Download File:post-11213-1207988553.vi About the problem with my VI Express "Write To Measurement File" it was probably because I was loking inside the VI Express (using contextual menu Open Front) but I don't save it... I just Undo... to get again the VI Express (instead of a sub vi) So it shouldn't break anything... but it break it ;-( See also http://forums.ni.com/ni/board/message?boar...hread.id=315785 Solution is here : CITATION you can place place the Write to Measurement File outside your loop and do a single write. Wire the data through the while loop and on the exit tunnel, select Enable Indexing. This will create an array of values. Now, when you use the Write to Measurement File, your number of samples will be correct and you will have a single segment that can be read by the Generate Arbitrary Signal function Download File:post-11213-1208026347.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.