LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two subsequent acquisitions - 2nd doesn't run

Solved!
Go to solution

Hello,

 

Here are key features of my setup:

  1. Two generations/acquisition channels
  2. Each channel has generation part (low-varying staircase) and acquisition part (output is short-circuited to input)
  3. When output value reaches a threshold, staircase stops and last voltage remains at output
  4. The behavior of two channles are identical, only difference - the value of a threshold voltage
  5. And finally the most important feature - 2nd channel must run once 1st channel stops

The VI is organized as follows:

  1. External FOR loop that must run 2 times - it starts with 1st channel and then should run with 2nd channel
  2. The FOR loop variable 'i' controls:
    • "source" and "sink" for running channel
    • threshold choice
    • local variable (that stops staicase) choice
    • indicator for running channel

The problem is: 2nd iteration of the external FOR loop doesn't run.

 

Where I've been mistaken ?

 

Thanks in advance

 

Pavel

 

 

0 Kudos
Message 1 of 5
(2,692 Views)

Can you convert your code for LV2014?

0 Kudos
Message 2 of 5
(2,685 Views)
0 Kudos
Message 3 of 5
(2,677 Views)
Solution
Accepted by topic author Pavel_47

Hi Pavel,

 

when the 2nd iteration of the outer FOR loop doesn't start it means the 1st iteration isn't finished yet. THINK DATAFLOW!

 

Did you check that behaviour using Highlight execution debugging? Where is your FOR loop stuck?

 

Edit: Now I see where your 1st iteration gets stucked - even without running the code!

Please check ALL stop conditions of your inner loops: one of them will never stop in the 1st iteration of your outer loop!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,667 Views)

Yes !!! The Best !

Of course, there was a staff (red-encircled) from my previous concept, that I forgot to remove.

Thanks a lot.

Pavel.

P.S. The only question before close this topic - is my VI concept is optimal for realizing the goal setup (decribed in my 1st message), or there are more optimal solutions ?

 

BAD case

Acq loop BAD.JPG

 

GOOD case

Acq loop GOOD.JPG

0 Kudos
Message 5 of 5
(2,653 Views)