LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout error in the VISA testing panel

Hello Steven,

I tried to communicate via Termite. But still I didnt get any respond. I have questions maybe for the general Termite usage. I just put the codes from the manual in it. In the settings of Termite I choose also to append LF for every sended text, which is needed for the communication with the device.

My general questions are: Does it make any difference for the linefeed to be written like <lf> (manual), \n (Labview MAX) or \lf (in Termite)? It all should be the same because it is transfered as ASCII and the ASCII is the same for all of them, or do I miss something? Sorry, I am really new to this technical stuff and I hope I can understand this all with time.

Lovely regards

0 Kudos
Message 11 of 21
(2,020 Views)

Hello Steven again 🙂

I have to really check this detail. I hope not, by I am not really sure, because I got this cable by a technician man in our university. So I have to ask him. I really not familiar with this technical details, so I have to first read a little bit about this. In the manual it is said that the RS-232 interface transmits on pin 3 and receives on pin 2. So we really have to check on that.

Lovely regards

0 Kudos
Message 12 of 21
(2,004 Views)

Hello Steven,

 

as I read your suggestion, I remembered a similar thread, where a guy just did what you assumed. I will add the link: (https://forums.ni.com/t5/LabVIEW/SR810-lock-in-does-not-respond-serial-communication/td-p/2014778). So this could be really a thing. Thanks for you advices and sorry for the spam.

Lovely regards


Sailor Moon

0 Kudos
Message 13 of 21
(2,014 Views)

Termite Settings.png

It should be the same for all of them. The manual says it accepts either linefeed (LF) or carriage return (CR). If you are using LabVIEW or NI MAX use \n (new line) or \r (carriage return). If using Termite just select the settings (shown above) that will automatically append message with one and or the other.

 

I would do a loopback test at this point just to verify that you are sending and receiving data. Keep the cable connected to the PC, disconnect it from the device and short pins 2 and 3 (assuming they are the TX and RX pins). Make sure you are not using any kind of flow control. Then when using termite if you send any text you should receive the same text.

 

If you are getting data then either you are using a crossover cable or there is some issue with the device. You will have to troubleshoot from there.

 

If you are not getting a response something is wrong on the cable/pc side.

 

Message 14 of 21
(2,004 Views)

@StevenD wrote:

Termite Settings.png

It should be the same for all of them. The manual says it accepts either linefeed (LF) or carriage return (CR). If you are using LabVIEW or NI MAX use \n (new line) or \r (carriage return). If using Termite just select the settings (shown above) that will automatically append message with one and or the other.

 

I would do a loopback test at this point just to verify that you are sending and receiving data. Keep the cable connected to the PC, disconnect it from the device and short pins 2 and 3 (assuming they are the TX and RX pins). Make sure you are not using any kind of flow control. Then when using termite if you send any text you should receive the same text.

 

If you are getting data then either you are using a crossover cable or there is some issue with the device. You will have to troubleshoot from there.

 

If you are not getting a response something is wrong on the cable/pc side.

 


I would set the transmitted text to either "Append CR" OR "Append LF", not both.  Since the instrument can read either one, it is liable to interpret this as a command followed by an empty line.  This may or not be critical, but it would be safest just to use on or the other.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 15 of 21
(1,979 Views)

Hello Steven and Bill,

 

we tried a loopback test with the technician guy and what should I say? It doesnt worked out. So the cable was the problem. After I got a new cable, everything worked out and I could communicate with the device. Here is a picture:

 

visa testpanel worked.PNG

But here comes the next problem. After I did the Visa testing panel. What should I do next? For GIPB or other interfaces, normally you scan for the instrument and then add it as I understood. But in my case for the serial interface, I didnt get such an option, so the instrument wasnt added to the register. So I read a bit, but I didnt get  how I can add the instrument via MAX. First my device has to be added and then I am able to search for the plug&play and then download it. Does it work differently for serial interfaces? Refering to NI, I am now at point 6 (http://www.ni.com/tutorial/2897/en/), where it says: "After completing your configuration and verifying communication with the instrument, you can easily transition from interactive mode to programming mode by using an instrument driver." For GIPB I understood, how I could install it (https://www.ni.com/getting-started/set-up-hardware/instrument-control/d/drivers), but first my device has to be added to the register. Shouldnt it be the same for serial devices? I really didnt understand, what the next step in the case of serial interfaces is. I hope you might help me to find the next step.

Kind regards,

 

Sailor Moon

0 Kudos
Message 16 of 21
(1,967 Views)

@SailorMoon wrote:

Shouldnt it be the same for serial devices? I really didnt understand, what the next step in the case of serial interfaces is. I hope you might help me to find the next step.


Your VISA Session just needs to be the serial port.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 17 of 21
(1,956 Views)

Not sure what you mean "the instrument wasnt added to the register".

 

But you now know you can communicate with the device over 232. There is a NI driver for the Stanford Research 810 lock-in amplifier here 

It is written for GPIB but I think it can be modified pretty easily for 232 communication. Just use "VISA Configure Serial Port" in the initialization and set the baud, parity, etc, etc. You may have to also check for the "OUTX" commands and change them as needed.

 

Vsa Configure Port.png

0 Kudos
Message 18 of 21
(1,942 Views)

Thanks you all for your fast responses!

@ and @ StevenD: Do I not have to use MAX anymore? Because for GIPB the panel in MAX looks different. As you see in the following picture (taken from http://www.ni.com/getting-started/set-up-hardware/instrument-control/d/drivers😞

 

Inkedid_access_LI.jpg

In green you see the device added in the register for GPIB and then you click on it, so you can then choose the instrument drivers for downloading (marked in red). But in the serial interface neither I see the instrument in the register, nor I see this VISA properties  page. So thats my question. For serial interfaces I didnt really understand how I should go further. So as I understand your responses, am I done in in MAX? I wanted to do the rest as you suggested Steven, because I already found the Plug&Play before. Also I know I had to change it for serial interface. I already saw some good videos how to set serial interface in Labview and an old thread, where someone put an VI for the serial interface. So I hope, I have good examples to start the programming. But I think, I still need a step to add the instrument as in the picture above. Hope I could explain my problem. I will do further research, but maybe you understood my problem and can give me some hints. Thanks again for all your helpful and nice advices!

 

Lovely regards


Sailor Moon

0 Kudos
Message 19 of 21
(1,917 Views)

There is no configuration in NI-MAX left to do - unless you want to assign an alias to it - but that's optional.  Just select that COM port for your VISA resource.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 20 of 21
(1,911 Views)