LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How does the URL of DataSocket constitute?And how to use it in LabWindows/CVI ?

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:未命名1.jpg未命名2.jpg

 

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

 

 

 

I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.
0 Kudos
Message 1 of 3
(3,225 Views)

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.

National Instruments
Message 2 of 3
(3,217 Views)

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!

 

I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.
0 Kudos
Message 3 of 3
(3,213 Views)