LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

signal tranmission between client and server through tcp/ip

Hi everyone,I want to transmit analog signal from server to the client,I enclosed one file which is used to transfer an array of string,how can I modify the enclosed example for analog signal tranmission(numeric) and save the signal into a file "load to an ASCII file"".kindly help me to modify this code.
Thanks

regards,

Khan_khan

0 Kudos
Message 1 of 5
(3,178 Views)

Hi,

 

I hope I have understood your problem. In the example that you have attached the data entered are strings but as you can see in the input of "TCP Write" the data is first passed to the "Type Cast" that can be adapted to any type of data format to the block TCP. If you read the help of "type cast" do you can get an idea.

 

About saving, I think you want to refer to the block "Save to ASCII". The input of this block needs of a data type of waveform. You can then create a waveform from the data you have and connect it to the "signals in", and you can add the path to the file. Hope that helps.

 

Mario

0 Kudos
Message 2 of 5
(3,150 Views)

Dear thanks for your reply and suggestion.I solve somehow the problem as enclosed in the zip file but now there is one problem that i am not getting with. When I run the project, the first array with the name of "array" gives the wrong result in some position.First all slots of array are filled with the right data but then the first index and few other index gives the wrong result.Kindly correct my error.

The second problem is ,when i increase the frequency of the signal considering also the sampling rate, it gives me unexpected data at multiple locations.Kindly correct my design so that it should work perfectly.I shall be very thankful.

0 Kudos
Message 3 of 5
(3,123 Views)

Dear thanks for your reply and suggestion.I solve somehow the problem as enclosed in the zip file but now there is one problem that i am not getting with. When I run the project, the first array with the name of "array" gives the wrong result in some position.First all slots of array are filled with the right data but then the first index and few other index gives the wrong result.Kindly correct my error.

The second problem is ,when i increase the frequency of the signal considering also the sampling rate, it gives me unexpected data at multiple locations.Kindly correct my design so that it should work perfectly.I shall be very thankful.

0 Kudos
Message 4 of 5
(3,122 Views)

Hi,

 

I analyzed your VI, and I would first like to give you a suggest.
You may think you sent the entire waveform to the client and there do all the analysis, there is no need to chop the waveform before sending the TCP packet. If you need to pass the value of the frequency of the signal you can pass it with another TCP packet. Do not forget to always specify the type of the cast when you send it in block WRITE.
As for your problems, what you mean by wrong date. I tried to plot and it all seems correct with frequencies up to 10 Hertz. Appearance hear from you.

0 Kudos
Message 5 of 5
(3,097 Views)