From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-27-2012 04:41 PM
Hi all 🙂
I'm trying to build an application to create a thermal image.
Basicly application must control two step motors (this part is done ) to move from point to point.
In every point I must read n-samples (lets say 1000) of voltage values from my reference signal (from generator) and second signal from microphone (this is used to read pressure). After reading that amount of samples I must calculate amplitude and phase shift between those two signals and store those values in 2 pictures (one for aplitude and second for phase shift).
My questions are: how to synchronize data aquisition using Measurement Studio 2010 and C# from one device (USB-6251), basicly from 2 channels.
How to calculate aplitude and phase shift?
I have Measurement Studio 2010 Enterprise so I have full access do data processing libraries.
I will be greatefull for any advices and sorry for my pour English.
03-28-2012 05:10 AM
Hello,
At this link on the page 143, you have the synchronization methods for M-Series boards
http://www.ni.com/pdf/manuals/371022k.pdf
The amplitude you will just measure it, the phase shift, what kind of signal are you expecting to read?
Kind regards,
Ion R.
03-28-2012 07:25 AM
Thanks for reply 🙂
I've downloaded drivers dvd and using daq assistant in visual studio I've created an application that reads from two analog channels.
I don't know if they are synchronized, basicly do they must be?
About my expectations to the signal: Reference signal if from external generator (it will by sin signal). I will read n samples no be shure I have read 3 periods (sorry for word if it is incorrect, but I don't know profesisonal term).
The second signal will be I guess a sin signal too, but as I have written before it will come from a micophone inside a hermetic box. In that box will be a sample that will by heated by laser point by point. Laser is using my reference signal.
I'll try to do a schema of whole device.
I would really appreciate some code samples with synchronization (if it is necessary), amplitude measurement and that phase shift
03-29-2012 05:24 AM
Hello,
Well, the synchronization part is easy to do, you can start from the example "SynchronizeTwoAIContinous" and than customize it according to your application. The example it is installed once with Measurement Studio.
The amplitude is the information you get from the reading. What do you think you are measuring there?
Also, can you provide me more information about the project? What is the final purpose? Is that a project in your company?
If you can provide the schema for the whole system it will be much more easier.
Kind regards,
Ion R.
03-29-2012 06:40 AM
Sorry for such questions, but as I was saying it is the beggining of Measurement Studio form me.
The porpuse of my application is to create thermal images using a photo-acoustic scaner.
Scaner looks like that:
In small hermetic box is sample of material for which we want to create the image. Inside is microphone that is used to measure pressure.
Above box is laser that is modulated from reference external generator. The laser can be moved to any x,y coordinates of sample (sample is small, about 2cm x 2cm)
I must acquire n samples of reference signal and n samples of signal from microfon (on the way is amplifier) - this is done for every point.
After acquisition I must measure amplitude and phase shift of those 2 signals (I think that amplitude shoud be the same?)
This two values: amplitude and phase shift become then a pixel in my target image (I create 2d arry of values and then scale them to 0-255 and display as image)
I hope that this makes sence, because I was creating description using google translate 😛
This application I am working for is for my finale thesis on my studies.
At home I will create a schema to show all connections.
03-30-2012 01:59 AM
If you are a beginner in Measurement Studio, why don't you use LabVIEW, it is much easier to do all this in LabVIEW.
Ion R.
03-30-2012 08:34 AM
I would like to use LabVIEW but my promoter (proffesor from my university) said it must be a C# application.
Besides I'm controling two stepper motors with custom made usb interface (using COM commands).
I would really appreciate any help with code 🙂
04-02-2012 10:00 AM
I suggest you to start with the Help that you get when you installed Measurement Studio and if there is specific something that you don't understand, feel free to post it here.
Kind regards,
Ion R.
06-08-2012 04:47 AM
Hi again, I know it's been a while since I wrote something here.
I'm still trying to solve my problem with signal processing.
For last months I was busy doing other stuff at my university, but end date of my project is coming sooner and sooner.
I found a really good example in Analysis>Enterprise>Filtering.
I'm trying to modify it to as following:
Right now it displaying signal, magnitude and phase graph and all counting, filtering is done super fast 🙂
What I need to do is to acquire 2 finite sets of samples, this is quite easy thanks to daq assistant that allows to create sample application that acquires the needed data.
When creating new project and looking into code I had seen that result of acquisition is stored in AnalogWaveform<double>[] array.
What I would like to do next is to find amplitude and phase of that signal (array).
When reading data I know it's rate, samplesPerChannel and minimum and maximum.
Please forgive me not knowing the basic knowledge of signal processing, with it I'm sure it would me easier to create such a project that on which I'm pulling my hair off 😛
Any words of advice, links, especially examples will really really help me.
I'll be happy to share my code when I'm finish with this project.