06-30-2016 04:43 AM
Hello everyone
I have created a vi to generate 1PPS from the current time of the computer and transmit it to an Time Interval Counter (TIC) using a DAQ card. I need to calculate the delay occured in the whole processing of the vi, including generation of 1PPS signal, loop and DAQ card delay. How can I calculate this delay. Kindly help me.
I have attached the vi for generating 1PPS signal.
Thanks
rchkrishna
06-30-2016 05:18 AM - edited 06-30-2016 05:18 AM
If you are just looking for the loop iteration time, use a Feedback Node to record the "previous" iteration's time and subtract from the current time.
06-30-2016 07:36 AM
I envy everyone who can understand the concept of the feedback node. It seems I have a mental block about it; as hard as I try to understand it, my brains just says, "Nope, not gonna happen," and just shuts down.
06-30-2016 09:29 AM
Relying on (Windows) software timing for hardware signals is in most cases not accurate. Why don't you simply create a 1 Hz signal hardware timed?
Norbert
06-30-2016 09:38 AM - edited 06-30-2016 09:39 AM
You can think of the feedback node as an in-place shift register, as in, a shift register where you don't have to wire all the way to the outer edge of the loop.
06-30-2016 10:22 AM
@billko wrote:I envy everyone who can understand the concept of the feedback node. It seems I have a mental block about it; as hard as I try to understand it, my brains just says, "Nope, not gonna happen," and just shuts down.
A feedback node is literally exactly the same thing as a shift register. The only difference is that the feedback node does not have to be bound to a loop. Being a CLD, I sure hope you understand shift registers.
06-30-2016 10:31 AM
@crossrulz wrote:
@billko wrote:...
A feedback node is literally exactly the same thing as a shift register. ...
Until you get to that initializer terminal and the difference between running in FPGA...
But can certainly not claim to know embeded as you do. (smiley-tips-hat)
Ben
06-30-2016 10:45 AM - edited 06-30-2016 12:39 PM
@rchkrishna wrote:How can I calculate this delay. Kindly help me.
Unfortunately, you cannot "calculate" that delay, because it depends on an infinite number of hardware and software parameters and will be different on every single computer. You actually need to measure it!
Tims's code is OK for measuring the loop time, the only thing I would do is wire the time also the the global feedback initializer. This way you get zero instead of a random very large number in the first iteration.
Some additional comments:
06-30-2016 05:37 PM
@crossrulz wrote:
@billko wrote:I envy everyone who can understand the concept of the feedback node. It seems I have a mental block about it; as hard as I try to understand it, my brains just says, "Nope, not gonna happen," and just shuts down.
A feedback node is literally exactly the same thing as a shift register. The only difference is that the feedback node does not have to be bound to a loop. Being a CLD, I sure hope you understand shift registers.
LOL actually I just figured it out. If you apply the rules of dataflow, it can only behave in a very predictable manner. Mystery solved for me. I have no idea why it took me so long to figure it out. Like I said, mental block.
07-01-2016 02:27 AM
@crossrulz wrote:
@billko wrote:I envy everyone who can understand the concept of the feedback node. It seems I have a mental block about it; as hard as I try to understand it, my brains just says, "Nope, not gonna happen," and just shuts down.
A feedback node is literally exactly the same thing as a shift register. The only difference is that the feedback node does not have to be bound to a loop. Being a CLD, I sure hope you understand shift registers.
Also, I thank you for your vote of confidence after all these years on the forum. I see I've made quite an impression on you. So I will just hang out in the background while you field all the "tough" questions.