11-11-2011 02:15 AM
Hello,
This is small doubt but I would like clarify it here.
I have a subVI and I am using it in my main VI. subVI is written with state machines and have different states upto 6. In one of the state, I have a comparison function which need value a value at one terminal for comparison. These value is constant and I would like change always. Currently, I am passing these values to subVI from my main VI. By the way, I not using any shift registers to pass rather just solid square tunnel. The subVI is continuous switches its states when it is running. My doubt is, the value which I send from main VI is still be exist at the comparison terminal in subVI or better to use shift registers. I have 6 situations same like this.
More, Using DAQ Assistant is really banned in application due to bad results. May be, NI uses them for to show customers about easy programming. I have a finite acquisition in for loop for 12 times. As long I did not get any problem with DAQ Assistance. But I had a problem when it is in Continuous mode(especially when run my code Highlighted mode). I changed it to finite now. Is it OK to keep to write it as like this for a 10 year usable application or better write with DAQmx functions.
Thank you folks.
Solved! Go to Solution.
11-11-2011 03:00 AM
Show us some code instead of confusing descriptions. your posts is very unclear.
11-11-2011 03:15 AM
Here you can see my files.
11-11-2011 03:31 AM
You are missing quite a few subVIs so I cannot test.
Many of your sequence structures (e.g. the right one in the main VI) serve no purpose. There is quite a bit of data mismatch (e.g. U16 and U8 for the same data is some of yuor VIs).
What is the purpose of 1.vi and 2.vi? Where are they called?
You need to provide significantly more information, else we cannot help.
11-11-2011 03:44 AM
I have to wait until the 1VI run and I need to pass the output to 2Vi.
By the way, I don't think you will need all VI because my doubt is especially with DBL values which I have written in Case structure. Do they stay at one of the comparison terminal in 1 and 2 subVI's for a complete run? Or i need to use shift registers for that values throughout the all cases in subVI's.
Please help me.
11-11-2011 03:56 AM
@shjukheter wrote:
I have to wait until the 1VI run and I need to pass the output to 2Vi.
None of the VIs you have attached call 1.vi or 2.vi. If 2.vi requires an output of 1.VI, it will automatically wait until 1.vi has finished before it can start. This is a data dependency. No sequence needed.
Your DBL values will be read unchanged form the input tunnel of the while loop and then go to the unput tunnels of the case structure. The value of the tunnel will not change for the duration of the subVIs. You only need a shift register if one of the cases modifies the value and you want the modified value in subsequence iterations of the while loop.
11-11-2011 04:03 AM
Thank you so much.
SO, no need of shift registers. I am not changing those DBL values in subVI's. I just want to pass that values especially to one of the case in subVI's . Anyway, I will delete sequence structure now.