Executing two line simultaneously
HI,
Not sure if this is possible at all, and I don't think this is limited to Igor but maybe generally not allowed,
but is there a way to execute two commands at exactly the same time (or as close as possible)?
I am operating three digitizers, while they are listening to the same trigger through a star trigger to reduce the delay among them,
they were still armed sequentially in Igor one after another. The execution time between them is rather small, but then I have seen cases where the trigger comes after arming the first but before the second digitizer, or between second and third.
This happens occasionally such that like 10 in 1000 triggers the capture will give erroneous results, though they are executed exactly one after another.
Could I multithread them into three simultaneous execution?
They are C functions called through XOP.
What kind of digitizers are you using? Who wrote the XOP? Is there a hardware method to arm the digitizers?
October 1, 2018 at 01:33 pm - Permalink
In reply to What kind of digitizers areā¦ by johnweeks
Thanks for the reply, actually I just solved the problem by doing something smarter (was silly).
We wrote the XOP ourselves and it calls some C library provided by Aeroflex to do the arming.
The configuration works like this:
A AFG generates square waves of say 100 Hz acting as a trigger signal. This is connected to a star trigger module (NI PXI-6651). Then internally the trigger was routed to the three digitizers. Originally, I armed the digitizers (Aeroflex PXI 303x) one after another, DG1-->DG2-->DG3. The problem was that as the trigger was sent to the star trigger randomly, there are occasions that it arrives while the digitizers are being armed, such that maybe DG1 is armed, but DG2 and DG3 are not yet.
Then, I realized that the star trigger does have a soft trigger option. So now I just arm the digitizers squentially, but then after all arming statements are executed, I send the software trigger. This makes sure the trigger won't arrive at a point where some digitizers weren't armed.
October 1, 2018 at 03:12 pm - Permalink