Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

SR830 GPIB Driver to RS232 driver

I am using the SR830 driver from the link below(Labview 2012),

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=240C113D3165071BE0440003BA7CCD...

 

I tried converting the GPIB driver to RS232 driver by replaving GPIB Write,Read with Serial Write,Read.Also by adding the the serial setting(Baud,Parity etc) at the Initialize vi.

 

After this when the run the Vi,i get ERROR-1074003951.The error says "The ID Query failed.  This may mean that you selected the wrong instrument or your instrument did not respond.  You may also be using a model that is not officially supported by this driver.  If you are sure that you have selected the correct instrument and it is responding, try disabling the ID Query.."

 

Please guide me.I wanted the Initialse to happen successfully,as without this vi all other Vis are failing.

0 Kudos
Message 1 of 7
(5,643 Views)
Please look at the 34401 driver that comes with LabVIEW to see how to add RS232 support correctly. Mainly, you are not adding a termination character to the writes.
0 Kudos
Message 2 of 7
(5,633 Views)

Thanks Dennis 🙂

 

It was indeed helpful.

 

I am using a part of 34401 code from Initialise vi.I have done the necessary changes for RS232 Serial Config.

Everytime i get Error 1073807339 at Remote part.I have tried increasing the Read Byte Count,Changing OPC to LOCL of SR830,etc.

But it was not fruitful.

 

 

It is expecting for something else here.I am kinda struck here for morwe than 24hours so thought of getting your support so i can proceed futhur in this BIg Ocean 🙂

 

TIA

0 Kudos
Message 3 of 7
(5,585 Views)
Let's take a step back and forget about LabVIEW for a while. Try a terminal emulation program such as putty or MAX and use that to debug your connection. You need the correct com parameters and cable. Using the programming manual, try a basic query such as *IDN?. You may or may not need the REM command that the 34401 driver is using. You may or may not need the OPC? that the 34401is using. The main thing from the driver that you need is the case statement that will configure the port based on the type of resource. This sets the pc com port to match the instrument and to automatically append a termination character.
0 Kudos
Message 4 of 7
(5,566 Views)

Thanks again for your quick response.

 

I must have mentioned earlier that I have already tried communicating with the device.It reads ID so my cable has no prob.

Also I require REM in my code thus the retained that part.Also i have the Termination Character as None,so i do not get any error coz of it.

 

I find the error pops initially at VISA Open itself.

0 Kudos
Message 5 of 7
(5,563 Views)
Termination character as none is almost certainly incorrect. What program did you use to check communication? Check your manual and see if it requires cr or lf. The VISA Open will not return a timeout error. A VISA Open isn't even necessary.
0 Kudos
Message 6 of 7
(5,557 Views)

Hi krupa,

 

you can check the points mentioned it the following paper for troubleshooting the timeout error.

Why Do I Receive Timeout Error -1073807339 on VISA Read or Write?

http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0?OpenDocument

 

I suspect the termination character being the cause of the error as well.

The tutorial below gives you a few approaches how to handle termination characters.

Termination Characters in NI-VISA

http://www.ni.com/tutorial/4256/en/

 

regards

 

0 Kudos
Message 7 of 7
(5,549 Views)