04-05-2015 03:53 PM
Hello,
I trying to write a VI ( attached) that will sample an analog voltage coming through a an analog MUX. I using a flat sequance structure to change the select signals outputs to change the channel being sampled. I am wondering if I can turn on the structure only when my Sample boolean input is TRUE?
Solved! Go to Solution.
04-05-2015 04:01 PM
You can use a case structure with your boolean input as the case selector.
http://www.ni.com/getting-started/labview-basics/execution-structures#Case Structures
The six hour LabVIEW introduction is a great start if you are just getting into LabVIEW.
http://www.ni.com/white-paper/5241/en/
04-05-2015 05:08 PM
04-05-2015 05:30 PM
Thanks to your comment, I realized that this VI will not do what I want. What I want is this:
if (sample is true)
{
output=00
take a sample
then:
output=01
take a sample
then:
output=10
take a sample
}
Any Idea on how to implement this?
04-05-2015 05:35 PM
@malbaloo wrote:
Thanks to your comment, I realized that this VI will not do what I want. What I want is this:
if (sample is true)
{
output=00
take a sample
then:
output=01
take a sample
then:
output=10
take a sample
}
Any Idea on how to implement this?
Perhaps you should consider studying the online tutorials. http://www.ni.com/academic/students/learn-labview/
There are no shortcuts to actually *knowing* how to program in LabVIEW.
04-05-2015 06:20 PM
04-05-2015 06:22 PM
@malbaloo wrote:
Thanks to your comment, I realized that this VI will not do what I want. What I want is this:
if (sample is true)
{
output=00
take a sample
then:
output=01
take a sample
then:
output=10
take a sample
}
Any Idea on how to implement this?
What kind of hardware are you using for your inputs and outputs?
How much time will you need in between sending your outputs and receiving your inputs?
04-05-2015 06:43 PM
04-06-2015 07:07 AM
@malbaloo wrote:
Thanks to your comment, I realized that this VI will not do what I want. What I want is this:
if (sample is true)
{
output=00
take a sample
then:
output=01
take a sample
then:
output=10
take a sample
}
Any Idea on how to implement this?
That sounds like a simple FOR loop with Set Output and Take Sample inside, autoindexing on the output value.
04-06-2015 12:24 PM
Thank you all for your replies.