11-16-2009 01:49 PM
I need to write to a data socket server using a program that scans a multiple channel data logger. Up to 2 scans can be enabled and the scans run at selectable times and on selectable channels. For example, scan 1 might scan channels 0 to 19 at a two second interval and scan 2 might scan channels 20 - 99 at a 10 second interval. I would like to know the best way to implement the ds server so each scan will write it's own data at different times and they will not overwrite or otherwise interfer with one another. Possible? Various seperate programs will access this data from the server and update their front panels as the new data is written to the ds server. In the above example, my reader program which executes every 50 ms would update channels 0-19 every 2 seconds and channels 20-99 every 10 seconds. Is it possible to open two ds servers using one for each scan? I've played with that without success. I looked at the data socket server manager but couldn't determine if changing it would address my problem. I'm using LV8.5.1 and the programs will be compiled to executables for running on multiple computers in the lab. Thanks for any advice. Hope this makes sense.
11-17-2009 09:37 AM
Sorry, guess that didn't make sense. So let me just ask, is it possible to open two or more seperate data socket servers or to open two seperate 'partitions' of one data socket server where data can be kept seperate and written/read independently? thanks.
11-17-2009 02:01 PM
Hi Mike,
You only have one DataSocket server available to you at a time. You can write to a server from multiple locations, but you cannot have multiple servers. You should be able to implement your idea in your code by alternating between write locations. You would have to stagger the scans so that they don't overlap however. Here are a couple of links that you might find useful:
Configuring a DataSocket Server
http://zone.ni.com/devzone/cda/tut/p/id/3123
Can Multiple DataSocket Writers Connect to the Same Item?
http://digital.ni.com/public.nsf/websearch/A8AC9A751404BAB18625672400630A3D?OpenDocument
Nick Keel
Applications Engineering
National Instruments
11-17-2009 02:29 PM
Thanks Nick. Thats' what I was afraid of. Staggering the scans was what I wanted to avoid if possible but that's exacty what i have ended up doing. Makes the timing on scan 2 partially dependent on the scan 1 interval but we can live with it.