03-27-2012 08:27 PM
Hi !
There's a problem puzzled me some days.How does the URL of DataSocket constitute ? And how to use it in LabWindow/CVI ?
For example.I have downloaded a code in http://zone.ni.com/devzone/cda/epd/p/id/3787.I want to make it work properly.So I configure my DataSocket Server Manger according to the URL of this statement.
DS_Open ("dstp://weather.natinst.com/weather/current", DSConst_ReadAutoUpdate, DSCurrentCallback, NULL, &dsCurrentHandle);
My DateSockket Server Manger is configured as:
However,it could not work properly when I debug it.
There's a introduction at the top of the code."You may need to replace the references to weather.natinst.com to 130.164.140.10 if the DNS isn't working properly."So,I modified the statement into
DS_Open ("dstp://130.164.140.10/weather/current", DSConst_ReadAutoUpdate, DSCurrentCallback, NULL, &dsCurrentHandle);
but,it did work properly.
We want to communicate with other computers via the URL of DataSocket in LabWindows/CVI.Whereas,how could we make it ia the URL ?
If anyone could help me solve this problem,I would appreciate it very much !
Best regards.
xiepei
03-28-2012 04:59 PM
The example you have downloaded uses a weather station server that NI DataSocket examples used several versions ago. This server is no longer available and so the variables can no longer be accessed. I would recommend instead using the DataSocket examples installed with CVI (C:\Documents and Settings\All Users\Documents\National Instruments\CVI2010\samples\DataSocket). These are more thorough examples and use servers that are installed onto your system instead of a server on the NI website. We will remove the example you found since it no longer works.
03-28-2012 08:16 PM
Hi !
Thank you very much for your reply! I will accept your advice.
Besides,I have another question.If I want to visit other computers or other websites,how does the URL of DataSocket I constitute ? Does the URL has any relation with the DataSocket Server Manger ?If does,how to configure the DataSocket Server Manager to let them connected.If they have no relation,how to use the DataSocket Server Manger ?
After all,I want to know how to use it in LabWinows/CVI ?
Thank you very much !
Best regards!