05-15-2013 05:56 AM
Hello ,
I am working on laser detector, am using labview for controlling my circuit. Firstly I have pulse signal from function generator which goes to the laser , then I have a photodiode which detects the laser intensity gives the voltage respectively with sum other external circuits. So for the task in labview I need to discharge a capasitor using a trasistor as a discharge resistor, I need to synchronize the function generator signal and generate a analog pulse of 100ms in labview which is high when the signal in function generator is low , and store the charge of the capasitor on to a file .
I have ni USB 6009 to work with, so I have three signals here 1 to AI0 to acquire signal from function generator , AI1 to save the file and need to generate a analog pulse of around 100ms high . Am very very new to labview in fact this the first time am using it . Is there any examples or suggestions on this topics from expects will be helpful.
the requirements are to use the external function generator to trigger on and off of the trasistor
05-15-2013 03:29 PM
Hi pram1,
From your description then, you need to:
1) Acquire a voltage through an analogue input .
2) Save this signal to a file.
3) Generate a pulse. Could you clarify what you mean by an analogue pulse.
From the sounds of things what you want to achieve is some basic DAQ (Data Acquisition) along with some data logging. I think the best place to start would be the Example Finder. There are some really good examples that you could easily adapt to achieve the functionality you want.
You can open the example finder in LabVIEW by going to 'Help' > 'Find Examples'. From there, try searching for 'DAQ' and 'Datalogging' to find relevant examples.
Good luck with your application!
05-15-2013 09:05 PM
Hello !!
I have solved the problem in generation, but i am facing new problem ....i.e data reading and writing are not synchronised...
below attached the block diagram image , can you please suggest me how can i parallely run the two while loops at a time... so that in upper loop data writes and in the lower loop data reads...
thanks in advance !!!
05-16-2013 02:54 AM
Hi Pram,
So am I correct in thinking you want the write to occur first, after which you want a single read to happen?
Or is is that you want both tasks to happen start at the same time, and execute simultaneously?
Kind regards,
05-16-2013 10:43 AM
Thanks for the response !!
yes i need both the loops to be run at the same time...
i.e write data at output ports and read data coming from outer hardware simultaneously...
thanks in advance !!!
05-17-2013 03:13 AM
Hi pram1,
So from your description, you need both the input and output to happen at the same time.
I'm guessing then, that they need to run at the same rate. In which case, having to paralell loops might not be necessary.
If they both run at the same rate then you could just put them in a single loop and use data-flow to ensure when the read and write both execute.
I've attached an example of this, that should help make this clear for you.
Kind regards,
05-17-2013 05:53 AM
Hey , I could not open this VI , It says my LV is older version. I tried in 2 computers.
05-17-2013 06:02 AM
Hey pram1,
What version of LabVIEW are you using?
05-17-2013 07:33 AM
hello
I am using labview 2011 version .
thanks
05-17-2013 07:33 AM
hello
I am using labview 2011 version .
thanks