From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform graph problem

Solved!
Go to solution

i forget to say and also i need to know how to design it for multiple graph at least i need to print it for set of graph at same time in same folder like a screen shot

0 Kudos
Message 51 of 95
(949 Views)

Hi dinesh,

 

you can also read an image of the frontpanel using a similar method node of the front panel!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 52 of 95
(947 Views)

Hi butcher,

        Thanks first of all i have almost finished my FP diagram with your help thanks again .Now i need to learn how can i pass the values from main vi to the sub vi and the values i applied should updated automatically.

Thanks in advance

Dineshmeena

 

0 Kudos
Message 53 of 95
(940 Views)

Edit: Actually, GerdW didn't say what I discuss below in this thread. None-the-less, I believe it is an important idea, and probably the cause of your problem. I'll check now.

 

Ok - let me try to explain the interaction between subVI and calling VI in the terms that GerdW has mentioned a couple of times - this is a very important (vital!) idea in LabVIEW.

 

When he talks about Dataflow, what he means is that a given block on the block diagram (BD) cannot start running until all of the input wires have a value and those values reach the block. SubVIs are blocks, in this context. Just like the Add function needs to know which two numbers to add before it can take an action, the subVI needs to know all of its inputs before it can start running.

 

When a wire reaches the subVI, its value is fixed. This is the same for all wires. This means that, for example, you can't place a subVI with a While loop and wire a terminal to the stop condition to the connector pane, then connect the terminal in the main VI. The value on the wire will be False when the subVI starts, and that value will never change (even if you click the switch in the main VI).

 

A common way to get around this is to use references. This is an alternative to the dataflow paradigm - now the fixed value is the reference. You can use this reference with for example a Property Node to update values, visibility, read stop conditions and so on, even though the reference has a fixed value - the control it refers to can undergo changes.

 

It's incredibly important that you understand this concept - the idea of the inputs to a VI being fixed when it starts running. Often, the simplest solution is to avoid placing things that make a VI take a long time to run inside subVIs. In the example of a loop, it will be simpler to have the While loop in the main VI, and then have the subVI carry out a part of the calculation (with no loop). Then the subVI will finish quickly, the loop will finish the iteration, and then the next iteration will start. The subVI will again run quickly, this time with new/updated values. By running the iterations without long delays, the main VI can remain responsive to change. 


GCentral
0 Kudos
Message 54 of 95
(934 Views)

Hi butcher,

   I will explain you clearly, in the past you created channel selection program it was very useful for me, in that instead using it in a main vi itself i need to put that control in a seperate vi,instead of that in a main vi i just put boolean control or anything naming 'channel selecion window setting' when i just press the button the seperate window will appear for the channel selection and the user can update the values and apply it then the same will displayed in a graph. Here i have attached a same vi you just sent me with changes with subvi,so that you can understand what i was proposing and also i need to change the x and y scale label in a graph with same control, i just did using enum ringtxt.txt property node connected with  x and y scale name label property node it works fine but with this type of method how can i do that?. I need visualised ideas to learn quickly

Thanks in advance,

Dineshmeena

Download All
0 Kudos
Message 55 of 95
(919 Views)

I'm uploading 2013 versions of the modified pair of VIs. Please take some time to understand both the ideas and potential problems. The SubVI should be called exactly like that - as a subVI. To have it called asynchronously, you will need to learn about the Start Asynchronous VI and Wait on Asynchronous Call nodes. Some documentation is available here.

 

If you're happy stopping the acquisition whilst you change the channels, you can use the code as it is. If, however, you need it to be run asynchronously, then you should read that link and understand the ideas there. You can use the code I placed in the Diagram Disable Structure (DDS) as an example starting point. The loop is separate, and you should delete the event structure in the main loop and go back to a Wait (ms) function if you do.

 

The DDS enclosed code uses a notifier to send the updated values - you could consider placing a Wait on Notification with a 0 timeout in the main loop, and then wiring the Timeout? output to a case structure which controls what to do with the data - either replace the array in the shift register, or do not.

 

You'll also need to look into stopping parallel While loops - there are many forum posts/threads which run into this issue and several solutions.


GCentral
Download All
0 Kudos
Message 56 of 95
(915 Views)

hi butcher,

       i have cleared the doubts and one more thing is, here i need to control electro hydraulic valve to give a load to the beam,the max load capacity is 200kN and ouput signal is 10v, now i need to give a force at the rate of kN/sec electrically in mV/V simultaneously the valve should work on that here i was having a button control to start the loading and stop the loading and reset the loading values this should work after i enter a values in the control, can you give some ideas in this?

0 Kudos
Message 57 of 95
(899 Views)

hi butcher,

   is that possible to have a default configuration to fix for the plots to display like when the vi is running the values should automatically should display in a graph for certain fixed channel like channel 1 vs channel 2 is should be fixed and automatically should display when vi is running then user can select which plot they want instead of that could you do that exactly what i want?

0 Kudos
Message 58 of 95
(887 Views)

Upload your latest VI and I'll suggest how you could best implement defaults. It might be as simple as choosing the values and wiring them to the outside left side of a shift register.


GCentral
0 Kudos
Message 59 of 95
(883 Views)

Hi butcher,

  Actually i need to show 2 graphs one with ch1 vs ch2 and another with ch2 vs ch1 it should show by default but at also at the same time we can change channel whenever we want that's the window i need to implement it here, so i  have some idea instead of using the array, we can seperatly use enum control  for each and every graph then we put it in seperate vi to extract the changes in the values like that previous one you sent me and also i need to change the axis label name with respect to changes in the channel name i will make it but as i am a fresher it will take sometime to implement it, so that's why i was asking some ideas to you.

0 Kudos
Message 60 of 95
(878 Views)