LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

front panel

Hi Melikyan,

you should stay with my programming using 'states' (IMHO!).
See the comments in the block diagram.

Try to separate your dataflow into a producer/consumer pattern. In the producer loop you can handle the events, in the consumer you do the DAQ part. This will help you to better manage your code.

Or use an action engine with some states (like: 'first run', '2nd run', 'init' and 'reset'). Use subvis for the DAQ part...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 31 of 38
(1,693 Views)

Dear GerdW thank you very much. Now program work like this: Go first run, show "put the finger", then go 2nd run show the result of 1st run. Why? Please explain me...I need your help. I want if go first run after show ''Put the finger", then go 2nd run and show the result of 2nd run.

And if it is possible, After 1 measurement (2 run), if I push run, can indicator write "Ready", after every 2 progress when I push next run?

I mean show "Ready", after 1st progress show "Put the finger", after 2nd progress show the result, then I push run and show "Ready" and etc.

Thanks a lot. You help me every time. Excuse me, but your another change don't work. May be I cannot understand well what you change...I attach the Vi.

One more time thanks a lot.

Best regards

Harutyun Melikyan!

0 Kudos
Message 32 of 38
(1,672 Views)
Hi Melikyan,

it's really easier to use a kind of state machine for your purpose! Read other forum threads about this!
You cannot rely on the the iteration count when it is changed in other events too...
And you have some clearly defined states in your program:
state 1) before 1st run: show "READY"
state 2) 1st run: do measurement, show "Finger", decide which way to go (to next state or back to start)
state 3) 2nd run: do measurement, show result

Again I changed your vi to show how to do this.
It's not a real state machine right now, only some case structures using the state that is kept in the shift register.

Message Edited by GerdW on 08-01-2007 09:26 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 33 of 38
(1,661 Views)

Dear forum members. I have one question.

On my Vi block diagram, how can I solve this problem:

If Stacked sequence structure number 1 condition satisfied go 2nd sequence, if not satisfied everytime check the condition(check from device), when will satisfy go 2nd sequence.

Can you help me?

Please...I attach the Vi.

0 Kudos
Message 34 of 38
(1,629 Views)
Hi Melikyan,

first: try to avoid sequence structures - and use flat ones when you really need a structure... (Use sequence locals to wire VISA resource name and error cluster from one frame to the next!)

There are 2 options for your question:
- wait until condition is met: put a while loop around the code in frame 1 and run the while loop as long as the condition is not met (and maybe include an error check as well as a "Break" button for the user)
- don't execute frame 2&3 when condition is not met: split your sequence into 2 parts (frame 0&1 and frame 2&3), put a case structure around the 2nd part

And remember: you can do all this without using sequence structure - all you need is the error cluster to assure a proper execution order Smiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 35 of 38
(1,618 Views)
Hi Melikyan,

attached a slightly reworked vi Smiley Wink
Using a subvi for the DAQ part could greatly clean up your code, as it seems you do the same kind of DAQ 3 times...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 36 of 38
(1,611 Views)
Hi,
  I am  a newbie  here and my problem may seem really trivial but i wanted to know how to make my XY graph merge with the front panel ( dont know exactly what to call this) . I mean that i want the axis and the plot to be seen but not the rest of the background of the graph like in the acquire-analyse-present.vi from the find examples option. Please help me with this problem . Thanks
0 Kudos
Message 37 of 38
(1,582 Views)

Select the coloring tool from the Tools palette, right click the graph background and select the transparent color (upper right corner).

This is really quite basic and you should not hijack threads. To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
0 Kudos
Message 38 of 38
(1,569 Views)