Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Synchronizing scan loops


fhor Jul 29, 2013 12:42 AM

Hi All,

I am trying to synchronize measuring loops (scans) in three CR3000 loggers. The loggers run in pipeline mode because timing of the measurements is important. The scan loops contain two VoltDiff measurement instructions and some processing instructions. The VoltDiff instructions read 14 inputs in multi-channel burst mode.

I thought of using WaitDigTrig() on the slave units and a PulsePort or a pair of PortSet instructions at the master.

The CR Basic Program Reference states "... This results in the PortSet instruction always occurring directly after the measurement instruction preceding it in the program ..." but I want the PortSet instruction to be at the very top of the Scan loop, so there is no preceding measurement instruction in the current scan, only in the previous scan. Does this mean that the pulse will be synchronized to the end of the previous scan? If so, how can I issue a pulse on Port 8 synchronized with the beginning of the scan loop?


Any help is appreciated.
Frank


GTProdMgr Jul 31, 2013 08:44 PM

You can put a GPS receiver on each CR3000 and use the GPS instruction in the CRBasic program to have each logger's clock synched to the satellites (and hence with each other).
At that point the scans should all kick off at the same time.
(within something like 10 microseconds of each other)

You could also check out the PakBusClock instruction. I think that will give you millisecond, not microsecond synchronization, but that may be good enough for you depending on your scan interval.


fhor Aug 1, 2013 03:51 AM

Thank you for your reply.

Using a GPS receiver just for the sync task does not fit in the budget of our application.

I will experiment with the PakBusClock instruction but I fear that we will have missed scans. Our scan rate is 10 Hz and it is desirable to have a sync accuracy of some milliseconds. I thought there would be a way to issue pulses that are in sync with the master logger's main scan.


Thank you,
Frank


aps Aug 1, 2013 12:12 PM

I think you should find the Portset and Waitdigtrigger instructions will do what you want as shown in the program example in the CRBasic editor, where the portset is the first thing in the scan.

I would agree the help is a little confusing. What it is trying to say is that the portset instruction cannot be called conditionally in a program that is running in pipeline mode as it is sequenced in advance to happen at a precise time.

With Pakbus clock there will be some jitter, perhaps of 10 ms or more (depending on the comms link). There is also a risk of skippping storage of data if the clock of a logger gets put forward when it is due to store data. This may be difficult to avoid if the program stores data every scan.


fhor Aug 1, 2013 05:51 PM

Hi Andrew,

Thank you for your clear answer. If it is only the wording of the help text, your explanation clears up my concerns. I will experiment with the scan loop and see on the scope how accurate (and jitter free) the timing is. I will post a short message here after my test.


Thank you,
Frank


m125 Aug 7, 2013 11:09 AM

Hey Guys according to that topic well i think that GPS receiver is the best option.Thanks!!


S-Type Beams

* Last updated by: m125 on 8/20/2013 @ 8:36 AM *

Log in or register to post/reply in the forum.