Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Code for FAST 2

Now I'm really confused. The error you're seeing should only be generated if the instrument's response to the IDN query doesn't contain the string 'SR'. If the instrument is responding to the query, that error shouldn't trip. Can you post the full string returned by the instrument (the 'read buffer' indicator in the code I posted)?

0 Kudos
Message 21 of 91
(3,443 Views)
Then everything is good if you can read without error. You would obviously need to add some code to verify the id is correct. And of course, modify each and every write to use the correct termination character since you don't seem to want to set it with a property node.
0 Kudos
Message 22 of 91
(3,442 Views)

Hey Both,

 

You guys were very helpful and really fast that it felt like we were working paralelly.

 

Sorry i could not manage to get lab last 4-5days.Finally got it today 🙂

 

So,by adding termination i tried.I am getting 1073807339 error at ESR Vi(read),its a sub vi of Error Vi.

 

Please kindly support!!

0 Kudos
Message 23 of 91
(3,412 Views)
Why post just that image when the important part is how you added the termination character.

Always test a command in MAX.
0 Kudos
Message 24 of 91
(3,402 Views)

Thanks for that.

 

In MAX,i have default \n.All the commands are with LF.So,i am adding this to my code.

 

I have 2 questns here.

1,In MAx,when i write,i get 6bytes and no error.When i read,its 50bytes with error.Pls find attachment.

2,I have atteched a part of my code with LF.Pls lemme know if this is the right way,as this has to be added to all the commands in my code and lil time consuming,so i am confirming with u once.

Download All
0 Kudos
Message 25 of 91
(3,390 Views)
In MAX, the instrument is returning a carriage return as the terminator.

You now post a different image of a VI. Your query of the esr does not show a termination character and you should simply add a property node in the initialization function to add the correct termination character to a write. This has been discussed before. Your initialization function is wrong if you have not done this like other drivers with serial support.
0 Kudos
Message 26 of 91
(3,370 Views)

Thanks once again.

 

Seems like wqhat i was doing previously was right.I was using Serial Config of Agilent.I will switch back to that again,as that seems more appropriate.

 

I just have one question here.It has a private Sub vi,how should i add that to my code.Earlier,i just copied the vi vontent and used in my code.Is that right way or??

0 Kudos
Message 27 of 91
(3,333 Views)
Don't add the keysight function to your code at all. All that you want is the serial port configuration.
0 Kudos
Message 28 of 91
(3,329 Views)

Sorry,what do u mean by Keysight function??

 

I need serial config(baud,parity) along with termination.

0 Kudos
Message 29 of 91
(3,317 Views)

Keysight being Agilent Function Right??

 

IS it not that i put the instrument in remote mode during initialization??

 

YOu think the attached is correct ,here the serial config are not present,where do i add that??

 

Kindly answer for each questn above,so that i can understand clearly.

 

0 Kudos
Message 30 of 91
(3,314 Views)