I was little reluctant to post this question but then convinced myself that it will favor those who are looking for solution like me.
So,i have a rotary encoder from which i would like to know the ticks/count.The logic i used is subracting the current tick with the initial tick and checking that with a constant value.This being fed to a case structure,if the value obtained is greater then the tick/count is fed 0 otherwise i tried incrementing it by 1 though a shift register.Here is were i am facing problem,that value keeps incrementing --not sure if this is correct.
I must say this :
I don't have the FPGA and all the wires are broken
-You mentioned shift register and there is no initialization for shift registers. If that is the case please initialize with 0. Similar for feedback nodes.
-If you do not initialize the shift register, the loop uses the value written to the shift register when the loop last executed or, if the loop has never executed, the default value for the data type.
Edit: I did Ctrl+U and it cleared up a little bit and tracked the tick/count and i see that you are checking if it is equal to zero and then using select am i right? which contradicts your first comparing the tick count subtracted and checked with constant value!
-If that is not the case please create sample vi and try the logic first and let us know where you are stuck instead of integrating bunch of things in single vi and trying to debug.
With a single VI taking more than one screen, with many (many!) wires going all over the place, no sense of sequential order. I suggest re-thinking and restructuring your code, perhaps around a State Machine, and "hiding the details" in sub-VIs so that you (and we) can "see the Forest for the Trees".
I thought about state machine but DAQ must happen continuously while other loops must also run in parallel,thus coined this method.
This is called Producer/Consumer, and is well-enough developed that there are even LabVIEW Templates for this! Open LabVIEW, go to File, New ... (the dots are important), look under VI/From Template/Frameworks/Design Patterns and choose Producer/Consumer Design Pattern (Data). You can also Create Project and look at Continuous Measurement and Logging (there are two of them) in the Sample Projects. There's a lot of stuff there, but you can tailor this to fit your needs. It might merit a day of study, however ...