LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vi cannot be stopped

This vi cannot be stopped even using stop button on the toolbar. I use GPIB to communicate with instruments: hp 34970 and hp e3634a. thank you for your help
0 Kudos
Message 1 of 9
(3,944 Views)
Hello edwin,

as I didn't find any of the subvi's it's hard to find the problem at all...

But:
If you cannot stop a vi by pressing the STOP button than probalby it is a hardware problem. I also such errors on an old unstable computer when accessing the GPIB card - sometimes it works, sometimes the GPIB Read/Write hangs (no matter which value I gave for TimeOut). I also had such problems when accessing the serial port. It seems to be a loose connection problem...

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(3,933 Views)
Thanks for your reply. Sorry i forgot to include the sub vi but it is always like that. it is not sometimes working and sometimes not.
0 Kudos
Message 3 of 9
(3,931 Views)
Hello,

Can you run your program in highlight execution when it hangs to determine where it hangs? You can get an NI-Spy capture which will help determine where it hangs; for directions see:

http://digital.ni.com/public.nsf/websearch/8D890EC09B15C05A86256E6F007E3E86?OpenDocument

This should help troubleshooting!

Thank you,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 4 of 9
(3,899 Views)
It seems that the vi is stopped on HP34970A resistance.vi. On my attachment is the screenshot and niSpy log. Then i dont know how this vi works. It is built in from the hp34970a instrument driver.

thanks
0 Kudos
Message 5 of 9
(3,891 Views)
It seems that the vi is stopped on HP34970A resistance.vi. On my attachment is the screenshot and niSpy log. Then i dont know how this vi works. It is built in from the hp34970a instrument driver.

thanks
0 Kudos
Message 6 of 9
(3,890 Views)
Hello,

The NI-Spy capture shows that the last command was a VISA read operation to the instrument, parameterized to read 500 bytes of data. This makes sense because inside the HP34970A EZ Resistance.vi you will see that the last operation is a VISA Read to read 500 bytes. Well, until you receive 500 bytes of data, you may be waiting for either that much data or the timeout period to expire. How long do you wait, at least 32 seconds? The reason I specify 32 seconds is that the HP34970A EZ Resistance.vi also hardcodes 32000 ms as the timeout period. Try changing this to 1000 ms and see if it times out after about a second (just double click the HP34970A EZ Resistance.vi and change the constant 32000 to 1000 on the block diagram). Also, can you verify that your instrument actually sends at least 500 bytes of data? If not, this could be the reason for the apparent hang, where really the Read function is waiting for the timeout period. To check this, you could also attempt to change the constant 500 wired to the VISA Read function to something smaller; perhaps change it to 1 (which specifies to read 1 byte) just to make sure that you receive anything at all!

I look forward to your repost with any results!

Thank you,

JLS
Best,
JLS
Sixclear
Message 7 of 9
(3,855 Views)
thanks now it's works
0 Kudos
Message 8 of 9
(3,830 Views)
Great!

Repost if you have any other problems 🙂

Best Regards,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 9 of 9
(3,798 Views)