LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transferring data from pda using tcp [URGENT!]

hi, im collecting temperature data on a pda and i want to transfer it to a laptop, ive got the simple tcp server and client working but im having trouble linking the analogue acquisition part to the tcp part
ive stuck on the modified tcp example im trying to used. my main problem is just how to actually connect the data out from the analogue input read to the write of the tcp
any help would be ace
cheers
andrew
0 Kudos
Message 1 of 5
(2,848 Views)
There are a lot of broken wires in the TCP portion.  I would suggest looking at the TCP examples to make sure everything wires up properly.
 
The loop at the top as a case structure around it which means it will only execute once when the program starts.  So if the button isn't pressed when the program starts, the loop will never run.
 
To get the data from the acquisition loop to the communication loop, use queues.  Look at the examples for the producer/consumer design architecture.
0 Kudos
Message 2 of 5
(2,846 Views)
sorry i dont think i made that very clear, ive been attempting to connect the two parts of it but labview isnt having any of it, i assume i need to convert the type of data between the analogue read and the tcp write functions? ive been trying to do it in the same structures.

sorry about that
andrew
0 Kudos
Message 3 of 5
(2,827 Views)
You can't directly connect the two parts. Doing this will create a data dependency which means one part will until the other is finished before it even starts. As RavensFan noted, you need some other mechanism to access the data that's being collected in your data acquisition loop. As he pointed out, queues are one method.

The data you are collecting comes out as a 2D array of DBL. There's no need to convert this to anything. You need to just flatten the array and send the flattened data out, just like the examples show. The "Simple Data Client" and "Simple Data Server" show how to do this for a 1D array. Same idea.
0 Kudos
Message 4 of 5
(2,818 Views)

Look at the functions Variant to Flattened String and Flattened String to Variant and Variant to Data in the Cluster/Variant palette. 

The information on the left hand side would be how you take the 2-D array out of the queue and flatten it so you can send it by TCP.  The right hand side is how to take the data from the other side from the TCP read and shape it back into the 2-D array.  But still pay attention to the TCP/IP examples as the whole process will still be a bit more complicated then just the data type conversions.

You may even want to consider using network shared variables for the communication.



Message Edited by Ravens Fan on 03-27-2008 03:22 PM
0 Kudos
Message 5 of 5
(2,816 Views)