LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview run example

Sorry, I don't have LV 8 at hand just now. I'm attaching a picture to show you what I mean.
This is pretty LabVIEW basics; if I can speak frankly, it's not very good you don't understand it. I suggest you to spend some (more) time to learn LV basics (or your boss to let you do it!).


Message Edited by pincpanter on 07-13-2007 11:36 AM

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 11 of 31
(1,265 Views)


@Melikyan wrote:
Dear Altenbach I have a question. If program run, after 1st cycle I cannot input the time delay, and then continue 2nd cycle, please recomend what way have to input time delay...
I need only 1 time delay between the first cycle and second cycle.

FIrst of all, there is no "time delay" between any cycles in your code. Your FOR loop with the progress bar runs in parallel with the measurement code at each iteration of the loop. If you want the wait loop to execute either before of after the DAQ part in each iteration of the FOR loop, you need to enforce some execution order using dataflow.
As Pincpanter mentioned, just place the delay statements (e.g. your FOR loop) it inside a case structure and wire it directly to [i]. Make one case 0, and the other "default".
Message 12 of 31
(1,252 Views)

Dear Altenbach, Mikeporter and Paolo thanks a lot...Now my next step is put 2 controls (1st fixed frequency, 2nd S11)...But:

After 1cycle measure and show the graph. If given fixed frequency (1st control), the corresponding S11 bigger than 2nd control (S11) go 2nd cycle....

If given fixed frequency(1st control), the corresponding S11 lower than 2nd control (S11) wait infinite (program no stop), but after I push 1 Bulean(Need new bulean) continue 2nd cycle...

Once more time thanky you very much, your help is very very useful for me...

Sincerely

Harutyun Melikyan.

 

0 Kudos
Message 13 of 31
(1,229 Views)

Dear Altenbach, please look the atached Vi. I add controls, now need only to put one bulean, if push the bulean the condition change.

Now condition like this: If Indicated S11 less than Control S11, 2-nd cycle go...If Indicated S11 bigger than Control S11, 2-nd cycle wait many time....

I want to put the Bulean, and during the process(after 1st cycle waiting...) if I push, continue the 2-nd cycle ...(same as If push the Bulean < condition change to >).

Thank you....

0 Kudos
Message 14 of 31
(1,209 Views)
Dear Altenbach I make the Vi (atached ...MOD4)...Work right.  But in this configuration I cannot push the Bulean during process.
Please let me know, how can I push the bulean during the process...
 
Thanks again...
Melikyan.
0 Kudos
Message 15 of 31
(1,208 Views)
Do you mean, how can you abort the acquisition process in the middle, that may require modifying the way your subVIs work, and certainly getting rid of that single monolithic wait at the end. Is this instrument a serial device?

Mike...

Message Edited by mikeporter on 07-14-2007 08:44 AM


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 16 of 31
(1,202 Views)
OK, there are still serious flaws all around. I assume that your initial wait should happen after "Run!" is pressed, but before the DAQ and progress bar will start running. Right now this all happens in parallel, so the initial wait has no functional significance. Right? Right! 😄 You need to create an artificial data dependency to enforce execution order via dataflow.
 
Since we already have a while loop on the outside, we can recruit it to repeat the DAQ. No extra FOR loop necessary.
 
In addition to the "Run!" button, also assign a timeout to the event structure. Initially, set it to infinite (-1) so only the "Run!" button can trigger, but then set the timout to either infinite or zero, depending on if you want to repeat the event case once more without user intervention. If the case does not repeat, you simply need to press "Run!" once more for the second run. No need for secondary buttons and complicated instructions. 😉
 
It is much better to utilize timeouts for long waits, because they can be interrupted at any time. A long wait on the diagram will block everything else.
 
Right now it is setup to wait indefinitely after each second iteration ([i]=odd), but you can easily modify that too.
 
Also note that I removed unneeded duplicates such as your "1000000000" diagram constant that occurred 3x where once is plenty.
Just take this as a draft. I cannot test without your hardware, so there are probably bugs. 😉
Message 17 of 31
(1,189 Views)

Dear Altenbach thank you very much....You help me everytime. Thank you for your kindness.

I have no Labview 8.2.1. Can you attach the Vi for 8.0 version.

Thanks.

Melikyan!

 

0 Kudos
Message 18 of 31
(1,180 Views)


@Melikyan wrote:
I have no Labview 8.2.1. Can you attach the Vi for 8.0 version.
OK.
Message 19 of 31
(1,171 Views)

Dear Altenbach Thank you very much. Only i change Time delay part, because I need Time delay after progress. Another all fine. You made the best way.

Now the problem is the Register clean. After measurement or after 2 progress need to clean register or update the controls...

Because after measurement I change the control and Push the run again, but don't work correct, I think register not cleaned after progress.

If after every measurement push Stop change controls and run again, the program work correct, but if don't stop work no correct.

What I can do?

0 Kudos
Message 20 of 31
(1,157 Views)