LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help : Reading from DAQ through TCP/IP ?!!

Hello

I have two machines running labview connected to a network. Basically,
I want to read data from a temperature sensor through a DAQ card
from one machine, and be able to plot the data in a chart in the
other machine. I'm trying to use TCP/IP feature to do that but it's not
working.

There is a VI in the tcp.lib "simple data client.vi " and
"simple data server.vi" that does the same thing except that
the data are of type double generated from a sine function and
a random number generator. So i tried to do the same but since
the data read from the DAQ has a thick brown line (not sure what
type) the task was not easy. In the server part i tried to broadcast
3 things through (tcp write.vi): The type of the data, the l
ength of the
string, and the data itself. On the client side i read (tcp read.vi)
these things and plot the data. But i'm not getting any output on the chart.

I had to use (Type Cast), (flatten to string) and (unfatten from string)
in order to get the right wiring. Both VIs run but there is no output
on the chart.

I know it's hard to explain in words, but if anyone is interested i can
give more detai or send the vis to him to look at them. They seem very simple and
straight forward but i don't know why they don't work.

Appreciate any help.

Thanks

Sami
0 Kudos
Message 1 of 5
(3,268 Views)
Try running the "Remote Device Access Server" (RDA) on hte machine that has the DAQ card in it. You'll find it in NI-DAQ folder under National Instruments in your Start Menu. (guessing you're running Windows here?)

With this running, you can start MAX on any machine on the network and access and configure the DAQ cards in the remote machine and program an applicaiton just as if the DAQ cards were local. You'll need to know either the remote machines IP address or network name.

I've used it quite a bit and have never had a problem. The Help inside MAX gives good details on how to set it up and use it.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 2 of 5
(3,268 Views)
Ed's answer is a great way to do what you are looking for. If you want to try to fix the issue you are seeing at the moment I may be able to shed some light on it. The brown wire is a waveform, which is kind of like a cluster of 3 elements, to, dt, and Y.

Depending on how much data you want you may be able to use the Get Waveform Components VI to get the Y array and simple transfer it as an array of doubles. Then you can read the array back.
0 Kudos
Message 3 of 5
(3,268 Views)
sami wrote:
> Hello
>
> I have two machines running labview connected to a network. Basically,
> I want to read data from a temperature sensor through a DAQ card
> from one machine, and be able to plot the data in a chart in the
> other machine. I'm trying to use TCP/IP feature to do that but it's
> not working.
>
Why not use the DataSocket TransferProtocol (dstp) built in to Labview?

In short, it allows you to link together an indicator on one vi with
a control on another vi. The two vi can be on the same machine or
on any 2 machines that can talk TCP/IP to each other.

Its very easy to achieve, doesn't need any programming or understanding of
TCP/IP
and seems to give good performance.

Look in Find examples|Networking|Datasocket for DSReader.vi and DSWriter
.vi
for more info.


--
Remove "spamkill." when replying to this message
0 Kudos
Message 4 of 5
(3,267 Views)
Thanks all

The RDA works fine except that there could be interference when more
than one client is connected. I think reading the Y value of the waveform
should work. I'll try it and see.

Thanks again

Sami
0 Kudos
Message 5 of 5
(3,268 Views)