Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Instrument connection lost

Hi,

I am using Tektronix 2014 Scope to Acquire CAN signal using IVI drivers in Labwindows.

now i can Initialize, Configure the Vertical & horizontzal  settings, Configure trigger, read waveform data, read setting...Via USB

 

the program works fine for one or two times, but later then my USB connection is lost.

when i only restart the scope it say Drivers are not installed for scope.

but when i restart both my system & Scope, then everything is fine.

 

what could be the reason?

Is there any chance of Setting Conflicts? or my program is not completely closed after Acquistion?(It doesn't  show any error!)

0 Kudos
Message 1 of 16
(6,706 Views)

Hello Praky,

         I have a 2014B that is connected by USB and I am not able to reproduce the lost connection problem.  I have run the driver's Getting Started Example at least 15 times without any problems.  Could you please try running that example also?  In addition, please list the versions of LabVIEW, ICP, and VISA that you are using.

 

         I also do not have the problem that you encounter when restarting the instrument.  Do you have another machine to test with?  Can you please give us more details about the system that is experiencing the problems?

 

Also, please take a NI-Spy capture of the problem occuring (as a .spy file) and post it to this thread.

 

Cheers,

 

NathanT

Message Edited by NathanT on 10-15-2008 09:53 AM
0 Kudos
Message 2 of 16
(6,692 Views)

Hello Praky,

        I also just tested the instrument driver example in CVI and did not run into the problems that you are seeing.  It did occasionally timeout in the Wait for OPC, so I increased the timeout value of the ReadWaveform function call in the example and that resolved that issue.  Please give tktds1k2k_example.c a try and let us know how it goes.

 

Cheers,

 

NathanT

0 Kudos
Message 3 of 16
(6,676 Views)

Hi Nathan,

Thanks for the reply.

As you said i played around the driver example(tktds1k2k_example.c) in CV..It works perfectly in my working system.

But when i do the same thing in my Test system(PXI), the instrument dies in second or third run.

i am attaching two .spy files(for two runs) in first i get all my data out without any problem(no error) and in second file it fail in initialization.

if it is time out problem, please expain me how to clear.

 

my work is to access scope from CANoe(CAPL)program. And for this i use the DLL created form my CVI program.

i developed CVI program in my working system.

 

i use CVI 8.5, ICP3.3, Visa 4.3 in my working system and

i use CVI Runtime 8.5, ICP 3.2, Visa 4.3 in my Tets system.

 

 

 

Download All
0 Kudos
Message 4 of 16
(6,641 Views)

Hi,

Sometimes i also get this error in that example program 

the error is from function  tktds1k2k_WaitForOPC.

 

 NON-FATAL RUN-TIME ERROR:   "tktds1k2k.c", line 4065, col 13, thread id 0x00000EBC:   Function viReadSTB: (return value == -1073807339 [0xbfff0015]). Timeout expired before operation completed.
 

0 Kudos
Message 5 of 16
(6,639 Views)

Hello Praky,

         To avoid the timeout error, make sure that you have a signal on the input channel that will meet your trigger requirements.  Also, you can increase the timeout value of the ReaWaveform function, I changed mine to 10000 ms.

 

I recommend that you install ICP 3.3 on your test system.

 

To confirm: tktds1k2k_example.c runs without any problems on your PC, but when you try to run it on the PXI, it only works once or twice.

 

What PXI controller do you have?   After the example fails on the PXI, how does the instrument appear in MAX?  Can you communicate with it there?

 

It sounds like it is not an issue with the instrument driver, but something more low-level in either VISA or the USB drivers for the PXI controller.

 

Cheers,

 

NathanT

 

 

0 Kudos
Message 6 of 16
(6,622 Views)

Hi Nathan,

After few runs of the program in Test system ..MAX doesn't show any USB interface in the list, it disappears.

from my observation, i think this problem occurs because of some triggering issues.. but i cant get it exactly..

 

can you explain little more about it ..(To avoid the timeout error, make sure that you have a signal on the input channel that will meet your trigger requirements)..

if still some problem persist, i will let you know.

 

Thanks

0 Kudos
Message 7 of 16
(6,605 Views)

Hi,

 

I too tried replicating this issue on my machine, and was unable to do so.  As for your timeout error, increasing the timeout in the tktds1k2k_example.c code from 5000 to 15000 milliseconds should take care of this error.  It seems like something could be wrong with the USB driver on your controller.  Which controller are you using?  I'd like to try to replicate this issue with your exact controller if I could.

 

Thanks!

 

Regards,

 

Todd V. 

National Instruments
Applications Engineer
NI Prototyping Community
0 Kudos
Message 8 of 16
(6,596 Views)

Hi,

Thanks for all your responses...but still i am having same problem..The time out problem occurs sometimes in my working system, then if i run  same program once again without any changes(Just i have to reload) it works ..no problem..USB is still alive...

Then if i do same in my PXI..it runs properly and gives me data out(no error)..but USB dies..(disappears from MAX). i have to restart the system to run the program once again.

Spy in PXI  show the same error which occured in  in my working system..i guess the problem is because of timeout.

 

i tried to increase timeout from 5000ms to 15000ms then to 30000ms..but the result is same..

Atleast in my working system it shows some timeout error and USB does't disappear...but in my PXI its disappears immediately.

 

one more thing, the problem occurs most of the time when i include Readwavform function..if i exclude that function..no error

 

i am using PXI 8105 controller. i am attaching the spy file from my PXI

0 Kudos
Message 9 of 16
(6,570 Views)

Hi,

Can any one suggest me some solution to slove this problem..

0 Kudos
Message 10 of 16
(6,490 Views)