FAQ - Software

The most likely reason why the driver doesn't run is because you have not got the National Instruments VISA software extensions loaded. Check that there is a file VISA32.DLL in your windows\system folder and if not re-run the LabVIEW installation program. Make sure that you check the option that allows you to install VISA. 

You can also download the VISA extensions from the NI website. 
RS232 serial ports may be configured as one of two types, these being DTE (data terminal equipment) and DCE (data communications equipment). All SIGNAL RECOVERY lock-in amplifiers are configured as DTE devices, which is the same as most personal computers. Consequently, in order to satisfactorily connect a lock-in amplifier to a computer it is necessary to use a Null Modem (also known as a Modem Eliminator) cable. 
The model 5113 preamplifier is however configured as a DCE and hence requires a straight through cable, rather than a null modem type. 

For historical reasons units are fitted with one of three types of RS232 serial interface connectors, which when taken with the fact that the serial port on the computer may be fitted with either a 9-pin or 25-pin connector, means that one of eight types of cable will be needed. 

The connection diagrams for all eight types of cable are given below and should prove of use to readers with reasonable practical skills who would like to assemble their own interconnecting cables. 

Models 5105 and 5106 to computers with 9-pin serial connectors 
These units require a 9-pin female to 9-pin female null modem cable 

FAQ RS232 Image1 


Models 5105 and 5106 to computers with 25-pin serial connectors 
These units require a 25-pin female to 9-pin female null modem cable. 

FAQ RS232 Image2  

Models 5109, 5110, 5209, 5210 and 5302 to computers with 9-pin serial connectors 
These units require a 9-pin female to 25-pin male null modem cable. 

FAQ RS232 Image3 

Models 5109, 5110, 5209, 5210 and 5302 to computers with 25-pin serial connectors 
These units require a 25-pin female to 25-pin male null modem cable. 

FAQ RS232 Image4 

Models 7220, 7225, 7260, 7265, 7280 and 7310 to computers with 9-pin serial connectors 
These units require a 9-pin female to 9-pin male null modem cable. 

FAQ RS232 Image5 

Models 7220, 7225, 7260, 7265, 7280 and 7310 to computers with 25-pin serial connectors 
These units require a 25-pin female to 9-pin male null modem cable. 

FAQ RS232 Image6 

Model 5113 to computers with 9-pin serial connectors 
This unit requires a 9-pin female to 25-pin male cable. 


FAQ RS232 Image7 
Model 5113 to computers with 25-pin serial connectors 
This unit requires a 25-pin female to 25-pin male cable 

FAQ RS232 Image8 
We regret that we do not have TestPoint drivers for our instruments and at present there is no plan to develop them. Have you considered using LabVIEW instead?
We regret that we do not have any LabWINDOWS drivers suitable for our instruments. Have you considered using LabVIEW or our ActiveX control, SRInstComms?
The model 5502 software was a 16-bit package designed to run under Windows 3.1 and 3.11 It has been replaced by the Acquire software, which runs under Windows 95, 98, NT, 2000 and ME. 

Users of 5502 can upgrade to Acquire at a significantly discounted price. In order to qualify for the discount you need to have either registered your initial purchase of 5502 with use by returning the Software Registration document supplied with it or by supplying us with details of the software serial number (located on the Setup disk) and date of purchase.
This is a subtle one but can be fixed by making sure that the 5210's delimiter character is set to its factory default value, ASCII 44 (a comma). The delimiter is used to separate the two parts of the response to the MP command that the software uses to read the R - theta values, and if it is set to something other than the default it can cause a problem. 

To change the setting, connect the lock-in up to an RS232 terminal that allows you to send commands to it and read the responses from it. Then type ID and confirm that the unit responds with "5210". Once communications are working, type DD 44 to set the delimiter to the comma, which will fix the problem.
We do not have a published driver for the 5205, 5206, 5207or 5208. However we have built a very basic driver for the 5205/5206 which has the same type of interface. This driver is available on request to service@signalrecovery.com It has a minor error in the Initialise VI where the wrong model number is stored to the VISA User Information variable when a 5206 is used, but this does not cause it to fail. The driver was written for LabVIEW 4.0 so if used on later versions the VISA serial property names need updating, but LabVIEW 6 tells you where the errors are when the driver loads. 

If the RS232 interface is to be used then the VISA drivers might need updating to improve speed. These can be downloaded from the National Instruments website. 
If you want to make life easier for yourself then you should consider buying our SRInstComms ActiveX control. This comes complete with examples in Visual Basic, Visual C++, LabVIEW and Excel, so it offers a quick route to solving your communications problems. 

However, if you must take the hard route, try the code below. 

Start VB and create a new project. Then add the NI files VBIB32.BAS and NIGLOBAL.BAS to this project. Finally add a routine that communicates with the instrument in a single write/read function, which you build out of calls to the NI functions that are supplied by the library files. 

The following code segment should help you get the basic idea. You may need to declare the variables used. sndcmd is the string command going to the unit and cmdrsp is what you will get back from it. 

' Assumes GPIB address 12 
Call Send(0, 12, sndcmd, NULLend) 
' next section performs repeated serial polls in a loop, waiting for 
' command done to clear, implying that command is being processed. But on slow 
' computers and with write-only commands, command done might clear and be 
' reasserted without the serial poll detecting it. Hence a timeout loop using 
' k as a counter is included. 

k = 0 ' k is used to implement timeout loop 
cmddone = 1 

While (k < 100) And (cmddone = 1) ' start loop with timeout 
Call ReadStatusByte(0,12,SPSB) ' read SPSP 
cmddone = SPSB And 1 ' wait for command done to clear 
k = k + 1 ' increment timeout counter 
Wend ' loop 

' command done should now be cleared, implying instrument is processing command 
' next section performs repeated serial polls in a loop until command done 
' is re-asserted. Each time the data available bit is also detected and if 
' asserted a GPIB read is performed. 

l = 0 

While cmddone = 0 
Call ReadStatusByte(0,12,SPSB) ' serial poll 
cmddone = SPSB And 1 ' command done = bit 0 
dataavail = (SPSB And 128) ' data avilable = bit 7 
If dataavail = 128 Then ' if data is avialable 
cmdrsp = Space$(32) ' define buffer into which to read response 
Call Receive(0,12,cmdrsp,100,STOPend) ' read response of up to 100 bytes, which is enough 
cmdrsp = Left(cmdrsp, ibcnt) ' ibcnt is a global variable returned by 
' the NI GPIB handler software containing 
' the number of bytes read. Use this to 
' trim response to that number of bytes 
End If 

Wend ' loop until command done is asserted 

Paramerr = (SPSB And 4) 
Refunlock = (SPSB And 8) 
Overload = (SPSB And 16) 

If you want to make life easier for yourself then you should consider buying our SRInstComms ActiveX control. This comes complete with examples in Visual Basic, Visual C++, LabVIEW and Excel, so it offers a quick route to solving your communications problems. 

If you want to write your own software to communicate with one of our instruments via RS232 then you need to either use direct file I/O routines (C++ treats I/O port access just like file access) or use a plug-in software component. The former approach takes quite a lot of effort to get right, since there are so many settings to consider (baud rate, buffer size, termination, etc). Working with a plug-in component, such as an ActiveX control, can make life easier but it has to be said that most of these are optimized for communication with modems rather than with lock-in amplifiers. 

The most important thing to be aware of with serial communications on our instruments is that in general they require a software handshake to be used. In other words, each command string that is sent must be sent one character at a time and the controlling software must then wait until the instrument has echoed it back before sending the next character. Hence serial interface routines that simply send out a complete command string at the selected baud rate will usually fail. 

The low-cost SRInstComms ActiveX control that we offer takes care of all these issues and in addition handles the "special" commands such as the fast data transfer binary dumps and star modes used on the latest instruments. It is of course also designed specifically for use with our instruments. 
I assume that you are already familiar with the basics of LabVIEW. 
Using our drivers, which you can download free of charge from this site, this is a relatively easy task. For speed, you need to use the GPIB interface for which your computer will require an NI GPIB interface card compatible with LabVIEW, which for a PCI bus PC is the PCI-GPIB. You also need to use the NI VISA software extensions supplied free with LabVIEW or downloadable from the NI website. 

You assign each lock-in a different GPIB address. You then use the Initialize VI supplied in our driver to open two VISA session "handles" that in many ways are similar to file handles. Each of the VI's that controls the instrument has a session handle input and in order to make that VI interact with the selected instrument you simply need to connect it to the appropriate session handle. 

At the end of your program you close both session handles with another VI, Close VI, that we supply. 

You may wish to download the driver to understand this better. It includes an example Getting Started VI that performs these actions for a single instrument, but it is easy to see how this can be extended to two instruments using the above technique. We have built drivers that controlled four instruments in this way and encountered very few problems. 
The fastest method of getting the MAG reading from the 7280 onto a computer screen is to use the "?" command after first setting up the CBD command to specify that the magnitude reading is to be returned. Use CBD 4 to do this; then after sending a each "?" command the instrument will respond with the latest value of MAG in floating-point form.