Sorry. This is not vi snippet. Just to show how I added extra node to get Bytes at port.
I have seen the video you mentioned but cannot open the code from Github due to the Labview version compatibility. I am using LabView2016.
Is there any way to count the scanner output?
What do you mean by "count the scanner output"? Can you provide an example?
If you just want to know how long the barcode is, you can use the "string length" primitive. You'll probably want to use "trim whitespace" before that to get rid of any "\r\n" if you don't want to count those.
I have to how many times the scanner read the code / performed the scanning function and how many times LabView read those codes and how many misses are at the end of the test. For the LabView Read, I will use a counter which will be triggered by the Read Vi's Return Count output.
That why I am looking for any property that triggers with the scanner read operation before labview reading operation.
It's called a case structure. If you had more than 0 bytes at port, or if you did a VISA read of X number of bytes without an error, then you know you had a successful read. In the True case, you do what you want with the data. If you are counting successes, you maintain an integer in a shift register and add 1 to i in the true case. (Wire it through without change in the false case.)
Read VI's Return Count output tells you out many bytes were read. Do you really want that? Or just the fact you had a successful read.
For successful reads it's OK. what about the miss reads? A total of both will give the scanner total output.
How to calculate the miss reads. If we calculate the errors generated. But errors are also generated due to timeout.
So you keep another shift register and only add 1 to in in the false case.
I don't know what the difference is between a "miss read" and a timeout.
If you sat down, carefully thought out the steps your program needs to do in what order on a piece of paper (this is called pseudocode or even a flow chart), it will organize your thoughts and you'll be able to translate that to LabVIEW code.
I tried with a separate while loop with the property node " Number of Bytes at serial Port". With addition of this While Loop to the code started malfunctioning. Also I have to run five scanners at a time. The addition of an extra while loop will make the code quite complex.
I need to record what I am getting from the scanner and what I am reading from read vi. Is there any mismatch between the two?
Means that Read vi missing some codes from the scanner?
The main thing that I am not able to synchronize the Excel Report write data with the Visa read output,
Still, I am getting missed data cells in the excel sheet. Please find the enclosed Excel Report when "Time out" on Visa Serial vi is set to 2Sec.
Program vi is attached to my previous reply.