04-20-2025 11:19 AM
Hi,
I'm using UART communication to read the data sent by my card.
The data is sent at different times that I don't control.
VISA READ doesn't accept this time difference and sends me error messages.
Your suggestions are welcome, please.
04-20-2025 12:52 PM
Hi Fredo,
@Fredo123Danzel wrote:
The data is sent at different times that I don't control.
VISA READ doesn't accept this time difference and sends me error messages.
Your suggestions are welcome, please.
Suggestion: handle the errors (programmatically)!
Other stuff:
04-22-2025 03:53 AM
I'm reading data sent by card using Visa Read, but as soon as my system stops sending data, Visa Read gives me this error message -1073807339 and the buffer is not regenerated. Do you have any idea please?
04-22-2025 03:55 AM
04-22-2025 04:08 AM - edited 04-22-2025 04:13 AM
@Fredo123Danzel wrote:
I'm reading data sent by card using Visa Read, but as soon as my system stops sending data, Visa Read gives me this error message -1073807339 and the buffer is not regenerated. Do you have any idea please?
You need to do proper error handling. -1073807339 means simply that there was no data to return within the configured timeout period. This timeout error is actually quite often an expected error if your device is not working according to the command-response principle since your program doesn't know when and if your device returns data. Basically you need to ignore timeout errors in such a case and simply keep trying to read again. You can implement something like this:
do
err = VisaRead(.....);
if (err == noErr)
err = processData(...);
else if (err == timeoutErr)
// ignore error and keep looping
err = noErr;
while (keepRunning && err == noErr);
This is very barebones. You probably want to have a way to exit that loop through an external event too (here for instance through the keepRunning flag, to abort the read loop on user control). Also there is likely extra error handling involved. VISA is a generic communication interface allowing communication over serial, GPIB, USB, TCP/IP, PXI and several flavors of these. It can be used with thousands of device that all have a specific operation mode. As such it is not designed to work perfect with a specific device but give the user all the building blocks to pretty much talk with any possible device out there. You need to implement your own logic on top of VISA to handle the peculiarities of your device.
Basically an error in a LabVIEW cluster is by far not always fatal, especially when you communicate with a device. Sometimes it is at least possible and sometimes it is actually what happens most of the time, but that timeout error really only means "Nothing to do so far, you may want to try again instead of throwing your hands in the air, unless you are tired of waiting for the device to respond!"
04-23-2025 11:36 AM
Hello,
my goal is to read the data sent by my card. I use the Match Pattern block to select the LOGIN sent by my card. Then I send a Linux (root) command and the password to log in to the system. Once logged in, I send a new Linux command to test the connection to my card. Finally, I plan to reset my program to test a new card. Currently, my system works half the time. Do you have any ideas, please?
04-23-2025 02:40 PM
I highly recommend you watch this video: VIWeek 2020/Proper way to communicate over serial
05-06-2025 02:02 PM
Hi ROLF,
I've developed an application that measures voltages and reads/writes data based on information retrieved from my card via UART.
The voltage measurement part works correctly — I can measure the voltages of multiple cards as many times as I like.
However, for the second part, I can only test one card. That is, my program doesn't return to the beginning of the loop to allow testing a new card.
Can someone please help me?
05-07-2025 12:45 AM
Hi Fredo,
@Fredo123Danzel wrote:
my program doesn't return to the beginning of the loop to allow testing a new card.
Can someone please help me?
When you want help from us about YOUR program it would be a good idea to attach YOUR program…