LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save amplitude data simultaneous

I'm using the express vi to extract the amplitude from a channel. Now I like to save the amplitude data simultaneous to the original waveform channel so that I know when the different amplitude values occured.

 

Thanks for helping

0 Kudos
Message 1 of 9
(3,673 Views)

Hi Mr. Stahl,

could you maybe post your VI so it could become a bit clearer exactly what data you are trying to save?

 

How would you like to save your files (ASCII format, other formats...)?

 

Thanks and best regards,

Peter

--
Peter A.
Field Sales Engineer, NI Germany
Message 2 of 9
(3,647 Views)

Hi Peter,

 

so here is the vi. I like to save it as tdm so I can use Diadem for further analysis.What I really need is the correlation between time-load history and time-amplitude history

 

Thanks,

Steffen

0 Kudos
Message 3 of 9
(3,640 Views)

Hi Steffen,

the easiest way to get all relevant data would be to change the "X Value columns" settings in the Express-VI to "One Column per Channel". This will add a time channel to each data channel. Since the amplitude measurement will give you fewer samples (one peak-to-peak level per period), its list is going to be shorter. 

 

Please give this setting a try and let me know if this helps you with your data analysis.

 

Thanks and best regards,

Peter

Message Edited by PaSB on 09-15-2008 01:54 PM
--
Peter A.
Field Sales Engineer, NI Germany
Message 4 of 9
(3,621 Views)

Hi Peter,

so I tried these settings before. This problem is the fewer samples. I do have to know what the amplitude was at a specific time.

 

Maybe you have any idea - not with express vi's. Maybe something different.

 

Thanks in advance,

Steffen

0 Kudos
Message 5 of 9
(3,611 Views)

Hi Steffen,

there are basically two ways to go about this:

a) reduce the number of raw data samples to match the number of amplitude values

b) fill the amplitude value gaps with arbitrary ( "guessed" ) data

 

Both options could be done quite easily with a little VB script in DIAdem. You would have to check for the timestamp difference to be minimal (there will always be a small lag for the amplitude value), then kick off the required data processing (either crop or fill one or the other data channel)

 

What exactly are you trying to accomplish here? Maybe that will give me a better idea on how to solve this. 

 

I attached a VI that mainly uses the actual VIs instead of Express-VIs - just to give you an idea on how to use these.

 

Best regards,

Peter

 

Message Edited by PaSB on 09-16-2008 10:11 AM
--
Peter A.
Field Sales Engineer, NI Germany
Message 6 of 9
(3,590 Views)

Hi Peter,

 

thanks again for your help.  So this was the first thing I did in Labview, Thank you again for the actual vi, This makes me understnad a bit better how this should look like.

What I like to do is:

I have a few channels with strain gages.

I have two channels with forces.

I run a block program - a single sequences takes between 2 to 300 seconds.

When the forces vary, the amplitudes of the strain gages follow. I really like to connect a specific value of the forces to a stain amplitude.

Find a sequence automatically and write the mean of the forces and the strains. So only one value for a single sequence.

Then use a regression model to find best fit forces for target values of strains.

The frequency of the oscillation varies during this test.

 

Isn't there a possibility to say:

For the amplitude channel: Write the previous value of the amplitude in the same sample rate till the next amplitude is detected.

 

If you have an idea to accomplish this...thank you,

Steffen

0 Kudos
Message 7 of 9
(3,569 Views)

Hi Steffen,

I have tried various things with the code we're discussing. Unfortunately, the Amplitude measurement seems to behave unpredictably regarding the number of values it uses per calculation of one p2p value (especially if the frequency varies). The approach you described is not possible when using the continuous data acquisition as we do in the example. I have tried various ways to fill the gaps in LabVIEW but have not succeeded yet.

 

Therefore, writing a little search program in VBS and running it in DIAdem seems more feasible to me. In that case you do not need to worry about synchronizing the LabVIEW parts. 

 

The algorithm works like this:

Starting with the first time value of the voltage samples:

- compare current and next time-value for the amplitude values.

- write whichever is closer to a new column

next voltage time value: do the same thing until the end of entries.

 

I created a little script that you need to copy into the DIAdem script window. In order to use this you need a timestamp for both the voltage values and the amplitude values, that's why I used the express-VI again. In Diadem you need to rename the channels to "time_v", "v", "time_a", "a", then run the script that will create a new channel.Take a look at all the channels in the "VIEW" window and note that a new channel with filled data will be created. 

 

Please let me know if this is an OK solution for you? I will not be available the rest of this week but I will be able to help you next week. 

 

Good luck with the project and best regards,

 

Peter

 

 

--
Peter A.
Field Sales Engineer, NI Germany
Download All
Message 8 of 9
(3,544 Views)

Hi Peter.

 

I tried out the diadem script. Seems it works out really fine. I'll try out to rename the channels in the right way and include the regression to the channels.

Thank you very much for your help!

 

If you can think of a solution to solve the problem in labviev it would be a great step forward.

 

Steffen

0 Kudos
Message 9 of 9
(3,507 Views)