Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

Align and resample

Dear people,

I am trying to acquire force and displacement using 2 diferents NI modules. NI 9220 for voltage (displacement) and NI 9237 for force (bridge).

So i detected both signals start at the same point but they have different dt intervals. 

I am trying to use the VI ALIGN AND RESAMPLE to make the synchronization between them but not sucessfully.

Does anyone can help me ?

Here one can have my hole VI i am using. 

 

0 Kudos
Message 1 of 8
(5,831 Views)

To make it easier for the community to help you, attach some measurement files. Also, consider attaching your file reader for the measurement files.

 

To make it easier to help yourself, separate out the function you are learning to use. Input known signals with known delays and compare outputs to expected results.

Doug
NI Sound and Vibration
0 Kudos
Message 2 of 8
(5,822 Views)

Hey Doug,

thanks for your answer. i have read the help about the VI "align and resample" and it seams to me very usefull for my proupose. 
Although, i am not been able to make se sync. Can you explain me for what should i use the "align and resample" VI and why its not working here for my specifical case ?

 

Thanks again,

Arthur. 

0 Kudos
Message 3 of 8
(5,816 Views)

Hey Arthur,

 

 

Considering that your goal is to synchronize data acquired from a set of C Series Modules (NI 9220 and 9237), I encourage you to try doing this synchronization at the Hardware level using DAQmx API. Below you have an article explaining how to synchronize AI C Series Modules using DAQmx.

 

Synchronizing Analog Input C Series Modules with NI-DAQmx in LabVIEW
https://www.ni.com/en/support/documentation/supplemental/21/signal-based-synchronization-of-analog-i...

 

As for the different dt's you mentioned, Actual Sychronization basically means that:

 

  • All modules share the same start trigger, AND;
  • All modules share the same timebase;

i.e., you can have modules with different dt's, but still synchronized. You can, for example, have both temperature (10S/s) with Vibration (50kS/s). So, Why is it important for you to have all of them with the same dt?

 

If it is possible, please share further details of your application so the community can give you a better help.

 

Have a great week!

 

Felipe Flores
Technical Support Engineer
National Instruments
0 Kudos
Message 4 of 8
(5,781 Views)

(EN) Hey Felipe, thaks for your answer.

I have already read the tutorial you just posted above. To be honest, i didnt understand very much. I cant find those icons as sample clock, time base and others sown in tutorial. 

I also aready have read they must share the same trigger and timebase but cant realy find it. 

I am acquiring dynamical data from an experiment wich runs at 20 Hz in a eletromechanical shaker and have to acquire force and displacement, they must be aligned otherway they will show diferent results.

Thanks again. 

 

(PT) Olá Felipe, obrigado pela sua resposta.

Eu ja tinha lido este tutorial antes mas para falar a verdade eu nao consigo acessar esses icones que o tutorial mostra. eles nao fazem parte da palheta de funções nem da paleta do block diagram. Eu tambem tinha entendido que eles devem dividir o mesmo trigger e o timebase mas nao consigo acessar essas opções no daq. Será que voce poderia me ajuda a fazer com que eles dividam essas duas propriedades ?

Estou realizando um experimento que cicla a 20 Hz. Preciso aquisitar força e deslocamento de um ponto e portanto eles devem estar sincronizados para representar o estado dinamico do sistema naquele momento. Eu tambem nao consigo fazer os dois modulos aquisitarem em frequencias diferente. Como utilizo apenas uma VI de daq para todos os modulos, o NI9220 e Ni9237 aquisitam com a mesma taxa. 

Valeuuu um abraço !

0 Kudos
Message 5 of 8
(5,776 Views)

Hey Arthur,

 

I believe the easiest way for you to have those channels synchronized will be putting both channels in the same task. I did that in MAX and it worked fine, as you can see in the image below.

 

Capture.JPG

 

For instructions on how to do that, please refer to the KB article below.

 

Create Multiple Analog Measurement Types Task in MAX
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x11DCAQ&l=en-US

 

I think that can do the job!! Give it a try and tell me if that worked!


Those icons you mentioned are the low level programming functions of the NI-DAQmx API. They are a little bit more complex than DAQ Assistant, but give you more flexibility, which may be required, depending on your application. I encourage you to review the article below.

 

Getting Started with NI-DAQmx: Getting Started with NI-DAQmx Programming in LabVIEW
https://www.ni.com/en/support/documentation/supplemental/06/getting-started-with-ni-daqmx--main-page...

 

NI aslo has a training for Data Acquisition

 

Data Acquisition Using NI-DAQmx and LabVIEW
https://www.ni.com/en/shop/services/education-services/customer-education-courses/data-acquisition-u...

 

Sincerely,

Felipe Flores
Technical Support Engineer
National Instruments
Message 6 of 8
(5,761 Views)

When I retarget the DAQ Assistant to point to simulated hardware on my system, your code works for me.

 

On your system, verify your signal data after each operation in Sincronizando (1) VI. Which function produces unexpected results?

 

Similar to discussion in your other post, please consider expected system delay between force and displacement in your test.

 

You want to synchronize hardware. You want to remove delays due to measurement hardware differences (40.25 samples). You probably want to measure (rather than remove) phase delay between Force and Displacement.

 

Align and Resample VI can be a great tool to align the timebase of signals (even if sampled at different rates or start times). However, this function is not intended to align pulses or to align phase between channels. Search for 'alignment' in Example Finder for use cases. For impulse measurements evaluate use of Pulse and Transition Measurements. If you have a sinusoidal signal, consider use of Gain and Phase or Extract Single Tone.

 

Doug
NI Sound and Vibration
0 Kudos
Message 7 of 8
(5,752 Views)

Hey Arthur,

 

Could you review the suggestions above? Any of them could help you?

 

Please, let me know if we can give you further help on that.

 

Fique à vontade para postar suas dúvidas e passe sempre o máximo de informação possivel. Isso ajuda muito!

 

Um Abraço!!

Felipe Flores
Technical Support Engineer
National Instruments
0 Kudos
Message 8 of 8
(5,738 Views)