LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting single 32 bit real number to waveform for fft

Hi shreyaskarnad,

 

again you forgot to attach (real) code.

How should we help when we cannot inspect your code?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 17
(364 Views)

Hi sir,

I am very sorry sir for not attaching the codes. PFA for client and server VI

Download All
0 Kudos
Message 12 of 17
(360 Views)

Hi,

 

unfortunately I prefer LV2019.

Can you please downconvert your VIs (and rename them with senseful filenames)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 17
(344 Views)

use localhost 127.0.0.1 in both server and client

 

1# start server.vi

2# start client.vi

 

udp:

- manually assign different ports for sending and receiveing, 2-port

Spoiler
alexderjuengere_1-1700830324565.png

 

 

tcp:

- needs Listener.vi to assign proper port-pairs, manually assign remote port, 1-port

 

alexderjuengere_0-1700830236859.png

attached as labview 2019 64bit

 

 

to get more ideas, you may take a look at

 

C:\Program Files\National Instruments\LabVIEW 2020\examples\Data Communication\Protocols\TCP\Simple TCP

0 Kudos
Message 14 of 17
(321 Views)

important: you still need that differnt port, as you can't use a port more than once on the same computer.

 

so in this case the port pair is 56000, 63001

alexderjuengere_0-1700831635738.png

 

in the client .vi, the second remote port from sender.vi from listener.vi, would be local port

alexderjuengere_1-1700831950864.png

 

 

0 Kudos
Message 15 of 17
(313 Views)

So I was able to pass the waveform successfully using the shared variable instead of those TCP and UDP protocols. I successfully got FFT on the client side from the signal generated on the server side. And not just on localhost but rather when both server and client were 2 different machines connected to same network. Thank you guys for your help.

 

Now next step is to plot the frequency and corresponding magnitude as a bar graph on the client side. I was able to get the picture of it from Plot Waveform VI, but when I want to plot XY Plot it is giving error. It is cluster of 3 elements on magnitude side and 1D array of cluster of 2 elements on the plot side.

I used unbundle to get dF and magnitude and then bundled these 2, converted to array but still error.

0 Kudos
Message 16 of 17
(259 Views)

Hi shreyaskarnad,

 


@shreyaskarnad wrote:

Now next step is to plot the frequency and corresponding magnitude as a bar graph on the client side. I was able to get the picture of it from Plot Waveform VI, but when I want to plot XY Plot it is giving error. It is cluster of 3 elements on magnitude side and 1D array of cluster of 2 elements on the plot side.

I used unbundle to get dF and magnitude and then bundled these 2, converted to array but still error.


You cannot plot a waveform (or alike) datatype directly in a XYGraph!

 

Suggestions:

  • Read the context help for WaveformGraph and XYGraph to learn about the supported datatypes.
  • Examine the example VIs in the example finder. There is an example VI explaining how to use the different charts&graphs…

What is the "Plot Waveform VI"?

How should the bar plot look alike when you already can get a waveform graph/plot?

Why do you think you need to use a XYGraph?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 17
(254 Views)