01-25-2011 02:29 AM
Hello,
I am not sure how Timed-Loop is triggered when source is not the Windows 1ms "clock" but hardware interrupt from a DAQ board. I am looking into using at least [1ms] trigger and hopefully down to [1us] - is this achievable WITHOUT LATENCIES in XP? I need to acquire single sample from an LVDT, LC (load cell) and possible a SG (strain gauge), process it, and fire a sample (rudimentary control loop) to position a 150 ton piston via an appropriate servo-valve... If (hopefully) there is no latency (near zero) for the iteration start and processing takes not-determined time afterwards, is there a way to make the relative delta-t for the signal generation sample inside the iteration a constant so signal generation is also equidistant...?
Thanks in advance,
01-25-2011 02:40 AM
hello golubovski,
even if you use external hardware clock with timed loop, I don't believe you will be able to achieve timing at us. I remember some time ago when we were trying it, you can get couple of kHz rates. But keep in mind that this rate is not guaranteed - you are still on Windows, which means on non-deterministic system. In order to improve determinism of Windows, you can turn off most of the processes and services running. But even after that, you should be aware that your system will still not be deterministic, and I don't believe you can achieve latencies in us range.
regards,
Stefo
01-25-2011 02:46 AM
Damn, I was afraid of that... 🙂
OK, what would be an aceptable strategy for my control setup. What dynamics I do not have to worry about?
01-25-2011 12:35 PM
hm, i'm not sure what you asked now 😞
in fact, if you want to really have guarantee that your code will be executed withing specified time limits, then you should move to real time platform. You can still use the approach with time loops as you described earlier. But if you need to achieve closed loop control with us rates, then propably you could consider FPGA, but it depends on what you need to do.
01-26-2011 10:37 AM
It's possible I'm off base, but it sure sounds like you may be overspecifying your needs here. I find it pretty tough to believe a 150-ton piston would have any sensitivity to microsecond-level latency. Even millisecond-level for that matter --that's one HUGE mechanical low-pass filter. So first be sure you understand what kind of control update rate you really need. For the sake of discussion, let's start by supposing it's as high as 50 hz.
I suspect you could run a buffered acquisition and execute your loop nominally every 20 msec driven by the number of samples you request. This method also provides you more data to feed into your control algorithm (allowing for smoothing, weighting, etc.). You would probably still use single-point AO updates to avoid further latencies.
There are both software-timed and hardware-timed single point options available for AO, but outside an RT system, I'm not sure the hardware-timed version would offer any real benefit.
-Kevin P
01-27-2011 03:00 AM
Kevin,
Thank you for the prompt response. You are riht, I am using LV only for prototyping, at the end an ARM will take care of the business. I doubt control loop would exceed 30Hz, however I have no idea how a 150-ton piston would perform regarding its mass inertion, nor I have idea about the control loop I have to place inside the timed-loop. I am just gathering precious info I may need when I start building the setup. I have no problem using buffered synchronized AIO, but I wanted to explore the method that is likely to be implemented in the embedded controler (sample by sample) and I would like to see how this method of timed non-buffered AIO would handle "static" test frame.
Regards,