LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to acquire data and send via tcp/ip

well guys i'm having a problem here

i will have a client and a server....

the client will stay at my home doing some kind of monitoring

and i want that my client send this informations to me here in my work

the informations are 6 variables

3 voltages and 3 currents i already did a program for try the communication

and it works.... i used the random number only to see if i was receiving the values

and it works perfectly

now i have to put the real values... i will use a daqMX.. i don't know the exaclty daq.. but is the  cheapest... because i don't need too much things...

how could i put the client to make this monitoring and send the data to me??

 

thanks for the help!

0 Kudos
Message 1 of 22
(5,329 Views)

I don't quite understand what it is that you're asking for. You said "it works", but then you're asking how to put the client to make the monitoring and send the data. So, do you have a client and server VI? If not, have you looked at the examples that ship with LabVIEW? There's a data client and server that will do what you're asking. Keep in mind firewalls!

 

As for the DAQ stuff: DAQmx is not a hardware device. DAQmx is the programming API. The vast majority of the devices that NI sells use DAQmx for programming. However, older devices use Traditional DAQ. If you're going to buy a new device direct from NI you will likely get a device that uses DAQmx. If you hunt one down from, say, eBay, you may get an old device that requires Traditional DAQ. I would suggest looking at the USB-based devices, such as the USB-6009.

0 Kudos
Message 2 of 22
(5,326 Views)

well i will upload the server vi and client vi

u will see that when u run bouth

and change the values of server, the client changes too

but the server generates 6 random numbers, and i need it monitore a place

and give me the 3 voltages and 3 currents

 

i have to replace something at the server.vi on the part of the 6 random numbers to acquire the data

 

Download All
0 Kudos
Message 3 of 22
(5,321 Views)
I see what you're doing, and it seems fairly straightforward. I still don't understand what you're asking. Right now you're generating random numbers. OK. So, this would be replaced with the DAQmx functions. Are you asking which DAQmx functions to use? Have you installed DAQmx? There are numerous examples that get installed with DAQmx on how to collect data using DAQmx.
0 Kudos
Message 4 of 22
(5,314 Views)

yes i want to know what function of DAQmx do what i want

and yes i have the daqmx installed here

and i think i will use something like USB-6125

something like that

 

how can i do it?

can u give me an example

or upload a vi

so i can see and understand better!

 

thanks

0 Kudos
Message 5 of 22
(5,311 Views)

I assume you meant the USB-6215, as there is no 6125.

 

I would suggest looking over this page: Getting Started with NI-DAQmx: Basic Programming with NI-DAQmx. It contains a wealth of information on using DAQmx.

 

You can use MAX to create a simulated 6215 so you can create tasks and then implement your code using the simulated device. This will allow you to write the code and test it without actually having the device. Since the 6215 has only analog inputs I am assuming you're using something like a shunt to measure your 3 currents. As I noted, there are tons of examples that ship with DAQmx - just use the Example Finder to find them. For what you're doing you can probably get away with just using the DAQ Assistant Express VI. However, that Express VI generates dynamic data, which you will need to convert to an array in order to send it over TCP/IP. This can be done using the Convert From Dynamic Data VI (in the Express palette).

 

Attached is a simple example using the DAQ Assistant. The task is configured to get just one sample from each channel. You will need to modify the code if you are getting N samples from each channel (i.e., basically a 2D array). In order to run this VI you will first need to create a simulated 6215 in MAX. Please read the documentation in MAX on how to create simulated devices. The 6215 is in the "M" branch when you get the dialog to select a device.

 

0 Kudos
Message 6 of 22
(5,294 Views)
Have a look at examples in the Example Finder (Help -> Find Examples..). You will see the DAQmx examples are located in the Hardware Input and Output directory. Go through those, and try to integrate that with your project. If you have any questions, post back.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 7 of 22
(5,293 Views)

well smercurio_fc ,

i tryed ur example

but i didn't understand

why the numbers generates by daq in the client.vi are appearing differents

 

like in server the number is 1,23

 

in client the number is different  like 0,38

 

why this is happen?

and i have one question.... this daq...

i'm using the 6220, so i put to calculated voltages and currents...

so the assistant already gives me the right value? or i need to do the math at anoter vi, in this case RMS3V3I??

 

thanks for your help

 

 

 

0 Kudos
Message 8 of 22
(5,257 Views)

In my example the data output from the Convert From Dynamic Data is DBL. I forgot to include a Convert to SGL after the Convert From Dynamic Data VI. You can either do that, or simply change all your indicators to DBL and the datatype of the array constant in your client to be an array of DBL. Your choice.

 

I have no idea what this "RMS3V3I" is.

0 Kudos
Message 9 of 22
(5,252 Views)

well guys i will use for this project the NIDAQ 6210

but i have one here... very old is the NIDAQ 6009

that i want to test it first...

i go to MAX... and i didn't find this 6009

 

i have to use an old version of labview? like 7.1?

or where i can find it???

 

thanks

Message Edited by EduU on 08-31-2009 12:42 PM
0 Kudos
Message 10 of 22
(5,240 Views)