LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone have a slick way of developing a questionnaire in Labview?

 I am struggling trying to develop something with a few checkbox questions, a few user text input questions and some slider control questions. I have been struggling using the 'Configure Prompt User for Input"  - I am thinking there must be a better way than using this?  It doesn't seem to have the flexibility that I need (eg., restricting the number of choices the user can select).  Any help would be really appreciated!  Thanks so much.

0 Kudos
Message 1 of 13
(2,987 Views)

This sounds like a really interesting use of LV!

 

1. Please show what you have tried.  It is usually much easier to suggest improvements or modifications to an existing attempt than to put something together from a simple expression of what is wanted.

2. Can you be more specific about the types of questions (and answers)? How often do you need to change the text of the questions? Are the answers mutiple choice or essay? What do you mean by a slider control question?  Is the slider the question or the answer?  How will the answers be processed?

 

Lynn

0 Kudos
Message 2 of 13
(2,972 Views)

Here is a sample of what i have been experimenting with - I am not really pleased with any of them so far...  not the best solution I am sure...

0 Kudos
Message 3 of 13
(2,967 Views)

I can see something of what you are trying to do.

 

Some comments after just a quick glance:

1. Use of stacked sequence structures is almost never a good way to set up a program.  It obscures code and is very difficult to modify.  Look at what you would need to do if you wanted to put question 3 after question 4.  How easy would it be to make a mistake?

2.  Learn about State machines.  They are versatile, robust, easily modified, and generally good practice.  Several examples and Design Patterns for state machines come with all recent versions of LV.

3. I will need some time to think about your controls issues.

4. You can edit the Express VIs. Just context-click on the icon and choose Open Front Panel.  I have not looked at how they work but you can probably modify them to limit the responses.

 

Here is a quick modification which eliminates the sequence structures.  To make a state machine from this is a short step.

 

Lynn

 

Message 4 of 13
(2,964 Views)

Believe it or not - I haven't had a chance to experiment with state machines but they look very powerful.  I have looked at the examples of the event structures - but it wasn't obvious to me how to translate them to my present structure...  the sequence structure seemed logical to me as I want the questions to appear sequentially...

0 Kudos
Message 5 of 13
(2,956 Views)

And the mentioned the problem comes if and when you need to modify the order of the questions. Or if you want to skip certain portions under certain conditions. Sequence structures are very rigid code constructs and should be used very rarely. If you get in the habit of using them regularly it is only a matter of time until their use bytes you in the butt and makes your life difficult.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 13
(2,931 Views)

Hi PA_UW,

 

If you do want more information regarding state machines I would recommend checking out the State Machine Tutorial. Otherwise, one of the VI templates is a Standard State Machine template (Crete New>>VI>>From Template>>Frameworks>>Design Patterns>>Standard State Machine). These templates are design to provide basic program architecture which you can be build off to create a custom VI. To find the VI templates go to File then New in LabVIEW.

 

I hop that information is helpful!

Matt
NI Community Team
National Instruments
0 Kudos
Message 7 of 13
(2,909 Views)

Thanks - I will check those out when I have more time.  I appreciate the suggestions.  Right now getting the questionnaire up and running is my priority!  I have been exploring radio buttons and they may work well actually - super simple really.

 

0 Kudos
Message 8 of 13
(2,902 Views)

@PA_UW wrote:

Thanks - I will check those out when I have more time.  I appreciate the suggestions.  Right now getting the questionnaire up and running is my priority!  I have been exploring radio buttons and they may work well actually - super simple really.

 


Words of wisdom from years of experience. A little thought up front goes a long way to make your life easier down the road. If this application/questionnaire will live for some time take the time and effort to use the right architecture from the beginning. If you take the easy way (sequence structures) now because it seems faster you will most likely find yourself boxed into a corner later on. At that point in time fixing the problem and doing it right will take a lot longer than the time you spend now to start out right. Poor design decisions are VERY costly later on.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 9 of 13
(2,897 Views)

Thanks - very helpful advice!

0 Kudos
Message 10 of 13
(2,888 Views)