Jump to content

Strange behaviour of VI Express Write LVM


Recommended Posts

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 !

Link to comment

CITATION(tcplomp @ Apr 11 2008, 03:43 PM)

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 !

Link to comment

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

Link to comment

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.

Link to comment

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

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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