How much faster is an XOP in an input/ouput loop?
rayray
This is a follow up on an earlier post
http://www.igorexchange.com/node/2748#comment-1
regarding a PID loop to read data, operate on it, and output a change as quickly as possible.
I'm considering delving into the world of XOP writing. My question is, roughly how much faster would an XOP do a read/write loop than a function? I'm getting around 700 Hz just using a Do-while loop in a function. Would an XOP be only a few times faster, or more like orders of magnitude faster? Thanks.
I would also say that 700 Hz is pretty good for a user-defined function!
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 24, 2013 at 04:17 pm - Permalink
October 24, 2013 at 08:04 pm - Permalink
1) Read analog error signal
2) Perform standard proportional-integral gain math
3) Ouput a digital word OR analog voltage of the new value
There is a DAC chip in the AFM controller which I can send a digital word to and avoid analog transmission noise issues, but if sending Analog out is faster, then I can go that route with the aid of a buffer. My 700Hz loop I have now is rapidly acquiring the data into an FIFO and each iteration of the Do-while loop pulls out the latest point with FIFO2wave, then does the above operations. It works well, but I need the loop to run much faster to permit faster scan speeds. Hence the XOP thoughts, although my experience with writing such things is lacking so I want to get an idea if my returns on speed will be worth the effort.
October 25, 2013 at 01:32 pm - Permalink
I hate to say it, but Labview has PID control modules. Expensive, but if you're an indifferent C/C++ programmer, your time will also be expensive.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 28, 2013 at 09:37 am - Permalink
October 29, 2013 at 07:37 am - Permalink
How would you interface from the XOP with the NI device?
Doing callbacks to Igor might not be the fastest solution.
October 30, 2013 at 06:15 am - Permalink
The best way would be to run a thread with the PID loop, using NI-DAQmx C/C++ calls to implement it. Of course, threading is an advanced technique...
That would leave Igor's main thread available to execute controlling functions.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 30, 2013 at 08:55 am - Permalink