Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Code for FAST 2

I can try with the code givwn by u.May i know if i will have to delete the Error Cluster in the ID Query of the driver provided at NI webpage.

Coz,though i am able to read ID,the EC always throws error.I have already raised this topic here but could not resolve it.

0 Kudos
Message 11 of 91
(3,664 Views)

What error (both # and description) was thrown by the NI driver code? Does that simple test routine I posted throw the same error? 

0 Kudos
Message 12 of 91
(3,661 Views)

Error 1074003951.This is what the EC throws.I will check your code after 6hours and let you know as here its 2.50am 🙂 now.

0 Kudos
Message 13 of 91
(3,659 Views)

Please find my changes by adding your code attached.I have added your code in Initialize vi.I have attached the error too.

I have disabled the Instrument Query Id available in the driver.

Please guide me.

Download All
0 Kudos
Message 14 of 91
(3,583 Views)

OK, so the description of that error code is

 

"Identification query failed. Instrument identification failed. This error can occur if you selected the wrong instrument or your instrument did not respond. This error also can occur if you used 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 ID Query in the instrument driver's initialize VI."

 

Sounds like, for whatever reason, the SR830 isn't returning the exact ID string that the driver code is expecting, but otherwise things are working. I would follow the approach suggested by the error description and disable the ID Query function, and then go ahead and use the original version of the driver code.

0 Kudos
Message 15 of 91
(3,577 Views)
Your after change image clearly shows you attempting to do an id query and it clearly shows that you are sending the incorrect command.
0 Kudos
Message 16 of 91
(3,564 Views)

OK, I see the problem now. The driver initializer code calls the instrument with "OUTX 1; *IDN?". OUTX 1 means "use GPIB", so that call is telling the instrument to stop responding on the RS232 port. 

 

You can either eliminate the OUTX call entirely or replace it with "OUTX 0" for RS-232. 

 

As an aside, this thread began (and is titled) with a reference to the FAST command. FAST is a GPIB-only data transfer mode which is essentially a streaming mode rather than query-response.

 

"The FAST command sets the data transfer mode on and off. The parameter i selects:

i=0: Off
i=1: On (DOS programs or other dedicated data collection computers)

i=2: On (Windows Operating System Programs)

 

When the fast transfer mode is on, whenever data is sampled (during a scan), the values of X and Y are automatically transmitted over GPIB (not available over RS232). The sample rate sets the frequency of the data transfers. It is important that the receiving interface be able to keep up with the transfers.

To use the FAST2 mode, a ROM version of 1.06 or higher is required. The FAST2 version uses the lock-in transmit queue to buffer the GPIB data being sent to the host. Since the transmit queue can buffer a maximum of 63 X and Y data pairs, the host can only be diverted for short periods of time (e.g. 120mS at 512Hz sample rate) without causing the lock-in to "time out" and abort the FAST mode data transfer."

0 Kudos
Message 17 of 91
(3,556 Views)

No,u have completely mistaken.

 

In my current code,OUTX 0 is used.I have also disabled ID Query,thats why it enters False case.(Pls check the attachment)

Fast command is not used in the code anywhere.1st let my code start getting data from instrument and then i will see if FAST is required or not.

 

Even with the above changes,there is error.I want your guidance for that.I have alreday posted the error.

0 Kudos
Message 18 of 91
(3,546 Views)
The attachment shows you sending the command *IDN*. Do you look at what you post? That is an incorrect command and you've just moved the query to a different spot.
0 Kudos
Message 19 of 91
(3,543 Views)

Ya i see that but my code has *IDN?.Also i was able to read the ID without error.

0 Kudos
Message 20 of 91
(3,528 Views)