LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database to labview

Hi,

 

I need to design a LabVIEW vi which displays questions for a Quiz.

I want the vi to randomly display questions from an already prepared database and evaluate the answer.

How do I proceed with this?

0 Kudos
Message 1 of 10
(4,136 Views)

I am not familiar with databases, but you should specify more your project in details, so others can help you. What kind of database you want to use?

0 Kudos
Message 2 of 10
(4,099 Views)

read this 
it is helpful this

0 Kudos
Message 3 of 10
(4,083 Views)
Actually, assuming that the OP is using the term "database" in a rigorous sense, the last thing they need is to use the DCT. Before we can say anything in detail, we need to hear the answer to Blokk's question.

And I have one more of my own to the OP: Is this homework for a class you are taking? This sounds like a homework assignment.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 10
(4,060 Views)

Okay.Let me put it this way:Each question has to be chosen from a collection of questions classified as simple,medium and advanced.It could even be a 2D array of 1000 questions with their answer.

 

This is not a HW question.

 

The details are:

 

  1. The test should have an introductory screen with instructions and a START button.
  2. Click on the START button and the test screen appears.
  3. The test screen will have
  • Question 1 .Each question need to be randomly chosen from a database.
  • A textbox to enter the answer. If the answers are restricted to a single digit integer from 0 to 9, it can be given as a rotary dial.
  • A time bar indicating elapsed time from preset maximum.
  • A feedback field. On answering Question 1,there need to be a ‘Correct’, ‘Incorrect’ or ‘Timeout’ display as the case may be and the screen should display Question 2.
  • A performance indication bar indicating if the participant’s response is below average or above average should be present.
  1. Each question can be attempted only once.
  2. The preset maximum of time bar should be reduced to 75% if the participant gives 3 consecutive correct answers.
  3. Once the last question is answered, a GET SCORE button should appear clicking on which the score will be displayed.
  4. Questions can be of various difficulty levels. A training session can be given to the participant prior to the actual test in order to assess the average time he takes to solve questions of each difficulty level. This can be used to set the max time in time bar.
0 Kudos
Message 5 of 10
(4,012 Views)
Where are you stuck? You haven't attached any code or explained a specific problem. Have you even designed the database yet?

I would recommend a multiple choice format so you don't have to do complicated analysis of whatever is written on the text box.
0 Kudos
Message 6 of 10
(3,997 Views)
It's also worth bearing in mind that generally when talking about databases - people will think you mean something like a MySQL / MSSQL / Access database.

I think in this case - you could do something just fine with just a text file containing your questions, the 'difficulty' and the answer (unless you wanted to get really clever and encrypt the data so you can avoid someone just opening up the file to get the answers!).

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 7 of 10
(3,973 Views)

Multiple choice format may lead to mere guessing of answers.

 

I have an Intro VI and Qst VI as attached below.

 

I need to introduce a timer where the maximum is set differentely for different participants based on his/her training session.

Download All
0 Kudos
Message 8 of 10
(3,961 Views)

Initial thought was to use MySQL database and hence that was mentioned.

0 Kudos
Message 9 of 10
(3,955 Views)

Nothing wrong with using a database for this application although it is a little overkill.  If you're familiar with databases go for it.  If not just use a simple flat file with your questions and answers.  If you try to use the Database Connectivity Toolkit you'll find that it stores everything as binary variant datatypes and then converts it back to LabVIEW datatypes when you query the data back into LabVIEW code.  That means you can't always even view or modify your database info with other tools (depending on how complex your LabVIEW datatypes are).

 

This guy has a pretty nice tutorial and toolkit that uses the simpler ADODB (ActiveX) calls that just involve invoke nodes instead of the toolkit:  http://home.hit.no/~hansha/documents/labview/training/Database%20Communication%20in%20LabVIEW/Databa...

 

There's a link to his blog and DB toolkit in the PDF.  The tutorial is very in-depth including database theory, setup, access, etc...

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 10 of 10
(3,917 Views)