LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shift register or Solid square tunnel and DAQ assistance

Solved!
Go to solution

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 programmingSmiley Very Happy. 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.

0 Kudos
Message 1 of 7
(2,892 Views)

Show us some code instead of confusing descriptions. your posts is very unclear.

 

  • A comparison operation needs values on both terminals.
  • Values cannot be constant and changing at the same time. It is one or the other. Where does the value come from?
  • Shift registers are never used to pass data from the main VI to subVI. Shift registers are tied to loops but you don't mention any loops.
  • What do the tunnels do that you mention?
  • What makes the subVI change states continuously? Is that what you want or what you don't want?
  • If a value is passed from the main VI it continue to exist. I assume the subVI gets the value via a connector. What does this have to do with shift registers?
  • If you do continuous acquisitions and switch to execution highlighting, you most likely will overflow the buffers because the code runs way too slow.)
0 Kudos
Message 2 of 7
(2,888 Views)

Here you can see my files.

Download All
0 Kudos
Message 3 of 7
(2,884 Views)

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.

0 Kudos
Message 4 of 7
(2,877 Views)

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.

0 Kudos
Message 5 of 7
(2,869 Views)
Solution
Accepted by topic author shjukheter

@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.

Message 6 of 7
(2,866 Views)

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.

0 Kudos
Message 7 of 7
(2,862 Views)