08-09-2005 03:26 PM
08-09-2005 03:37 PM
08-09-2005 04:03 PM
Hi P.M.
Thanks for the quick reply. I forgot to mention I am running Labview 6.1 and unfortunantely, it doesn't have timed loops. I think it was introduced in LV7. As for the event structure (which is how I am currently checking for user input), how could I use front panel locking to my advantage? I'm still not very comfortable with event structures. They seem so unelegent to me. Oh well, , thanks for the help. I'll see if I can get one of your suggestions to work for me. Thanks,
PP
08-09-2005 04:47 PM
Event structures may appear daunting at first, but they have made making user interfaces a lot easier. Rather than having to poll buttons and other controls to see if their value changed, then having the logic to cause your state machine to react to those changes an event structure encapsulates that functionality, plus a lot more that used to require a lot of inelegant code. I'm not sure how to implement one in your instance, but having a "timeout" frame (to which the event structure defaults after a given time if there are no other events) which would contain your communications code, and checking the "lock front panel ..." for that event case might help. With a very simple event structured example I'm not seeing any increase in CPU when I click the control while the panel is locked, but it isn't a very complicated User Interface, nor is there much going on in the diagram.
P.M.
08-09-2005 05:45 PM
08-09-2005 09:28 PM
You might really want to reconsider your usage of UDP as it makes to guarantee about the delivery of datagrams. You can drop packets, get packets out of order, or even get duplicate packets.
Mike...
08-10-2005 08:34 AM
Thanks for the sugestion tbob, but I don't think it will work here. I have data coming in from a scientific instrument in a large number of large blocks and the blocks must be processed all together. I can really think how to adjust your consumer producer to suit my needs but I'll keep trying.
As for not using UDP, that is NOT an option since I have no control over how the instrument comunicates with me; I must adapt to it.
As always, thanks for the help guys,
PP
08-10-2005 11:19 AM
08-10-2005 01:38 PM
Hi tbob,
Thanks for the suggestions. I'm still trying to rework your idea to suit me. For more information, you can see my previous thread at: http://forums.ni.com/ni/board/message?board.id=170&message.id=136197&view=by_threading&page=1, but to sum up, an instrument dumps large data blocks (about 16MB in size) to a UDP port, with about 250 being sent in rapid succession. I need to capture all of these packets to preocess them all together. There is a large break after the 250 packets in which to process the data. Thanks to some Labview wizzes, I now how the data processing working fast enough, but I need to capture the data MUCH faster since I am currently losing packets if I ask my computer to do anything else while data is coming in. Currently, all I do is use a for loop to build an array and then after all of the data has been entered, I concatenate the array into one string and I process it. I will keep trying to adjust my processes to make them faster, but any suggestions would be appreciated,
PP
08-10-2005 02:58 PM