09-07-2015 07:20 AM - edited 09-07-2015 07:21 AM
Hello,
When i try reading SR830(Lock In Amplifier) with the code attached,i find it reads Garbage vallue.
HOw to fix it??
Pls guide.
09-07-2015 08:06 AM
1. It looks like your instrument is sending a termination character. Therefore, do NOT use the Bytes At Port. Instead, use a constant to tell the VISA Read to read more than the longest message you will recieve. The VISA Read will stop when it encounters the termination character.
2. It looks like the termination character is actually /r (hex value 0D). So you will want to set the termination character to that (done with the Configure Serial Port).
3. You will want your read to be done in a loop since it looks like you are getting many messages from the instrument. I'm guessing the instrument is streaming its data?
09-07-2015 09:08 AM
Thanks for the inputs.
I tried the solution suggested by you.
I removed "Bytes Read" to a constant higher than the actual value,even then i get the same response.
09-07-2015 09:26 AM
I just noticed that you are using the SR830 driver already. What is wrong with using the Initialize VI that the driver supplied?
09-07-2015 09:32 AM - edited 09-07-2015 09:40 AM
The driver supplied is for GPIB.I am converting it to Serail(RS232).
I always get error in Initialise Vi,so debugging with the changes already posted.
I have another generic Question.The SR830 driver was downloaded to the link C:\...\LV\instr.
I am using these Driver in my Vi and making changes locally.I see that the Original in C drive is also changed when any changes are made locally.This is tough as when i wanted to refer the original,it is no longer there.
09-07-2015 11:15 AM
I have attached my code for Initialise block.Can you please correct the bugs in it,if any as i always get error here.
TIA