08-02-2019 04:22 AM
Hello!
I apologize if this has been discussed before, but I have searched in a lot of posts and haven't found a solution to my problem.
Essentially, I wrote a simple Labview Program to communicate with a Keysight inVision 3000Xseries labiew code (screenshot attached) and acquire averaged data.
The code works very nicely when I use under 900 averages but when I increase the Averages I get a Visa read time out error, because the default time (2000 ms) Is not high enough. I tried to set it to 10000 ms, but it still doesn't work. Could anyone help me with this issue? Thank you so much!
(Any more details can be given if needed)
Solved! Go to Solution.
08-02-2019 04:50 AM
08-02-2019 07:00 AM
Other issues with your VI.
1. Use block diagram cleanup. You have a lot of hidden wires, or ones that are bent in crazy ways.
2. Although your For Loop runs 3 times, only the data in the last iteration gets saved. Why? You are opening and closing the file inside the loop. They should probably be done outside of the loop. As a result, when it reopens, and the file pointer is at the beginning by default, data is written from there, overwriting all of your previous data.
08-02-2019 07:57 AM - edited 08-02-2019 08:00 AM
Thank you both so much for your replies! As suggested I tried to adjust the VISA buffer - however, even if I leave the buffer input values as default (screenshot) I get an error message that the buffer mask is invald? I also tried all the other buffer masks (32, 48) but with no success. Any help would be highly appreciated 🙂
08-02-2019 09:23 AM
It is difficult to debug a picture. If you could attach your VI (and subVIs) it would be helpful.
08-02-2019 12:42 PM - edited 08-02-2019 12:43 PM
Yes you are completely right, please find my VI attached. Thank you for your help!
08-02-2019 01:34 PM
Can you zip the entire project and attach it?
08-02-2019 03:42 PM
Thank you for your efforts! My problem is whenever I try to zip the entire project it says 'Error 7 occured...' (screenshot attached). Any idea how to overcome this?
08-02-2019 07:21 PM
Maybe you can explain what you are doing a bit better. Even though some VIs are missing it looks like you are doing some weird stuff.
I would try to do some like this:
mcduff
08-03-2019 02:22 AM - edited 08-03-2019 02:41 AM
Thank you so much for your reply! To answer some of your questions:
1.Yes, maybe the 'Visa open command is unneccessary, I just added it because in the Labview description how to adjust the Visa timeout it was added, as well. https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAQKSA4&l=en-GB
2. Correct. 'Initiate' starts the measurement.
3. Essentially, the REC: SETUP: START 3 command recalls a specific setup in the oscilloscope with all the settings I need. Unfortunately, it is not possible to recall a setup which includes averages, this is why I included a 'configure acquisition field' afterwards where I can set the number of averages. The number of averages I need is 5000 but currently the maximum I can acquire is 900, after that I get a Visa timeout error.
4.The setting should be correct. I only adjust the number of averages. The constant 1 indicates that the oscilloscope is set to the averaging mode.
5. Correct.
6. Yes I have to repeat the measurment three times. However, you are right I don't need to repeat the averaging configuration three times, I could also place that outside the loop.
In general, I have to say that (although I know it is not perfect) the code is perfectly working for averages under 900. Only when I increase the number, the timeout error appears.
I attached the whole project without the problematic file which was causing the error - I hope that helps?
Okay, I will try to look into your suggestions. Thank you so much! If someone has anymore helpful input in the meanwhile, please let me know.