03-19-2014 03:46 AM
Hi billko,
I am not waiting for data, what is the meaning for "you are trying to force timed reads when it cannot be done''
03-19-2014 09:40 AM
@Ranjeet_Singh wrote:
Hi billko,
I am not waiting for data, what is the meaning for "you are trying to force timed reads when it cannot be done''
Of course you are waiting for data. You are trying to pair up unsynchronized data and the way you are doing it, the loop will not iterate until both of the VISA reads returns something. Therefore you are trying to enforce synchronous reads.
03-19-2014 03:56 PM
How often do the external devices send data? What guarantees that both devices will send data within 600 or 800 ms of each other? You have termination characters disabled. How do you determine that you have complete messages and not part of a previous message and port of the current message?
There are several effective ways to synchronize the data without both Reads being in the same loop. But before making any suggestions, we should know more about what is goin on.
Lynn
03-20-2014 01:00 AM
@billko wrote:
Of course you are waiting for data. You are trying to pair up unsynchronized data and the way you are doing it, the loop will not iterate until both of the VISA reads returns something. Therefore you are trying to enforce synchronous reads.
My loop will wait for timeout only. If no data read then it will go for other loop. Once I got valid values then I will store in string. then next time for other I got valid value then I will link and write to database
03-20-2014 02:26 AM
that depends on user. When he scans then data comes and when he keeps weight on machine then weight will come.
My data lenght from each port is different is fixed and I am not facing any problem of data missing.
I can check with weight and scanned barcode that it is previous data of new data
03-24-2014 02:20 AM
Method by which I am stopping the VI is correct. attached vi for reference...
When this VI hangs I forced to stop using task manager
03-24-2014 02:34 AM - edited 03-24-2014 02:35 AM
This is my actual VI
03-24-2014 03:28 AM - edited 03-24-2014 03:28 AM
The song remains the same. Have you tried ANYthing anyone has suggested, instead of stubbornly saying that everything you are doing is correct? If everything you are doing is correct, then why isn't it working?
03-24-2014 03:33 AM - edited 03-24-2014 03:35 AM
I never said I am correct. I justified everything here asked from me. I never uploaded my actual VI and I found when application hangs then I face problem in stopping my app so I uploaded my actual VI..
I know some problem with my VI and Its not working thatswhy I am here
03-24-2014 06:37 AM
It doesn't look like it should be the VISA connections. They have a timeout of 600ms and 800ms. And I assume your "hangup" is for a lot longer than a couple of seconds.
The other potential issue would be the connection to the database. If that was interrupted in some way, you could have a timeout happening from that, which would look like a hangup.