07-29-2020 03:25 AM
The background is that I am using AFG3022B Signal generator from Tektronix and connect it through USB-USB to my PC (AFG3022B I had only had a USB port to connect with).
I want to write a LabVIEW program that I can use it to generate certain output power at a certain frequency.
The basic flow is that initialize > setting frequency and power > enable output > close vi.
I did it in an open loop without iterations. It works fine.
When I create a for loop and run, after a few iterations, I can see from NI I/O trace that it stops at VISA open, as you may check from capture1.png.
Then I went back and check the normal status, as you can check from capture2.png.
Apparently, the normal status will repeat twice the visa resource name "USB::XXX" and give 0. Then everything continues to work.
The unknown status shows only one time of visa resource name "USB::XXX" and give nothing. Then LabVIEW stops there, and not responding when I try to stop the program.
please share your idea on how to fix this problem.
Solved! Go to Solution.
07-29-2020 03:27 AM
updated the pngs
07-29-2020 05:43 AM
Could you share your code? It is awfully difficult to see errors in code that cannot be seen.
07-29-2020 05:55 AM
in the zip file, it includes the driver I find in NI website, the vi file I create and captures.
07-29-2020 06:15 AM
I also encounter other problems. Sometimes I try to increase waiting time, then some errors will not appear, but in the end, there will be an error waiting for me.
Like sometimes it will report:
1. "Error -1073807343"
Possible reason(s): VISA: (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.
2. error "-1073807302"
possible reason is listed as "VISA: (Hex 0xBFFF003A) Unable to start operation because setup is invalid (due to attributes being set in an inconsistent state)."
3.Error-1073807297.
possible reason is like "format string is invalid".
just a simple labview program. Maybe the driver itself is faulty?
07-29-2020 06:22 AM
Can you save your VI for a previous version of LV. Many of us aren't running on 2020 (I am still on 2019 personally)
07-29-2020 06:38 AM
I try the "save for previous version" and select 18.0.
hopes it works. thanks for your help.
07-29-2020 06:51 AM - edited 07-29-2020 07:37 AM
I can't open the driver VI's because they are still for LV 2020.
A couple of observations which might solve your problem, even if they don't I recommend that you do them.
Only initialise and close your VISA reference once. Leave it open whilst you are using it.
In other words, open your VISA reference - in a loop perform your tasks - once you are finish end the loop and close the reference.
It may be worth putting your initialise VISA reference in a loop to retry connecting if it fails but this shouldn't really be necessary and may just be a plaster for a bigger problem.
See a suggestion attatched
07-29-2020 07:02 AM
Thanks. I take a look first.
Also, the driver can be found from:
I download it again and it's for 2018 as it states.
please take a look.
07-29-2020 07:35 AM
@Niatross wrote:Only initialise and close your VISA reference once. Leave it open whilst you are using it.
This is the most likely thing to fix the issue. There is absolutely no point in constantly opening and closing a connection in a normal operation.