10-21-2008 05:44 AM
Dear all,
I am attaching the snapshot of the VI i am working on.
When the No. of bytes at Port >= 1054, it reads from the port.
Presently i am executing the VISA Read function in a case structure.
Now, i want to execute that Read function in an event node. like whenever the bytes at port >=1054, it should initiate some event and the read function should be called in that event node rather than in a case structure.
How is it possible ?
Thanks,
Ritesh
Solved! Go to Solution.
10-21-2008 06:26 AM
If you use an event which will wait 1054 bytes to be executed, and for some reason there is no communication your vi will wait forever.
To solve that, you need some kind of polling...
So your code is ok. Just add a wait function in the loop
10-21-2008 06:53 AM
10-21-2008 07:57 AM
Hi Pnt and Andre,
I am working on an application which is completely designed on user events. And getting data from my hardware is also a user event action.
Could anyone of you please post a sample example showing an event which will wait for 1054 bytes to be there on the port and execute the Read function ?
Thanks,
Ritesh
10-21-2008 08:48 AM
Just use the timeout event, and put inside your existing code.
10-21-2008 09:35 AM
10-22-2008 02:26 AM
Hey Pnt,
Thanks alot for your suggestion.
Putting the entire code in the timeout event really works gr8.
Thanks,
Ritesh