LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

viRead() error 0xBFFF0012 (VI_ERROR_INV_RSRC_NAME)

Solved!
Go to solution

Dear LabView community,

 

I am trying to control my Toellner PSU by using the integrated GBIP port with the VISA driver. My program is written in c++.

Initialization and command writing works fine, but when I try to read back the response by using viRead(), the error 0xBFFF0012 (VI_ERROR_INV_RSRC_NAME) occurs.

I find this a little bit strange, because in the viWrite() function, I'm using the exact same resource name.

What I'm doing wrong? Thank you for your suggestions!

 

output from NI I/O-Trace:

 

mschaef02_0-1627378662087.png

 

code lines (C++):

mschaef02_1-1627378723417.png

 

 

 

0 Kudos
Message 1 of 2
(101 Views)
Solution
Accepted by topic author mschaef02

I found the error:

during the viRead() function call I gave a non existing item of the buffer instead of the buffer itself. So by changing the line to

status = viRead(instr, (ViBuf) buffer, MAX_CNT-1, &retCount);

everything works fine. 😁

0 Kudos
Message 2 of 2
(61 Views)