09-05-2010 07:02 PM
I have two VIs running on a single PC 64 Bit (LV 9.0.1 (32bit)). I had used these two in previous installs on older WinXp computers (LV ver7) and never had the problems I'm experiencing now.
One of the VIs (Action) has sub-routines for controlling motors and at the end of each sub I have an indicator which shows the function has completed. Each of these indicators is linked to the datasocket port as a dynamic variable. The second VI (Terminal) calls the subs through datasocket enabled radio buttons in a sequence. In order that the subs are called in the right order, each routine waits for the indicator to show that a sub has completed before moving to the next sub/action.
What is very frustrating is that the datasocket server shows everything as normal and the datasocket indicator is green, but there are times that a sub finishes, but the "Terminal" VI does not see the change and hangs. I have tried putting delays etc. to ensure that the indicator stays on for 1-2 seconds, but sometimes it works,,,, then doesn't.
I have searched for simple examples of how to set-up the Datasocket Server etc.,,, but all of the examples leave me deer eyed. I do recall a simple white paper from over 5 years ago explaining data sockets,,, but have not been able to locate it.
Additionally, I have created variables in the Datasocket manager, but fail to see how to link the indicators to these. When I go to the indicator and browse for the link in data binding, the variables do not show up.
(Note, I' using two VIs because the "Terminal" VI may be located on a remote computer for some installations)
Solved! Go to Solution.
09-07-2010 02:18 PM
Hello,
Are the VIs that you are using on different computers to where you would need DataSocket to exchange information? There is a pretty good tutorial on DataSocket here: http://zone.ni.com/devzone/cda/tut/p/id/3224 . In order to link an indicator to a DataSocket variable, you would first open the DataSocket Server Manager and create the variable. Once that is done, you would open the DataSocket Server in order to start the server. Once you have done that, you can place a boolean indicator in a VI and right-click and selct Properties. Under the Data Binding tab, you would then select DataSocker from the drop-down and then click the Browse drop-down and select DSTP Server. Here, you can find DataSocket Server under the Computer entry and the variables should show there for you to select and bind to the indicator. Another thing I would check is your firewall to make sure it is properly configured for DataSocket: http://digital.ni.com/public.nsf/allkb/0D7B86F4B4D19A5E86256F9A006EECB1?OpenDocument .
-Zach
09-07-2010 06:55 PM
Thank you for the links and info. It was a long day, but managed to muddle through and solidify the Datasockets. Plus I installed LV 64bit.
(I'm sure my exhaustion had added to my confusion,,, I'll get some rest before asking q's again,,,,)