11-25-2022 04:07 AM
@GerdW wrote:
Hi MaSta,
@MaSta wrote:
A PNG can contain LV code? I doubt that. But I found it now. Never noticed
Many image formats can contain arbitrary information! And LabVIEW code is just another kind of "arbitrary information"…
Did you ever wonder how digital cameras store information like exposure settings inside of JPG images?
Actually that is fairly standardized with so called EXIF tags.
11-25-2022 05:45 AM
Back to the topic. Anybody watched the video and has some explanation?
11-25-2022 06:09 AM
Hi MaSta,
@MaSta wrote:
Back to the topic. Anybody watched the video and has some explanation?
Can you verify your device actually receives the command?
(To make sure the problem is in the VISAWrite or VISARead command! Right now you only detect a timeout at the VISARead, but that might occur because the VISAWrite does not work as expected…)
11-25-2022 06:54 AM
@GerdW: No. I have to rely on VISA actually sending it. Tracing it only shows (1st attempt, 1 fail):
while the 2nd attempt was good:
11-28-2022 06:58 AM
Many drivers do not do well if you are constantly opening and closing the port. If you leave the port open, can you perform your 15ms rate without errors? This would require using a loop around your main part of the code (leave the Configure Serial Port and VISA Close out of the loop).
11-29-2022 03:34 AM
@crossrulz wrote:
Many drivers do not do well if you are constantly opening and closing the port. If you leave the port open, can you perform your 15ms rate without errors? This would require using a loop around your main part of the code (leave the Configure Serial Port and VISA Close out of the loop).
Did you look at my VI? It is exactly done this way. The port is only opened once per run. Running the VI in auto-repeat doesn't show the problem or at least not that often.
11-29-2022 04:15 AM
This sounds like an issue closer to the hardware. Can you verify the response timing by other means, e.g. an oscilloscope (for a real line) or wireshark (for a virtual port)? It sounds like the first iteration is the one that is mostly affected, so I guess that the device needs some time to "warm up". Do you have access to the firmware?
11-29-2022 06:15 AM - edited 11-29-2022 06:17 AM
@LLindenbauer: Thanks for your intention to help, but I explained this several times now:
- it doesn't occur outside of LV and VISA
- the response time of the device isn't the problem, as shown in the video -> it's fairly stable when doing the same in our C# software
Regarding the first iteration: no, as the query is in the 3rd iteration.
From the I/O Trace log I see that VISA claims to have have transported the query and then waits for the answer. Not getting it and running into a timeout can only mean, the device has either not responded at all (disproved by the counter check with EAPC), it hasn't sent the termination character (not disproved yet, but easily to do if needed) or VISA has not reacted to the data coming in or is accessing the driver in a wrong way.
I think I will contact the NI support. Let's see what they have to say...
11-29-2022 06:35 AM
You can insist that it is a bug in VISA or whatever and refuse to consider further tests as suggested by members and point at your VI and video and say they contain all conclusive proof that it is not something you should have to bother about yourself but someone else (such as the volunteers on this board). However it is your project and your device you try to talk to, and hence your debugging effort that will determine if you get this working or not.
Just because it happens when using VISA and not when using your own COMM API (apparently, all we have is your word for it), doesn't mean that VISA is at fault. Just maybe that it doesn't do or leave out certain things automagically but that you have to set or clear some attribute explicitly. But if you refuse to do your own testing and debugging and simply just keep pointing at your posted VI and video and hope that someone magically has an Eureka moment from that, your VI is probably never gonna work as intended.
11-29-2022 07:27 AM - edited 11-29-2022 07:31 AM
I didn't refuse anything, I just did all what was suggested and what I could do. Most of the suggested actions were already done before they were suggested.
Furthermore, nobody said it's a bug. Could also be using VISA the wrong way.
It's still weird, but it seems to have disappeared. The only thing I changed yesterday, according to GerdW's suggestion, is to replace the VISA Open VI by the Configure Serial VI to set the timeout to 200 ms. Nothing else. No read timeouts anymore so far.