From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 6 in GPIB Write

Hi

 

I have a LabVIEW code acting as a driver for an EG&G 5210 lock-in amplifier. Essentially I am using the GPIB write vi to send a string to the amplifier.
I have been trying to de-bug my code for a while.

The problem is, I have split the code into each constituent control and each separate part (e.g. changing phase or filter type etc.) works absolutely fine on its own. Also, when I combine several of these into one string it also works fine, apart from the addition of the very last part. 
At this point I get error 6 "LabVIEW:  Generic file I/O error. NI-488:  I/O operation aborted."

 

I cannot then check any of the others parts work after this point since I only get the same error, even just testing one constiuent part (which had been working well beforehand)

 

I am using Labview 2011 with an NI GPIB-USB-HS with the previously mentioned EG&G 5210 amplifier.

 

Any help is greatly appreciated.

 

Please find attached my LabVIEW if required.

 

Jordan B

0 Kudos
Message 1 of 6
(2,673 Views)
Can you attach an image of the block diagram, please? I'm posting from my phone.

There is also an existing driver for the 5210: http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=1928

Is that what you are using?
0 Kudos
Message 2 of 6
(2,660 Views)

My guess is that when you are stringing the commands together, you aren't waiting long enough for at least one command to complete.  I can't see the VI because of the ancient version of LV that I have at work, but if the instrument is SCPI compliant, consider appending ;*OPC? to each command that isn't already a query.  This will turn that command into a query, so you execute a read (of a couple of bytes) and it will wait until the instrument has completed the command.

 

Read the instrument manual to make sure that the commands you are going to modify in this fashion are compatible with the *OPC? command.

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 3 of 6
(2,657 Views)

I think that this is linked to the solution (I have managed to get it working now).
It seems that splitting the code into 2 halves and then placing each part in a sequence structure with a time delay between the two has fixed the problem, it may have been that the write vi just did not have enough time to take the whole input in one go.

Thank you for your time.

0 Kudos
Message 4 of 6
(2,614 Views)
Glad that this "solution" worked for you. Just don't leave the code that way!

First, you shouldn't use a sequence structure.

Second, you don't know how long you really need to delay. You need to find out what is taking the extra time to complete and how to get the instrument to tell you when it's done.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 6
(2,588 Views)

Sorry for taking a while to respond...

 

You are indeed completely right, the sequence structures are completely unnecessary as I have now forced the dataflow using error in/out, this has made the code much easier to read and shorter!

 

Thank you for your help.

0 Kudos
Message 6 of 6
(2,523 Views)