LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Design a VI for giving a warning signal followed by a go signal for a Simple Reaction time task

Solved!
Go to solution

I agree with you on that, the flat sequence structure has its own inherent disadvantages. And having calculations outside the sequence is a great idea.

0 Kudos
Message 21 of 32
(553 Views)

Hi the use of case structure and the indicators showing exact timing interval makes your design an ideal one. Thanks

 

I am still trying to understand the data flow in your design, because I need to further modify it to suit my experimental set up:

e.g. I need to generate some kind of output from warning and go signals, which I can feed into my data aquisition hardware, so as to mark an exact timing of these signals on my data record.

 

Thanks of all the valuable inputs

0 Kudos
Message 22 of 32
(546 Views)

@docas77 wrote:

Hi the use of case structure and the indicators showing exact timing interval makes your design an ideal one. Thanks

 

I am still trying to understand the data flow in your design, because I need to further modify it to suit my experimental set up:

e.g. I need to generate some kind of output from warning and go signals, which I can feed into my data aquisition hardware, so as to mark an exact timing of these signals on my data record.

 

Thanks of all the valuable inputs


This is a whole different can of new worms.  The display has its own latency and timing and is not precisely correlated to any DAQ event.  If you need "exact" timing then you will need to have a photo sensor mark when the display color changes and send that signal to your DAQ recording.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 23 of 32
(542 Views)

Learning to not use sequence structures is just the tip of a very large iceberg. The larger point is learning ot think in LabVIEW. Every language encourages its own way of thinking about problem solving and you will find that there are many concepts from text-based languages that don't apply in LV because LV doesn't suffer from the constraints that text languages have to deal with.

 

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 24 of 32
(541 Views)

Hi, 

 

I tried to use DAQ assist and DAQmx, to generate analogue voltage output whenever the warning or the Go signal turns on.

 

But I feel there is some error in my using these functions, because during the first iteration (One trial i. e. one warning light followed by Go light) the DAQ asst seems to function fine (though there is a slight mismatch of timings, approx 2ms), but during subsequent trials, the DAQ asst does not seem to generate an output.

 

Iam attaching the VI. I will be grateful if someone can help.

 

Thanks 

0 Kudos
Message 25 of 32
(521 Views)

Ok, next thing to learn: feedback nodes can be helpful but before you start with them you need to get comfortable with shift-registers (which is what they replace). The feedback nodes are confusing things badly.

 

Also you don't need to be constantly be setting the buffer size. If needed, you do it once when you open the task. You should also get rid of the Express VIs and learn how to use the DAQmx API directly.

 

A trick that I learned a while ago is to create a task in MAX that does what you want. Now go into LV and on a block diagram drop down a DAQ Task constant. Click on the little down arrow in the constant and select your task from the list.

 

Finally, right click on the constant and down towards the bottom of the menu will be the item Generate Code. Go to that option and select Configuration and Example from the submenu. At this point LV will write the code for you to duplicate your task. This is a greate learning tool.

 

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 26 of 32
(504 Views)

@docas77 wrote:

I tried to use DAQ assist and DAQmx, to generate analogue voltage output whenever the warning or the Go signal turns on. 


There is a delay between when the Go signal turns on and when the voltage output changes.  This will depend on CPU load, and type of OS.  It can be anywhere from microseconds to 100 msec.

 

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 27 of 32
(502 Views)

I got rid of the feedback nodes, and used DAQmx global channel constant. 

 

Now the VI is running and giving an output as desired. The delay might be an issue, when I compared the case cluster structure (which Iam using now) with the earlier flat sequence, the case structure VI had very minimal delay in my system as compared to the flat sequence.

 

However since I am interested in calculation reaction times, even a few milliseconds delay might not be desired. I was wondering if it is possible to calculate this delay, then I can always apply a correction to my results.

 

I am attaching the VI for your comments and suggestion.

 

Lastly now I am working on modifying this VI, to include other signal i. e. a red Led. I desire to write a program wherein:

1.  2000ms wait --------- Yellow light turns on ---------- stays for 80 ms -----------Random interval (1-3 s)   :  It is same so far

2.  After random wait --------80% of times Red light turns on (stays for 80 ms)   &  20% of times Green light turns (stays for 80 ms)

 

As of now I have used random numbers to create the 80:20 paradigm - But I feel Pseudorandomization might be required because I want the same probability of red or green lights in all trials.

 

Secondly again I feel because of the delay issues, case cluster structure will be better, but I was not able to define the case selection variable for this additional red light and 80:20 paradigm. So I am attaching the flat sequence VI for this new task. 

 

Please advice on these aspects:

 

1.   How to calculate time delay between lights turning on and voltage output (VI attached)

 

2.  Suggestions for writing VI for the new Task mentioned above,

a) ? Psedorandomization

b) ? Case selection variable for this 80:20 paradigm.

 

Thanks

 

Download All
0 Kudos
Message 28 of 32
(481 Views)

Please I am awaiting your valuable suggestions, which have helped me immensly so far.........

0 Kudos
Message 29 of 32
(461 Views)

Well this sounds more like a software specification.  I am sure that many here on the board will be willing to give you a quote on such a program.

 

There is a difference between helping with a specific problem and suggesting solutions and what you are asking.  Now you are asking for the rest of your task to be done gratis.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 30 of 32
(457 Views)