07-21-2017 06:30 AM
Hello,
We are getting started with compactRIO and labview, and are a bit confused in regards to timed loops with digital output.
We've reduced it to something simple (or so we thought) and are attempting to run this in the compactRIO:
The idea is to generate a square wave. This works fine with a period of '10', but with a period of '9' it seems to skip iterations. Here is the output on DIO0 on a scope:
As I understand, setting the period to '9' would mean the loop iterates every 9/1000 second (given the 1khz time source), giving a period to the waveform of 18/1000 second. However, the period of the waveform seems to never go below 200ms. In addition, once every 4 high peeks is prolonged with exactly one half-period.
Can someone enlighten us? We are probably making some very elementary mistake, but we've been unable to figure it out.
Thanks!
07-24-2017 06:39 AM
Hey,
So just to confirm, everything works fine at 10ms period, but once you reduce it to 9ms you get the problem?
What is the hardware that you are using?
07-24-2017 09:14 AM - edited 07-24-2017 09:16 AM
@AAlZibdeh wrote:
So just to confirm, everything works fine at 10ms period, but once you reduce it to 9ms you get the problem?
What is the hardware that you are using?
Not quite. With 10ms period, we see a square wave as expected but with 200ms period, not 20ms. With 9ms period, we get the scope screenshot posted above.
Our hardware is the NI cRIO-9035 chassis, the output module is the NI-9401 (the scope measurement was done with a 10x probe).
07-24-2017 09:48 AM - edited 07-24-2017 09:49 AM
.
07-24-2017 09:49 AM
It's interesting that you're seeing that despite both the cRIO and the DO is supposed to be able to have a much faster speed.
Could you try and benchmark the speed of the Timed Loop? You can use the Iteration Duration terminal of the loop. This way we could see what is causing the problem, whether it is your device or a software related issue.
07-28-2017 04:09 AM
Hi,
We'll have a look at the loop duration terminal. What I did myself earlier while debugging this issue, was to connect an indicator to the 'Finished Late' terminal to see if that triggered. I wired that in such a way that the indicator would light up whenever the 'Finished Late' terminal would become true, and stay lit up ever after.
Result: indicator never lit up, even when seeing the problem.
Thanks,
Koen