Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Lock-in sr830 and fast mode...

Hi all

I need to use the fast mode on a lock-in amplifier sr830. I don't understand well how to realize this! I've searched for examples but i didn't manage to get anything...i don't know how to implement this on labview 6.0 (even on other versions...but i have this on my university...). I've also downloaded the drivers for sr830, but i don't understand if they can use fast mode (i have labview 6 on my university so i can't try it with a lock-in...) and i can't find some help studying the implementation from a pc with a newer labview...

 

Can someone help me, maybe with some easy examples to understands how it works on labview?? Thanks!!

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

Hi,

maybe you have already done it, however I suggest you to download the instrument driver for sr830 (from here😞 it installs all the functions already built to communicate with the device and also some examples you could consider.

I searched in the web the instrument manual and it appears that fast mode is set by sending a specific command (this is also stated in this forum post): have a look at the sr830 documentation to find the correct command for your situation.

You could test the functionality of the device by communicating with the instrument in Measurement&Automation Explorer by sending a command and reading the answer.

Then in LabVIEW you could send the command you need with function VISA Write.vi.

A detailed tutorial about instrument control (clarifying concepts like VISA functions, bus, instrument drivers...) can be found here.

I hope this will help!

Bye,

 

Licia

0 Kudos
Message 2 of 8
(5,399 Views)

Thanks for your response. Every help is usefull.

 

Unfortunatly the problems is not solved. I've comunecated a lot with the instrument, and all of the other commands goes well. Also the drivers are not very helpfull with this situation...

 

 

But there is a new clue to the problem...today i kept a response after trying using the fast mode. The problem is that on the string indicator appeared lots of symbols like "@| þ" or similar...so maybe i got the data but in a non ascii format...

I also tried to use the TRCB and TRCL command and i recived also symbols...while with the standard TRCA (that sends ascii...) i recive correctly...

 

So how can i resolve this problem?? I think that knowing this should be only a format problem!

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

Forgive me for writing again, but i don't know how to do...i don't understand if could be a driver problem or if it's only that the output of the "Read" from gpib is a string and the instrument sends me something different from ascii floating points...so i visualize @|@ on my indicator...

 

The two commands i'd like to use are this on the SR830 manual:

 

TRCB ? i, j, k The TRCB? command queries the points stored in the Channel i buffer. 

The values are returned as IEEE format binary floating point numbers 

(with the units of the trace). There are 4 bytes per point. Multiple points 

are not separated by any delimiter. The bytes can be read directly into a 

floating point array (in most languages). 

 

TRCL ? i, j, k The TRCL? command queries the points stored in the Channel i buffer. 

The values are returned in a non-normalized floating point format (with 

the units of the trace). There are 4 bytes per point. Multiple points are not 

separated by any delimiter. The bytes CANNOT be read directly into a 

floating point array. 

Each point consists of four bytes. Byte 0 is the LSB and Byte 3 is the 

MSB. The format is illustrated below. 

The mantissa is a signed 16 bit integer (-32768 to 32767). The exponent 

is a signed integer whose value ranges from 0 to 248 (thus byte 3 is 

always zero). The value of a data point is simply, 

value = m x 2 (exp-124) 

where m is the mantissa and exp is the exponent. 

 

How can i visualize correctly them on an array indicator?? It's possible?? Please Help me! 

0 Kudos
Message 4 of 8
(5,354 Views)

You could consider this document and this example code for the conversion problem.

Maybe other forum users using sr830 could better help you...

I hope this helps!

Bye!

 

 

Licia

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

Thanks. Those examples helped me a lot. i think i've resolved my main problem updating the visa and 488.2 drivers, now i've only to understand something about byte conversions...i'll open another thread for that argument if i'll need. 🙂

I'll swear not 😄

 

Thanks 

0 Kudos
Message 6 of 8
(5,324 Views)

This response is for those of us who desire to use the "FAST2" command with the SR830 but have noticed that none of the LabVIEW VIs available from NI actually incorporate this command in their block diagrams. While this response is 6 years late for the original post, hopefully it is a Godsend for those of you who desire to sample and manipulate data the moment it is taken. The attached VI works, but most likely will require some additional tweaks for your application. Enjoy!

Message 7 of 8
(4,344 Views)

Hello,

 

Relating to the program in the previous post what I have to change in it in order to acquire data with 512Hz rate?

I have tried to increase the argument of SRAT function but now I have timeout issues.   

 

Thank you.

0 Kudos
Message 8 of 8
(2,968 Views)