Jump to content

Labview please help


fifa

Recommended Posts

Posted

Hi,

Can anyony help me to design a VI that will be capable of detecting and displaying the start index and the length of each thin patch. (Thin values are numbers of successive elements less than 1).

Attached is a sample data to be used.

Sample%20Data%2011.vi

Posted

Here's a really rough start showing how to find your "thin patches"; you can work out the start and length from the Array of integers (or, build that as you go in the For Loop).

post-7534-0-24580700-1289828795_thumb.pn

Posted

Hi jcarmody,

Thanks for your reply.

I checked your VI and I realised that there is a missing count. if you have a look again you'll see that it miss a count from 13 to 16 instead to 17, from 46 to 49 instead to 50 and from 61 to 63 insteady to 64

I tried to make some changes to get it right with no success.

Do you think it's ok the way it looks?

Posted

There are built in labview functions that perform threshold tests.

Additionally they are much more full featured and probably more useful for most applications.

you might start with the peak detector.

~Jon

Posted

Hi jcarmody,

Thanks for your reply.

I checked your VI and I realised that there is a missing count. if you have a look again you'll see that it miss a count from 13 to 16 instead to 17, from 46 to 49 instead to 50 and from 61 to 63 insteady to 64

I tried to make some changes to get it right with no success.

Do you think it's ok the way it looks?

You're right, but the start index is correct and you can just add one to the length.

Posted

Hi I have made some change on the circuit the way it suppose to work but I still can not get the number of elements less than 1 for each index where values less than 1 starts.

I have Attached the modified VI. I only need the number of elements for each thin patch. it sould look like this:Index 13 ------- 5 elements

Index 46 ------- 5 elements

Index 61 ------- 4 elements

I will appreciate for any help

LabviewQ2.vi

Posted

Fifa,

make sure that you state in which version you're VIs have been saved. Otherwise people will think they can open it with the version saved by default in your profile.

I don't have LV2010 installed, so I can't get access to your code to chip in. If it's not saved in the default version of your profile, add a small note next to your VI.

<a href="http://content.screencast.com/users/normandinf/folders/Jing/media/3cdc0ec4-d64a-48f4-9050-8497cd8f4d78/2010-11-17_0803.png"><img'>http://content.screencast.com/users/normandinf/folders/Jing/media/3cdc0ec4-d64a-48f4-9050-8497cd8f4d78/2010-11-17_0803.png"><img class="embeddedObject" src="http://content.screencast.com/users/normandinf/folders/Jing/media/3cdc0ec4-d64a-48f4-9050-8497cd8f4d78/2010-11-17_0803.png" width="461" height="390" border="0" /></a>

Posted (edited)

You are almost there. All you really need to do is add logic to find the end of the patches and subtract indexes (see lower half of snippet).

post-11268-0-70132100-1290000994_thumb.p

Note: If the data ends in a thin patch, you will not get a length out for that patch without some extra logic after this loop.

Edited by crossrulz
  • Like 1
Posted

Fifa,

make sure that you state in which version you're VIs have been saved. Otherwise people will think they can open it with the version saved by default in your profile.

I don't have LV2010 installed, so I can't get access to your code to chip in. If it's not saved in the default version of your profile, add a small note next to your VI.

<a href="http://content.screencast.com/users/normandinf/folders/Jing/media/3cdc0ec4-d64a-48f4-9050-8497cd8f4d78/2010-11-17_0803.png"><img'>http://content.screencast.com/users/normandinf/folders/Jing/media/3cdc0ec4-d64a-48f4-9050-8497cd8f4d78/2010-11-17_0803.png"><img class="embeddedObject" src="http://content.screencast.com/users/normandinf/folders/Jing/media/3cdc0ec4-d64a-48f4-9050-8497cd8f4d78/2010-11-17_0803.png" width="461" height="390" border="0" /></a>

Hi,

Thanks for your reply here is the one saved in version 8.6

LabviewQ2.vi

Posted

You are almost there. All you really need to do is add logic to find the end of the patches and subtract indexes (see lower half of snippet).

post-11268-0-70132100-1290000994_thumb.p

Note: If the data ends in a thin patch, you will not get a length out for that patch without some extra logic after this loop.

Hi Crossrulz,

I've tried many times and I also ended up with 1s for the elements and many more other numbers, but I still could'nt get it right.

So I am still strugling to get the right results.

Anyway tanks a lot for what you've done

  • 3 weeks later...
Posted

All should know that this is a homework assignment, confirmed over at the NI forum by professor who actually gave out the assignment. He has asked that no further help be provided.

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.