Jump to content
  • 0

Sync Multiple DAQ


Ricky Ooi

Question

Hi,

I have 2 scenario below, please help to advice in term of hardware and software to achieve it.

1. If have 2 USB1808 and 2 QUAD08, how should I sync the data collection? 

2. If I have only 2 QUAD08, how should I sync the data collection?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hello,

To sync two USB-QUAD08 devices, you must have an external clock source because the USB-QUAD08 does not have an output clock. You could use a timer output from one of them to clock both. The USB-1808 can output the scan clock. You can use one as the master that outputs a sync clock for the others. It's not a trivial matter. The clock wires should use twisted pair shielded wire, and the length must be short. This type of application calls for a custom program you must create. The devices don't communicate with each other they only share a clock. Use the EXTCLOCK scan option for the non-master units and program them before the master. 

Best regards,
John

Link to comment
Share on other sites

  • 0

Hi @JRys,

Thank for the clear explanation. From this input, I have one doubt.

If I had 2 QUAD08 and 2 USB1808 which the following sequence:
1. USB1808 (Master)
2. USB1808 (Slave)
3. QUAD08 (Slave)
4. QUAD08 (Slave)

Assuming now I am using the same number of channels for all devices above (e.g. 8 channels). I begin the scan starting from the last device (no. 4) till the first device (no. 1). If I am calling the transfer_status to get the current index, will all devices having the same index (as illustrated in Scenario 1 below)?

Scenario 1:-
1. USB1808 (Master) - 48
2. USB1808 (Slave) - 48
3. QUAD08 (Slave) - 48
4. QUAD08 (Slave) - 48

OR it might be have the following scenario below?

Scenario 2:-
1. USB1808 (Master) - 48
2. USB1808 (Slave) - 48
3. QUAD08 (Slave) - 50
4. QUAD08 (Slave) - 50

Scenario 3:-
1. USB1808 (Master) - 48
2. USB1808 (Slave) - 48
3. QUAD08 (Slave) - 46
4. QUAD08 (Slave) - 45

Link to comment
Share on other sites

  • 0

Hello,

Because they share a common sync clock, all devices should have the same status. To be sure, you could call GetStatus on each device, but in practice, pick a slave device to determine the amount of data. If it's a continuous acquisition, monitor the current index and when the buffer is more than half full, read the lower half. When the current index rolls over to point to the lower portion, read the upper half. Ping-pong between reading each half of the buffer. This method works really well even for high sample rates. I like to make my buffer big enough to hold one second of data. You might need to go bigger because you have to service four devices. The USB-1808 packet size is 128. The buffer must be a multiple of the packet size times channel count times a number that will make it big enough to hold one second of data. The USB-QUAD08 doesn't have a packet size, so use the 128.

Best regards,

John

Link to comment
Share on other sites

  • 0

Packet size is the amount of data transferred from the device to the driver and into the buffer. Some devices have fixed packet sizes, and if you fail to make the buffer a multiple of it, you could end up with channel data changing position in the buffer. The same holds true if the buffer isn't a multiple of the channel count. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...