Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

error:-1074130544 after calling TDS 3034B via Ivi_WriteInstrData and Ivi_ReadInstrData

Solved!
Go to solution

Hi,

 

I wrote a DLL in C++ to get direct access in a testprogramming language called CAPL. CAPL is part of Vector's CANoe sw.

I can send as many write commands as i want like:

"Status = tkds30xx_WriteInstrData (session, "BEL");" 

that is working fine an sets the Status always to 0.

 

but as soon as I query sth. like "SET?" for example:

"Status = tkds30xx_WriteInstrData (session, "SET?");"

and read it back with:

 

 

"Status = tkds30xx_ReadInstrData (session, 5000, InstruData, &BuffLenout);"

that works just once. Till here it sets status always to 0.

 

NOW if I try another WriteInstrData command.. like "SET?" oder "BEL"

 

Status is set to -1074130544 and IVI driver prevents the command from being sent.

Why is my session invalid here?

Find attached NI-SPY capture...

 

Regards,

 

Florian

 

 

 

 

0 Kudos
Message 1 of 4
(4,068 Views)

I did not see any error capture data from your spy-log file.

I suggest you to download the NI-Certified driver here:tds3034B

0 Kudos
Message 2 of 4
(4,029 Views)

Hi, that is the one I'm already using..

From my point of view the tkds30xx_ReadInstrData command (that is pointing to Ivi_ReadInstrData) does not close the function and leaves the driver in read mode where it doesn't accept any new instuctions..

To avoid that, I want to use the "viqueryf" command from the visa.h. The command is already used by the 

tkds30xx_init function as you can see in the NI-spy file. That viqueryf sends and reads back a query formated so it closes the read stream in the driver. My issue is now that the viqueryf command is used by functions like "tkds30xx_init" but it is not available as command or function in the tkds30xx.h. tkds30xx_init function calls it from the lib file linked in my IDE.

 

How can I call that function?

0 Kudos
Message 3 of 4
(4,018 Views)
Solution
Accepted by topic author Flori-Conti

Hi, as to the viQueryf function, you need to include the visa.h file.

Which IDE are u using?

Message 4 of 4
(4,016 Views)