LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Termination method not saving in VISA test panel

I was having problems communicating with my Keithley but I was able to resolve this by enabling the termination character in the Visa test panel. I've been able to send and receive information successfully in the test panel using commands from the manual. However, when I try communicating in a VI (example VIs from the driver), I'm unable to. When I close this VI and open VISA again, I can't open the VISA test panel (VISA: (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it.). I am forced to close and reopen both the Keithley and LabView and if I open the VISA test panel again, the settings are reset. How do I fix this? https://imgur.com/ByTafWK.jpg

0 Kudos
Message 1 of 6
(2,662 Views)

Post your VI that are having an issue with. More likely than not you are not initializing your VISA session correctly and are not closing it when you are finished. Without seeing your actual code though this is just a guess.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 6
(2,651 Views)

I have attached the file below. What is happening is I can run the program the first time with no issues. However, once I try to run it again, I get the error and everything stops working (Keithley will beep and stop responding to commands).

EDIT: I believe I am not closing the sessions after I am done. How do I do this properly?
0 Kudos
Message 3 of 6
(2,626 Views)

I would recommend that you properly initialize and open your VISA session in your VI. Use a VISA Open to open it. If it is serial, you can use the "VISA Configure Serial Port" to configure the port. At the end of your program use a "VISA Close" to close the session. You can look at the shipping examples in LabVIEW to see some example code which does that.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 6
(2,619 Views)

So does running this one VI individually not do any of this? I think this would explain why it works once the first time but not after that. Would you mind linking me to the shipping example, I'm not sure where to look for it.

0 Kudos
Message 5 of 6
(2,616 Views)

Help->Find Examples. The click the search tab and enter VISA in the search. You will see several examples there.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 6
(2,610 Views)