LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication synchronisation with Reporting Toolkit Issue

Hi Gregory,

 

I have tried with Termination Character (0xD). Still code gives read error and stops after few iterations. Also the scanner is in auto-scanning mode.

Matharoo_0-1618484776326.png

Please find the enclosed vi snippet.

 

Regards.

GMatharoo

 

0 Kudos
Message 11 of 28
(266 Views)
That's a timeout error. You should expect those if your scanner is not sending data. You can treat it just as you would treat having zero bytes at port.
0 Kudos
Message 12 of 28
(257 Views)

Hi Gregory,

 

As I mentioned the scanner is in auto-scanning mode. Scanning at a constant rate. I need to run the test continuously for two-three days. But it just stops after reading only five scanning cycles. How can I synchronize the Visa Read with the scanner output.

Regards.

GMatharoo

0 Kudos
Message 13 of 28
(252 Views)

Well it is only stopping because you told it to stop on any error. If that specific timeout error occurs, you should ignore it. There is a "Clear Errors" VI for this purpose. You could also increase your timeout value depending on how response you need the loop to be.

 

I would get rid of "bytes at port" as Crossrulz suggested, and just do the VISA read. Then you can see if number of bytes read is >0. If it is, update your read buffer, if it isn't, then do nothing.

0 Kudos
Message 14 of 28
(248 Views)

Hi Gregory,

As per your recommendation, I am now using Visa Read without property node "bytes at port". I noticed that Visa Read vi only reads scanner output once. After that, it never reads. I tried with property node with Term Character. Also tried without property node, and by changing different "timeout" values. But I didn't find any output(after a single read).

Please find the enclosed snippet vi and screenshots with Highlight Execution ON.

 

0 Kudos
Message 15 of 28
(224 Views)

Your timeout is set to 3 seconds.  Are you sending new barcodes to be read faster than that?  If you don't pull the trigger fast enough, you'll get a timeout.  Since your error wire has a shift register on it, once you get an error, it will prevent all future runs from reading.

 

It seems you didn't look at the advice about clearing specific errors.

0 Kudos
Message 16 of 28
(219 Views)

Hi RavensFan,

 

Could you please suggest to me where should I put the " Clear Error" vi.

If send me a pic of the updated code, I will appreciate it.

 

Regards.

GMatharoo

 

 

0 Kudos
Message 17 of 28
(213 Views)
0 Kudos
Message 18 of 28
(207 Views)

Hi Gregory,

 

It works fine without error case structure.

I have to count the output from the scanner. I was using the " Bytes at Port " property node. 

If I add one more property to input property control. It doesn't count any input from the scanner. What to do?

Matharoo_1-1618593183274.png

 

 

 

 

0 Kudos
Message 19 of 28
(195 Views)

I don't see how the picture you posted relates to the picture Gregory posted.

And your picture is incomplete.

 

You should not need Bytes at Port 99% of the time.

 

Have you seen Crossrulz' VI Week presentation ?

0 Kudos
Message 20 of 28
(190 Views)