Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

post new message

Hello,

I am still learning how to use labview. Recently I wrote a program that uses the 830 Lockin Amplifier and a ESP300 motion controller device. The basic idea is this: the stage moves, stops and LKIN collects data. Simple enough to program. This is done over a certain distance interval so I basically used a for. Now the big problem that I have is that in the beggining of each scan the LKIN retains values from a previous scan. The only thing I need is to know how in the world can I check if the Lockin has finish writtig data so that it can be store and then I can reset the Lockin. Any example on how to query and instrument is most welcome. By the way I tried to explain as best as I can my program but to really know what is the problem is best to see it so here it is. Best regards and thanx for your help you guys are great!
0 Kudos
Message 1 of 4
(3,318 Views)
hi T1000,

I'm afraid I'm not sure what exactly you mean when you say that at the beginning of each scan the lockin retains values from the previous scan. Do you mean that the last read has not completed reading all of the data that the lockin is outputting yet? Do you mean that the device itself first outputs the data from the last scan? If you provide a little more detail on exactly what is happening that you do not expect, we will be happy to help you out!

john m
Applications Engineer

ps--i like your scary clown.
0 Kudos
Message 2 of 4
(3,292 Views)
Mr. John,


Yes! This is precisely what I meant:
----->Do you mean that the device itself first outputs the data from the last scan?
So, I want to make sure that any data from the previous scan was cleared. The program I believe is a bit of a mess. So you need not to worry to much about this program but in general I want to make sure that data is cleared from any device. I tried understanding a bit the functions, GPIB Wait, GPIB Poll etc.... but it is not registering in my head! Sorry to say. Any how that is the problem that I have. Thank you for your help. Best regards,
0 Kudos
Message 3 of 4
(3,284 Views)
I am unsre why the device behaves in this manner. One the first time through the loop, it should read in all the data for that loop. Once this is finished, it should go through the loop the second time, and it should read in all the data for the second time through the loop. The only way I can see obtaining data from a previous loop would be if the read from the loop before did not read all the available data. If your device for some reason repeats data, you may have to work out in your code a way to ignore the doubled data.

Hope this helps!

john m
0 Kudos
Message 4 of 4
(3,263 Views)