LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Synchronisation between the devices

Hello all,

   I had a problem with the data synchronisation.First of all let me explain my application.I am acquiring the data through tcp/ip from two devices using my labview application running in some other computer.From device1 i am acquring the data continuosly and from device 2 i am acquiring only at some time.

When i acquire the data i found that the data which is acquired from device2 is not in sync with the data from device 1.That means i have a data synchronisation problem.Can anyone please tell me how can i do the synchronisation of data?hh

 

 

Thanks and regards

srikrishna.J

Regards,
Srikrishna


0 Kudos
Message 1 of 14
(3,380 Views)

It's not clear to me what your situation is.

 

 I am acquiring the data through tcp/ip from two devices using my labview application running in some other computer.From device1 i am acquring the data continuosly and from device 2 i am acquiring only at some time.

 

By "only at some time" do you mean "only sometimes" ( not all the time, not continuously)?

 

 

If so, then you could consider:

 

  • Transmitting BOTH devices all the time and only RECORDING data from device #2 when it's appropriate, or
  • Attaching a timestamp to the data when the data comes into LabVIEW.  If you have one computer receiving from both devices then a common clock could be used to stamp each data item, then the ultimate user could search for matching timestamps among the two streams.

 

 

 If that doesn't help, ask again with some more details, please.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 14
(3,368 Views)
hi CoastalMaineBird,
 
       Thanks for your reply.Yes Bird, you are right as i am sending the data from the device2 sometimes only,and that too i am sending only value between 0-255 and data from the device1 is  continuos data.Both devices are sending the data to computer through wifi.Now i want to do such that data from device2 exactly synchronises with the data from device1 when i am acquring the data to the computer using labview application.
     Can u suggest some solution in detail?
 
regards,
srikrishnaNF
Regards,
Srikrishna


0 Kudos
Message 3 of 14
(3,349 Views)

What difficulty are you having?

 

If you have both channels coming in via WiFi, then you have the data already there at the LabVIEW computer, correct? 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 14
(3,338 Views)

Hi Bird,

   Ofcourse i am acquiring the data correctly but the data from both the devices must be synchronised in time,say for example if device2 generates the data at time "to" then at the computer i should get the data synchronised in such a way that data from device1 generated at time "to" along with data from device2 generated at time "to",there should not be even a 1 second time difference between data from device1 and data from device2...

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 5 of 14
(3,334 Views)

Please explain the difficulty you are having.

 

Does device 1 store the data, or does it transmit it's latest reading all the time?

 

Does device 2 store the data, or does it transmit it's latest reading all the time?

 

 

Is there a problem with taking the latest reading of each device and calling that simultaneous? 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 14
(3,330 Views)

hi bird,

  Actually device1 sends the latest reading all the time and device2 as well sends the latest data....from device1 everytime,so 80 bytes of data is sent from device2 only 1byte of data is being sent and data from device2 acts as some trigger for my labview application..

 

 

Thanks and regards,

srikrishna.J

Regards,
Srikrishna


0 Kudos
Message 7 of 14
(3,326 Views)

device2 as well sends the latest data....from device1

 

Well, I don't understand that.

 

If you have two loops, one listening to device 1 and the other listening to device 2, then  each loop has the latest data from each device.

 

Is there a problem with that? 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 14
(3,322 Views)

Hi bird, 

 

     This is the scenario of my application.Device1 is sending the data continuosly and device2 sending data sometimes only.Labview Application is for visualising and storing the data from both the devices.The problem is in the visualising the data.Suppose Device2 had generated a trigger value at time 'to' .

Then my labview application should display the data from device1 generated at time 'to' along with the data from the device2 generated at time 'to'.So the

data from device1 and device2 should be synchronised,i think there should be a handshake between these two devices..

 

regards,

srikrishnaNF

   

    diagram.jpg

Regards,
Srikrishna


0 Kudos
Message 9 of 14
(3,306 Views)

But.... if your app receives data continuously from device 1, then any time it receives a trigger from device 2, the latest from device 1 ->IS<- the data that matches the trigger, is it not?

 

If your data looks like this:

 

Dev 1      Dev 2

 6

 7

 8

 10

 14

 16

 18           Trig

 17

 15

 13

 10

  7 

  5

 

 

... then the latest Dev 1 value at TRIG time is 18.  Isn't that what you want?

 

If not, I'm missing something. 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 10 of 14
(3,296 Views)