03-07-2013 10:55 PM
Hi,
I have attached two files and the file 1111.vi is the modified file from the other one.This does control the LockIn amplifier.I use this program for
my research.As you can see in 1111.vi,I have programed it,So that I can save the data which is given by the LockIN amplifier to a certain file.
If 1111.vi does not work.Please look at the otherfile.It is the same thing other than the extra things I programmed to 1111.vi.In 1111.vi,I programmed a
timed loop.My intention to do it is to save data in every one minute.But I could not save data for every one minute.I need to control the data saving function in time manner.
for ex: some time I need to get data in every one minute and some times in every two minute.Likewise,I need to execute this program in timely manner.
please let me know how to do this,thank you very much..
Rakhitha
03-11-2013 10:56 AM
Hi fdfdf,
Are you going to be triggering when the data needs to be acquired manually or are does it follow some pattern. It may be possible to use a state machine or possibly a producer/consumer type architecture. Could you also go into more detail about the use of the timed loop and what you are using that for? Lastly, are you running on a Windows operating system or a real time operating system?
State Machines:
http://www.ni.com/white-paper/3024/en
Producer/Consumer:
03-11-2013 11:35 AM
Hi,
I need to trigger when the data needs to be acquired manually.Yes,I do use Windows 7.Normally,when I tried to acquire data for every 2 second,I could do it.But I need acquire data for every second and less than that.
I think SR530 program will not allow me to do it.Because for one single itteration,It takes minimum 2 sec to complete.this is my problem
thanks.
03-12-2013 04:48 PM
Hi,
Windows will be able to provide that level of accuracy down to about a couple milliseconds. The timed loop can be used but a basic while loop with a wait should suffice because the benefits of the timed loop are not utilized on a Windows Operating system. I believe that an event driven state machine that incorporates a producer/consumer loop will be the easiest to implement in this case. The document that I linked below walks through a lot of different design patterns and I would pay special attention to the event driven patterns.
ftp://ftp.ni.com/pub/events/labview_dev_ed/2009/labview.pdf
03-14-2013 09:17 PM
Hi,
I tried the producer/consumer method.It did not work on my problem.I did the producer/consumer programing correctly.I will attached the simplets version of my program.
There you can see that the output gives in every 2 seconds almost.I need to improve it,So that I can get the output less than that.ex: for 500ms or so..
please follow this program and advice me how to do this.I will attach the producer and consumer test program too..thanks
03-15-2013 09:18 AM
You should not be calling the subVI as is. You need to separate the setup and configuration commands and call them prior to the main loop running. For the fastest measurement, call only the measure function of the instrument.
03-15-2013 11:37 AM
Hi,
Actually I do not know how to do it.Because I downloaded that SR530 driver from the National instrument.Can you please show me how to do it.
When I run the program without plugin the GPIB cable it works fine..But when I pluged it in,it gives that minimum 2 sec delay..I think when the data is receiving from the LOCKIN amplifier,the delay occurs.
But I have no idea how to fix it.Can you please show me that.thank you very much.
03-16-2013 09:39 AM
In order to modify that driver, you will need to study the programming manual and the code that is provided. It is not supported by NI and not well written. I would suggest taking parts of the stacked sequence structure and putting them into separate subVIs.