02-12-2010 08:52 AM
Solved! Go to Solution.
02-15-2010 01:21 PM
Hi Mike,
By defualt a DataSocket will be configured at a "single point" variable, meaning the array you are passing will continually be overwritten. There are a couple methods for avoiding this problem:
1. Does your application require Datasocket communication? Or, could you employ a global shared variable with buffering to pass the array data between VIs?
2. Configuring a server-side buffer would essentially enable buffering on the DataSocket element, a link to more information on the DataSocket configuration is given below:
ThankYou,
PCorcs
Patrick Corcoran
Application Engineering Specialist | Control
National Instruments
02-15-2010 10:11 PM - edited 02-15-2010 10:13 PM
02-19-2010 09:52 AM
Mike,
I 'm not sure what you mean by, "The programs will be compiled so global variables won't work." If you are referring to an executable application, you may build LabVIEW applications that host network shared variables just like VI's in the development environment. Like the devlopment environment, the Distributed System Manager must be deployed to the target machine; as well as, the LabVIEW Run-Time engine.
Using the LabVIEW Shared Variable
http://zone.ni.com/devzone/cda/tut/p/id/4679
How Do I Deploy Network Shared Variables from a Compiled Executable?
http://digital.ni.com/public.nsf/websearch/04D9A85B6967EE87862571140065EEC6?OpenDocument
In so far as your second set of example VIs, the code seems correct; however, you are opening a Data Socket reference inside a While Loop in the 'Scan' VI. I may reccomend initializing the reference outside the loop, as you did with the boolean value.
Thanks,
PCorcs
Patrick Corcoran
Application Engineering Specialist | Control
National Instruments
02-19-2010 11:14 AM