Update the controls on the front panel producer consumer

Hello

I wanted to ask you a few tips.

Usually, when I implemented a consumer producer I use producer to create items from queue whose state of the enum and pack all the necessary data in the process of the event in a Variant.

Then the consumer does all the work.

There are two areas where I feel that I could not be using the best approaches...

(1) when I need to update a control on front panel I Pack a reference to this control on front panel in the variant in order to access the property nodes in the consumer and to update.

I have attached photos with an example. It's simplified code where the user must perform a task of data acquisition in the analysis of certain parameters. The code increases the setting of a fixed amount to each race to help the user in its sweep.

Is there a best way to do this?

(2) when events require the same control to be plugged into the variant for the handling of the loop of consumer I create local variables or references to this control to other events. Would it be better to have a registry change that crosses the loop producer which gets updated values of façade at each time the loop iteration?

Thank you.

Because you use a loop of events such as the producer, I would use user events to update your controls.  This way you are not circulate references just to set/update a control.  You can make a user event and handle this event with the structure of your event.  Your client sends just the event with all the necessary data.  I found this configuration really useful since it retains all the GUI code centralized in a single loop.

Tags: NI Software

Similar Questions

  • Outsourcing of the controls on the front panel for a panel floating Subvi

    Hello!

    I already found a few similar topics, but I still don't know which is the best way to solve my problem. I will try to describe my problem in detail first: I have a main VI that acquires data from a device and displays these data in a large waveform graph. I have also a few controls on the front panel to control my device. First, I placed all of these device controls (digital, sliders, etc.) as well as the chart inside the front of my main VI. However, due to limited screen space now I would like to make the largest possible graph and so decided to "outsource" some controls out of the main façade of VI to several panels front-end Subvi.

    I would then press a button in my main VI and it would open the Panel before the floating of the Sub - VI corresponding with outsourced controls when required. However, everything must be absolutely transparent. It is important that floating panels to run in parallel with my main VI, that is the main VI must continue to operate. That way I'll have my data constantly updated in the chart in my main VI while I can change some settings of the device through the controls placed in my SubVIs. These changes will be immediately applied (for example as soon as the main VI calls this slot - VI in its main loop).

    It is important to the visibility of the outsourced optional control panel, i.e. If the Subvi front panel opens with the user that it will pop up and the user will be able to change the paramers device using the. But then the user should be able to close the front panel (hide) the Subvi to see the entire chart again without the Panel floating in front of her (of course control values must be maintained when the Subvi front is not visible). Then the new button is pressed in the main VI that opens the dialog box not modal Subvi containing controls and it can redefine new values of device.

    Advice how to do this are welcome. I don't know if I need something complex like VI server or asynchronous screws or I can solve my problem by changing some settings simple Subvi? Thank you in advance for your help!

    Best regards

    Anguel

    AStankov wrote:

    How about using a global variable for the VI at VI communication instead of a queue?

    A global variable will, also.  Write you in one place and read the value frequently to somewhere else (in the election). So you can see easily to any value change.  However, mark will waste a lot of time processor.  This is why I have proposed to use a queue or a notification utility.

    AStankov wrote:

    Would be the last option that you mentioned, i.e. finish the Subvi at each change of value, I would keep the Subvi front open as needed until things from the user to hide? Or would there be inevitable flickering Panel or any other drawbacks?

    Yes, the Subvi can keep the façade open until the user closes. And there should be no flickering.  The biggest drawback I see right now is that when you expect an event in the Subvi, the mainVI cannot stop without talking to the Subvi to stop.  So you'll need another channel of communication (again a global, a queue, a declarant or an event) to tell the Subvi that she must stop.

  • A way to group controls and indicators on the Front Panel and that they can be made Visible or not as a group?

    I would like to combine several orders and LEDs on the front panel in a group in a way that allows me to do the whole group Visible or not.

    I tried to use a Cluster, but it has a side effect that all elements must be inside the controls or indicators, but not mixed.

    Is there any graphic element, like a panel that can contain other controls and indicators on the inside and make them Visible or not as a group regardless of whether they are commands or the LEDs?

    Good suggestions on how to do this?

    Thank you.

    The tab control is still not my favorite, appearance but it's a way fast and effective to show and hide groups of controls and indicators.

  • How to make non-visible control on the Front Panel appear at Design time?

    I have a few controls on the front whose visibility is changed (on or off) at run time. The problem is that if I stop the Run time, the visibility of the control remains in the running in design mode state. So I am not able to see or find the control to make changes in design mode.

    How can I make all the visible front-panel controls, or find and make it visible to a control on the front whose visibility has False?

    Thank you.

    It is documented in the help of LabVIEW.

    Hidden front panel display


    Perform the following steps to display a hidden front control or indicator. You can also hide the indicators and controls on the front panel.

    1. Find the terminal block schema for the object. "If you have multiple devices with the same type of data, right click on the terminals and select visible elements" Label in the context menu. Find the object with the label that corresponds to the object hidden façade.

    2. Right-click in the Terminal, and then select Show Control context menu if the object is a control or indicator to show if the object is an indicator.

    You can also use the Visible property to display the controls and indicators by program.

    You can also view all hidden front panel controls and indicators.

    Path: Fundamentals-> build the façade-> how-to--> configure the objects-> display on front panel of the façade hidden object.

  • Using the 'current default values do' as a control on the front panel

    Hello

    I'm building a VI that uses a lot of digital controls. I want to use "do current default values" as a control Boolean on the front panel for the user.

    Is it possible to implement when the program is running? What would be an alternative, if this was not possible?

    Thank you

    Mhaque


  • Best way to reset all controls on the front panel except one?

    Hello world

    I have an interesting problem, whereby I need to run successive tests using a test station which has several indicators on the front panel. At the end of each test, I need to reset all to default values, with the exception of a control (Test ID) who needs to keep his information - its value is used in an initialization status for test to ask for information from a database, so it can not be reset with the rest controls.

    I post all orders at a time using a reference ThisVI and VI Default Vals.Reinit All method, but this will obviously reset my control values (Test ID) as well. Any suggestions on how to keep properly or may store this information control while resetting all others. I can reset individually others but there is a little and more can be added as this system is developed.

    I don't really know what is the right way to proceed, and Labview has maybe one trick in his bag that I know to work around this problem.

    Thanks in advance for your suggestions,

    Alex

    Flank the node invoke with two nodes in the value property of the control to maintain the value. To the left we read as well as a right and the wires together. Connect three nodes with a thread of error to establish the order of execution.

    First reading place value on the wire, which is then written after the values have been reset to the default value.

  • Disabling the controls on the front panel

    Hello

    Currently, I am working on trying to disable/gray out between 10-20 controls on the front panel when you press a start button and then allowing them the end of the test. Currently I use the property nodes, all of which are connected to a constant of the State in which I want that works perfectly. My question is that there is another way other than having a bunch of knots of padding property to the top of my structure of the event. Ive read where people had Subvi, which has used references to make this same feature, but is there a way of doing things in the block diagram of my current VI? Thank you!

    Need references of your controls on the front panel, so this can be fast, because you can select more than one, and with a right click you create references.

    I have attached a version LV2010.

    Edit: another review:

    Must be created only once these references. Usually, it's comfortable group all the references in a cluster, use this thread through your entire code. This way you can just ungroup references to the actual location, you have to play with, put them in a table and use the above FOR loop to change their properties...

    Like this:

  • Controls on the front panel does not work

    In the attached vi (I've stripped down to simplify things), I have a problem with the controls on the front panel does not when you click on the control to acquire it. It of probably something obvious but got me to loss.

    Thank you

    It is probably because you are in the State to acquire until you're done absorbing.  Meanwhile, none of your other events can run.  You have events to acquire: let the mouse.  There is a setting for "Panel before locking up the end of the occurrence of the event.  Given that the event cannot process until your State acquisition is completed, the façade will be locked.

    I would recommend another loop for the acquisition of your data.

  • missing controls on the front panel

    Hello

    I'm getting a GUI and I'm having a problem with the front panel, I saw miss some controls:

    See the attachments, please.


  • Binding the controls on the front panel programmatically

    It seems that Programmatic binding the controls on the front panel do not work when they are located in a tab control.

    Is this a known problem in LV 8.6?

    If the control of the façade is already bound to a URL of PSP you can link to another URL using DataSocket URL property during execution of the VI.

    If the front panel control is not bound to a URL of PSP, then you cannot attach it to the URL of the PSP when the VI is on. You can use the method AttachDataSocket of VI to change the link while the original VI is stopped (in edit mode).

  • pause button on the front panel

    Hello.

    I try to run synchronous, continuous analog conversion of 2 cards of PXI-6259, and capture the State of the several digital at the same time.  I managed to get everything is configured and working properly, however I have a problem if the user presses the button "pause" on the front panel.

    From what I can tell, acquisitions of data will continue to run in the background (I'm using a task DAQmx and stop was never called).  For my analog inputs, this is not a problem.  However, the digital inputs always generate a ' 200010 - on-board memory overflow error. Due to the limitations of system and/or the bandwidth of the bus, the driver could not read data the device enough fast to follow the flow of the unit. »

    Is it possible to register for an event of user interface that is generated when the user presses the button "pause", so that I can stop the acquisitoin of data before the error occurs?

    Thanks in advance,

    -Rich

    NormPgh wrote:

    I thought to add my own button "pause" / control, but my users have become accustomed to hitting the pause on the front panel button, and it will be difficult to get them to change.  I guess that the error would remind them :-)

    Well, that's easy to fix - change the appearance of window properties if the toolbar is not visible, while the code runs, and there will be a pause button for your users to click.

    Many of our applications have a function somewhat like this.  My colleague implementation in a very simple way: he put the graphical indicator within a box structure.  Connect a Boolean control "pause" to the structure of the case, and that's it.  Data acquisition runs constantly but will only update the chart when the pause button is false.  This approach might work for you?

  • Conflict of flow of data on the front panel

    Hello

    My vi is almost done, but I still have a problem with the front panel. I think that there is data traffic conflicts in my vi.

    When you run my vi, you will see the pop-up window asking you to set a path of file, control devices, selection of data to record and trace. Then, you might want to change the units, turn off all the buttons light and ok to select what data you want to save. Then click on RUN.

    The problem is; supposedly all the buttons are on by default, if you disable certain economies or tracing buttons to choose not to save, and then click RUN, after that all the buttons are again even if you have turned off before the race. They must stay off, if you have selected to save. The condition of main data flow is always the same be before running (only light buttons and ok).

    Do you have ideas of how to solve this problem?

    Thanks in advance

    You have what is called a race condition that usually slips in programs that use local variables.  If you look at your first while loop to read in the current value of the 'steam data hand' control and store in a shift register.  After the structure of the event outputs you write this offset value to register in the control and in the process of replacement of the changes that the user can do.

    A quick and dirty solution would be to manage the main event to change the value for 'Stream' in the structure of your event to update the shift register whenever the user changes the values in the control.

    A better solution would be to get rid of the shift registers and move local variables in the structure of the event.  As long as the option "lock the front until the end of the event" (I'm not sure of the exact wording and I work in the LabVIEW Base at the moment so I can't check) is selected it will ensure that you do not work in a race condition (you know the value cannot change inbetween you value reading, and you update the control).

    Even better would be to avoid local variables wherever possible.  This is general advice only and not not something that I can do much more tangible without knowing the details of how you want your application to behave.

    Hope this helps,

    Simon

  • Can I programmatically change the default property to create for all elements of the front panel?

    Can I programmatically change the default property to create for all elements of the front panel?

    I need to make the logout button, when click on, takes care of all the default values of my fron Panel.

    There is no way to programmatically call the functionality of an editor 'Use default' or 'Load Default'. To do it yourself, you will need to write your default values for each control explicitly in the diagram, when the user press the logout button.

  • How to add a record button on the front panel to save waveform data

    Hi, I'm new kind of LabVIEW and I worked on a code for an agilent oscilloscope communicate via GPIB and so far it works well on the collection of these two analog channels one by one, "Not UNLIMITED" but it does the trick (vpp, Vrms, frequency, etc.).  I've added the feature to add data to a .csv file waveform (problem: opens a dialog box until the user gathers all the data.) Solution: I want the user to save the. File CSV whenever he wants to use later on the front panel). I've added another feature to get a snapshot of the curve waveform (problem: opens a dialog box.) Solution: I want the user to save the JPEG file, whenever he wants to take a snapshot ("take snapshot" button on the front panel)).  I work with the agilent hp54645d driver. I have attached my code, if someone can tell me please how do I do this (maybe cabling and structures are solutions do not know). Thank you in advance.

    I would recommend adding a case structure just around the two record VI and a button to check the condition of the structure of each case. If you want a button to control both save functions you can put the two record functions in the same structure of business controlled by a single button. You are right in saying that the loop will cause your code runs until the stop button is pressed or until the stop condition is met. If you are wanting the while loop to stop once the recorded information you can use the button that you use to control structures case to also stop the while loop. I hope this information helps.

  • How to scroll through the front panel when running

    Hello

    I'm using LabVIEW 8.5. I want to scroll the front panel automatically according to the moving object. I enclose a vi for example, in which I move the image, but if it is out of range of screen I have to scroll manually horizontal scroll bar to see the position of the image, it is possible that it automatically scrolls according to my position of the object.

    -Thanks in advance

    Hi, Mary,

    Well, now I see what you wanted. From my point of view using front panel scrolling for this animation is wrong way (if not I do not know your final objectives).

    I would recommend that you use the image for this control. Here the work by hand a little more, but you will get better results and will not scroll to your façade.

    For example, "quick and dirty" implemented:

    Andrey.

Maybe you are looking for

  • installation of thunderbird e-mail

    Is this possible on a phone windows 8.1? If I open or save it says unsupported file type. I hate windows. Linux needs to create a phone that comes standard with a Linux OS like Ubuntu. I will go back to android if I just for applications open source

  • Why will not identify check plugin that adobe Acrobat is current?

    Whenever I open a Firefox window, I get a tab plugin check telling me that my Adobe Acrobat is obsolete. I installed the new version three times now. I even downloaded the installation of the page ftp from Adobe, rather than the page that check plugi

  • Adding an SSD for my H50-50?

    I just buy the desktop: 50-50 and that you want to add a 250GB 2.5 SSD ". I want to configure so that the SSD 2.5 "has the OS on it and all the rest will be on the regular reader of 3.5". I noticed that there is no additional cables within the comput

  • Microscope and C++ runtime R6025 error dll

    I work with a microscope that came with its own SDK.  The kit allows the user to write code in C++ or Visual Basic, and to control the microscope through the compiled application.  I work with LabView 8.2.  I generated a set of C-convention dynamic l

  • Front open under VI in a tab-> Possible?

    Well, the question is basically in the subject: is it possible to call sub VI and display their façade in a tab. I do NOT want to have the façade in a new window when it is called.