LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HELP to acquire and create, beginner and scientist i am

Hi,
I'm a beginner in labview. I followed the training sessions and i have a book , bu there are still some holes !
My aim is to build a VI for a scientific purpose: acquiring datas for differemt stimulis.
I want to record one analog input, one digital input and output one digital, one analog.
the firt analog input is continuous as it is eyes movements but i want in the same time acquire the digital output randomly selected from a sequence previously created by another VI. That is the reason why i'm using an analog output from the data used to digital out in order to acquire this analog for a sampling freq of 250Hz and plot the two analog inputs in real time on a graph (EOG and stimulus).
The sequence fo the digital ouput is in a for loop which is now at 5 but it will be at 120 later on. IN this loop, each data of the sequence must be switch on for 100ms and switch off until the next data.
I want to finally save all teh data in a array with time in ms, analog input one and analog input 2.
 
Does it make sense to anyone ? Can somebody have a look on my VI and give e some advices to finish it ?
thanks in advance and if you know some good tools to learnm properly to use it, let me know
 
Francois 
0 Kudos
Message 1 of 17
(3,519 Views)
Hi Francois,
 
I have set up a multifunctional DAQ card and am using it to run your code.
Can you tell me more specifically what adjustments need to be made; any functionality you need to add, any limitations within the current code which you want to eliminate etc...
 
Regards
 
Emma R
 
NIUK & Ireland
0 Kudos
Message 2 of 17
(3,476 Views)
Hi emma,

In fact first i want to be sure that the sequence in the for loop (n=120) will trigger my digital ouput (stacked sequence 0)for a duration of 100 ms(stacked sequence 1), stop it after (stacked sequence 2)and wait for about 2500ms to the next digital output of the same sequence. You'll find in attachment an example of the sequence file used in the VI. My main problem is to fix the time delay between each stimulation  (number of the sequence).
Also, during that, i want to plot in real time the analog outputs (EOG and stimulation), to finally save all the datas (time in ms, EOG and Stim) in a txt file for a sampling frequency of 250Hz. Where to fix the sampling frequency and be sure iof the data at the end ?
So there is a lot to do i think, no ?

let me know if it is more clear now ?
thanks
0 Kudos
Message 3 of 17
(3,475 Views)

Hi Francois,

A simpler way for you to manage the timing of your loops would be to use the "timed loop" VI.

This can be found if you call up the functions pallette, all functions pallette, structures pallette, timed loop pallette. It's the top VI on the left of the timed loop pallette. I have attatched a screen shot of the the selected VI showing the pallette path open.

I suggest that you place the VI on your block diagram then open the context help by clicking the help menu at the top of the screen, selecting show context help, hover your mouse over the "timed loop" VI and select the "click here for ore help" within the context help window.This popup explains the functionality of the VI and has links to working examples which will help you apply the VI within your code.

I hope this helps you

Emma R

NIUK & Ireland

0 Kudos
Message 4 of 17
(3,460 Views)
ok but how to show the analog output in real time in my graph with a sampling frequency of 250Hz and save all the results in on only file ?
thanks
0 Kudos
Message 5 of 17
(3,456 Views)

Hi Francois,

Can you post up your most up-to-date version of your code for me please?

As any changes you make may affect as to which solution will be most suitable for your code.

Thanks

Emma R

NIUK & Ireland

0 Kudos
Message 6 of 17
(3,427 Views)
Hi Francois,
 
Could you please post the most up-to-date version of your code for me?
As any changes you make may affect which solution is most appropriate for you application.
 
Emma R
 
NIUK & Ireland
0 Kudos
Message 7 of 17
(3,415 Views)
.
0 Kudos
Message 8 of 17
(3,416 Views)
 
0 Kudos
Message 9 of 17
(3,416 Views)

Hi Francois,

Could you please post your most up-to-date version of your code?

As any changes you have made may affect what solution is most appropriate for your application.

Emma R

NIUK & Ireland

0 Kudos
Message 10 of 17
(3,415 Views)