LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

viIn16() Non-Fatal Run Time error

I am  having an issue with this section of the code.  When I run the following steps on TestStand 2012, LabWindows CVI 2012, and Window 7.0

      ReturnCode = viIn16 (hInstr, VI_PXI_CFG_SPACE, 0x00, &VendorId);
      ReturnCode = viIn16 (hInstr, VI_PXI_CFG_SPACE, 0x02, &DeviceId);

 I receive the attached error.

I do not get this error with 11 of my 14 PXI devices.

The devices I get this error from are

National Instruments,     PXI-8360,             PXI Bridge
National Instruments,    PXI-2576,            PXI Switch Multiplexer

This error also occurs in NI-MAX VISA Test Panel.  

This error does not occur on our test station running Windows XP, TestStand 4.2.1 (4.2.1.83), Lab Windows CVI 8.51(356), NI-MAX 4.6.2f1.

I am attaching the section of code.

Download All
0 Kudos
Message 1 of 6
(3,717 Views)

herbertwatson,
Which version of VISA is being used in each of these setups?


Have you tried using viIn16Ex() or viMoveIn16Ex() to see if those also return an error?


Windows 7 changed the way they allow access to memory registers on devices, so this may be the issue.

Jared A.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,694 Views)

I am using VISA version 5.2.  viIn16Ex() or viMoveIn16Ex() do not cause a Non Fatal Run Time error.  However, both functions return an identical error message and incorrect data.

0 Kudos
Message 3 of 6
(3,682 Views)

herbertwatson,
When you say that both viIn16Ex() or viMoveIn16Ex() return an identical error message, do you mean that their return code is also -1073807257 and the message is "The given session or object reference does not support this operation."?


Have you tried the '8' or '32' versions of these functions to see if the devices can accept a different data size?

Jared A.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(3,667 Views)

Yes the return code is also -1073807257 and the message is "The given session or object reference does not support this operation.".


I have tried the '8' or '32' versions of these functions with the same result?

0 Kudos
Message 5 of 6
(3,664 Views)

herbertwatson,

Can you capture and attach a log from NI I/O Trace so we can gain more insight into the VISA calls that are being made?

 

KB 4P3FR2LQ: Performing a Good NI I/O Trace Capture for Debugging/Troubleshooting

Jared A.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,645 Views)