LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"GENERIC FILE I/O ERROR NI 488.2"

Hi everyone
I use a gpib card from NI to communicate with a DMM and a luxmeter. I was doing ok for a few months but lately i keep getting this error :"GENERIC FILE I/O ERROR NI 488.2", quite often and randomly. Is it a GPIB communication error or is it a LV code generated error? I haven't changed anything in my code and the randomness of the error prevents me from understanding where is it coming from...
If anyone has any ideas please help.

Thank you very much

Ioannis
Message 1 of 6
(4,378 Views)
Hi Ioannis,

from your description it seems you are talking about error 6. Smaller number error codes refer to both generic file i/o as well as GPIB errors, so you get two error descriptions...

You wrote: "the randomness of the error prevents me from understanding where is it coming from" I don't understand this.
Why not place some error handler functions in your code? A
t least you should get the vi where the error occured!
You should also be able to write a small function to write some informations to a logfile if an error happens.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(4,367 Views)

Hi Gerd thanks for your answer.

What I mean is that the error does not occur after some specific action or after some time has passed. It might work fine for 5 minutes then produce this error or it might work for a few seconds then the error comes..I am using the DMM to watch a voltage and when I raise this voltage sometimes the error occurs sometimes it doesn't. Anyway I will try to find the error code and work on that through the knowledge base.

Thanks again..

0 Kudos
Message 3 of 6
(4,363 Views)
Hi,

maybe timing problems with the DMM? No wait between sending a command and reading back next measurement? Sometimes even 10ms can help...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(4,360 Views)
In the GPIB world an error code 6 means that an IO operation was aborted. I have seen this error occur when you send another command to an instrument before either reading the result of the last command or waiting for the command to finish. The fact that it happens erratically would point me to be looking for a race condition. Do you have more than one instrument on the GPIB bus, or are you talking to the DMM from more than one place in the code?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 5 of 6
(4,344 Views)
Guys thank you both for your input I managed to tackle it and yes you both were right it was just a matter of timing...
 
Thanks again..
0 Kudos
Message 6 of 6
(4,331 Views)