Update a front panel indicator from a loop inside a called vi. Without exiting

I am looking for the best way to update some indicators from within loop within a called .vi.
I need to update the front panle without exiting the loop.
I am able to use functional global vi to update the values of front panel indicators from within my nested loops, but I am looking for the best way that these values can be read to update my indicators.
Thanks

Or a cluster of references, that way each reference can be named, and can be different types to match the respective indicator.
There are also methods where you can just send in a VI reference, and in the subVI traverse all the controls and search for the appropriate references by name.
Take a look at this long nugget.

Similar Messages

  • Maximum Character size of Front Panel indicator in LabVIEW

    Hi,
    I have a simple question that I hope somebody can answer.  Is there a maximum character size that can be displayed in a Front Panel indicator in LabVIEW?  If so, what is it?  I have a VI that is continuously reading a serial port and updating a front panel indicator, and I need to know how much text can be displayed before it either truncates or throws an error.  This is for LabVIEW 2010 SP1.
    Thank you,
    J Korn

    A quick Flatten to string shows how LabVIEW stores strings {size-data} Size is a U32 so 4294967295 characters max.
    The big thing to remember is this memory must be contiguous (and the Indicator requires a COPY) so in practice the performance hit for constantly allocating larger and larger buffers for the data and available memory impose practical limits much lower than the 4294967295 Char maximum.  Probably better to log the data to a file and maintain only the last x characters on the indicator and use the file to look a history data
    Jeff

  • How to change front panel indicator properties such as background color or enable/disable programmatically?

    Is it possible to change the properties of a front panel indicator such as background color or to change from enabled to disabled-grayed out programatically in response to limit conditions or a time-out?

    "Disabled" means that the control/indicator will not respond to a user operation. However, the displayed data can still change. What you want to do can be easily achieved using a case structure : wire your boolean to the case input, and put your indicator in the "True" case condition. That way, it will be updated only when the digital input is set to true.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Imitate boolean switch behavior using an event structure on a front panel indicator

    Hi,
    I am looking for a possibility to imitate the bevhavior of a boolean switch with an event structure. To be more precise, I want a boolean value to change each time I click on the front panel indicator and then remain constant until I click again. I have not worked with shift registers in a while loop yet, but could this be a way to find a solution?

    LordSnow wrote:
    Okay, I figured it out, BUT I still have a problem. Before I first trigger a mouse event on the front panel indicator, I already need the case structure to be executed once. Therefore I assume that I need some kind of default value, but since the event structure does not create any output at first, I have no idea how to do that.
    Are you talking about the shift register you just created?  You can while in a default value on the left shift register ndoe.  It is wired outside of the loop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Can I control front panel items from a sub VI?

    Hi all,
    After taking the Intermediate I class, I have been trying to follow the methods of using modular programming, but there's one thing I haven't quite figured out how to do. How can I change a front panel display from within a sub VI? I have a menu selection that I wish to change - can I simply input a reference to it or something like that?
    Thanks much,
    Jason

    All you need to do is to pass a control reference to the subvi, and then, in the subvi, to use a property node to modify whatever you want (well, almost...) on your control. Ask if you have more trouble and need an axample...
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Controlling front panel properties from within a statechart

    I have a user interface that I am trying to put into a statechart.  On the user interface I have a bunch of buttons (controls) and indicators.  To populate the indicators I am getting data back from 2 sources (USB and RS 232).  For this, I have made shared variables for the data returning from the sources but this only works for indicators as far as I can see.  Anyway, I have the software working and now that I am trying to go back and place the code into the statechart format to clean it up I am running into issues.  Since the statechart does not run inside the labview panel I can not access the front panel properties of controls.  Basically, I am using the statechart to control which buttons are active on the front panel (this is dependent on the state the user is in).  Also I am using the states to control a LabVIEW “tab control” to determine which tab to display.  For instance, I have an operate screen and a calibrate screen.  Depending on which state the operator is in, different controls are active (I don’t want the user to accidently change an item on the operate screen while in calibrate).  Is there a way to do this inside the statechart structure?  

    You don't actually copy the reference itself. Rather, you want to add a control of the same type as the reference to your statechart Inputs.ctl. You can get such a control by right clicking on the reference you created and choosing "create control".
    Then you pass in the reference to your specific control into the statechart via the inputs terminal. You can then talk to this reference via VI server and manipulate the original control. 
    If this isn't clear probably the best thing to do is to look in the LV help index for the keyword "control references" and read about "passing to subVIs". Passing a reference to a subVI is very much like passing one to a statechart so most of this is relevant.
    Hope that helps.

  • Centering Label Text over front Panel Indicator

    How can I get the Text in the Label of a Front Panel LED Indicator Control in LabVIEW 2009 to be centered over the LED?
    How can I change the Font an Font Size of the Text of a Label?

    Hi,
    Label to be center at the object.
    There are many Ways like
    1) what the JackDunaway has explained  Text Settings Toolbar button.
    2) Other you can dynamically change the property of label.
    Like you can change programmically change label justification, size, color, and many property.
    Just right click on object.Go to creat property node. refer screen shot for more help.
    Thank you.
    CLAD
    Labiew programmer
    Attachments:
    Lebel property.png ‏133 KB
    Lebel property.png ‏133 KB
    Lebel property.png ‏133 KB

  • Reading front panel of a VI that runs as a thread without using globals

    Hi Labviewans,
    I have a main VI that runs another VI as a thread. I would like to read some data on the thread-VI's front panel from the main VI without using global variables. The traditional way could be by writing the thread-VI's data to globals and then read by the main VI.
    Is there anyway not using globals to solve this matter??
    many thanks.

    Well if you mean not using the traditional globals yes. You can write the values to a vi containing an uninitialized shift register, also known as a LV2 style global, you can create control references for the controls of interest and then use them, with property nodes to read the values, you can write the values into a queue to be read elsewhere in your program. Globals, while not usually considered the optimal answer, are also not forbidden. They just should be used carefully. If you are only writting to the global from within the sub-vi, then the big concern of race conditions, etc., are not an issue. Initialize them to a desired state early in your program (before the sub-vi is launched) and then only write to them from the one location.
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Can a CIN that is in an infinite loop send data to labview without exiting?

    I have a C program that continuously queries a motor controller.  Right now that program is in a labview vi as a CIN.  The problem is that the CIN must exit before reporting the controller response to the labview vi.  This means I have to constantly run the CIN which opens, queries and closes the connection each time.  Is it possible to run the loop in the CIN itself so that the response buffer from the controller can be sent to the labview vi without exiting.  Are there variables types that can be passed from the CIN before completing the CIN? 

    The controller is a Galil DMC4080 motor controller.  I am running Labview under Mandrake Linux.  I can connect and send commands to the controller using a C program.  I modified the C program as a CIN to pass the controller response to the Labview front panel.  Galil has a library of functions used for the controller commands.  LStrPrintf is the command I use to write the data to labview.  Currently I just run this CIN without a while loop and loop it in labview but I recieve an  error message  after  a 1000 executions, see: http://forums.ni.com/ni/board/message?board.id=170&message.id=270220
    If interested here is the current code I am using with the infinite loop. 
    #include "extcode.h"
    #include "dmclnx.h"
    #include "hosttype.h"
    MgErr CINProperties(int32 prop, void *data);
    MgErr CINRun(LStrHandle IPAddress, LStrHandle Command, LStrHandle Response,
            float64 *ErrorCode);
    MgErr CINProperties(int32 prop, void *data)
        switch (prop) {
            case kCINIsReentrant:
                *(Bool32 *)data = TRUE;
                return noErr;
        return mgNotSupported;
    MgErr CINRun(LStrHandle IPAddress, LStrHandle Command, LStrHandle Response,
            float64 *ErrorCode)
       float          rc = 0;          /* Return code */
       char           buffer[32] = ""; /* Response from controller */
       char           ip[20]=""; /* IP address of controller*/
       char           cmd[20]=""; /* Command to send to controller*/
       HANDLEDMC      hdmc = -1;       /* Handle to controller */
       CONTROLLERINFO controllerinfo;  /* Controller information structure */
       memset(&controllerinfo, '\0', sizeof(controllerinfo));
       controllerinfo.cbSize = sizeof(controllerinfo);
       controllerinfo.usModelID = MODEL_2100;
       controllerinfo.fControllerType = ControllerTypeEthernet;
       controllerinfo.ulTimeout = 1000;
       controllerinfo.ulDelay = 5;
       SPrintf(ip,"%H",IPAddress);
       strcpy(controllerinfo.hardwareinfo.socketinfo.szIPAddress, ip);
       controllerinfo.hardwareinfo.socketinfo.fProtocol = EthernetProtocolTCP;
       DMCInitLibrary();
       /* Open the connection */
       rc = DMCOpen(&controllerinfo, &hdmc);
       if (rc)
           *ErrorCode = rc;
           return noErr;
          while (1)
              SPrintf(cmd,"%H",Command);
              rc = DMCCommand(hdmc, cmd, buffer, sizeof(buffer));
              if (rc)
                  *ErrorCode = rc;
                  return noErr;
                  break;
              else
                  LStrPrintf(Response,buffer);
       rc = DMCClose(hdmc);
       if (rc)
          *ErrorCode = rc;
          return noErr;
       *ErrorCode = rc;
       return noErr;

  • Is it possible to display in a front panel indicator the units name (for instance, N "Newtons" or ºC) from a virtual channel that you previously defined using MAX?

    If possible, how can I do it?
    Thanks in advance With LabVIEW 6 it is clear that we can display the DAQ channel name of previously defined virtual channels, so it seems to be possible that we would be able to access to other information defined in MAX as channel units name...
    Thanks

    Yes it is possible.
    Locate the LLB:
    LV folder\vi.lib\daq\dqchnutl.llb
    There you find useful vis to handle virtual channel.
    The Get DAQ ChannelNames.vi return also the channel units

  • Cannot create a VI equivalent of a boolean front panel indicator/​switch directly connected (subscribi​ng) to a datasocket

    I am attempting to create a boolean output from a simple boolean datasocket source the VI's is attempting to subscribe too. But for some reason it does not seem to be able to determine the boolean value from the data received. This VI was designed from the standard example DS Reader with Attributes.vi. Although I have tried many other approaches and can't get it to work. I'm not sure if i'm handling the datatype correctly. I'm pretty new to Labview too!
    Attachments:
    DS_Boolean_Reader.vi ‏37 KB

    I finally worked it out myself! Silly me...I just had to put the indicator inside the loop so it was constantly updated I guess! The learning curve can be steep for this no structured text language. I'm still not convinced it is faster than coding the old way. :-)
    Attachments:
    DS_Boolean_Reader.vi ‏37 KB

  • How to change font type of front panel indicator

    Hello,
    I want to change numeric indicator font type to LED style. I've got the font. But, how can I change the font type of Indicator independently, i.e. not by changing application font type. I've checked the Property Node available are only color, size, justification, but type.
    Yoppy.
    Solved!
    Go to Solution.

    Go
    LED >Mouse right-click> Create >>> Property Node >>> Label >>> Font >>> Name
    then (or)
    Numeric >Mouse right-click> Create >>> Property Node >>> Numeric Text >>> Font >>> Name
    Regards.

  • Pick up specific indices from for loop

    hi guys , 
    i have a for loop with N = 60 , i'm trying to make something when the index (i) reachs specific number , the indecies i'm interested in are
    1 ,5 , 9,13, 17, 22, 26, ,30,34,38,43,47,51,55,59
    the difference is 4 in some of them but it changes to 5 @ 22 and 43 and come back to 4 in between .
    can anybody help me pick up these indecies ?
    Solved!
    Go to Solution.

    Why would you need a mathematical formula?
    What is a "boolean variable"? In the context of LabVIEW, you need to explain in more detains what you mean )
    I would just do something similar to the following (The second loop will iterate 60 times):
    Note that the parts on the left will be folded into a single boolean array constant at compile time, so there is no overhead during execution.
    (You can also do it all in a single loop. try it. )
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    IrregularSelection.png ‏16 KB

  • Quit from while loop inside a vi that run a while loop

    Hello,
    this is just an example
    i have a led that blink inside a subvi and i what to stop it form the ui of the user (MainHelp.vi)
    but because the subvihelp.vi dont know the stop button it will not stop when i klick on the stop button
    How i can work it out with out using global Var
    thanks for your replay.
    Attachments:
    MainHelp.vi ‏9 KB
    SubVIHelp.vi ‏9 KB

    Hi
    Here is one method to stop a blinking VI in a SubVI.  I tried not to change your version of how the blinking works.  Since the subVI is running continuously this example calls the VI using static reference and using the control names.  You could also use a queue to pass values to the subVI controls.
    Your original VI has a lot of stuff that made no sense, so I cleaned them all out or up, so to speak.
    Good Luck.
    Mark Ramsdale
    Attachments:
    MainHelp.vi ‏12 KB
    SubVIHelp.vi ‏9 KB

  • Controlling Front Panel LEDs

    This is hopefully a simple problem, but I can't figure out what to search under.  I have a program with two loops (Z Only Test and Full Test in Tester Program v2).  They do not run at the same time.  I would like both loops to interact with an LED on the front panel (Testing).  How is this done?
    Under Z Only Test, it works fine.  I tried to connect it to the sequence (Full Test), but it tells me I can't do that.  On odd sequences, for the most part, I would like to have the LED light (TRUE).  On evens, off.
    Attachments:
    code.zip ‏143 KB

    rbergs wrote:
    Do you mean make the LED a shared variable?  How do you do that?  I clicked on it and changed it to a variable, but I thought that was like one of the others that I have.  I'll give it a try and see what happens.
    I would assume whatever works for this would also work for numerical displays as well.
    No.  I'm not even sure exactly what you mean by clicked on the LED "and changed it to a variable."
    Right now you have only a single place where you use that LED.  It has a terminal node on your block diagram within a while loop.  I don't know how that fits into your overall program architecture as your VI is quite expansive.  (Two tips, 1.  Don't use stacked sequences.  2.  Look into a state machine architecture)
    All that happens at that point is your read from a shared variable called "Testing".  I'm not sure from where else in your VI that you want to interact with that front panel indicator.  Or whether it will conflict with the already written piece of code.   I also don't know where this shared variable is written to. But the first idea is have the other sections of the code write to the shared variable and let this one update the front panel indicator.
    The second idea is to create a local variable of the front panel indicator.  Right click on the terminal within your code and select Create / Local Variable.  But again, you will have to be careful with conflicts with the different portions of your code writing to the LED.  This is also known as a "race condition".
    (Yes you can use either shared variables to store numeric data, or create local variables of numeric controls or indicators.)
    I'm a bit nervous about your code.  It looks like you have a decent amount of LV experience as you have created quite a sophisticated VI there.  However, it doesn't seem like it is easy to expand or modify.  It takes up quite a bit of screen real estate.  It doesn't use any subVI's even though a lot of the code seems to be duplicated or very similar.  And it seems like it uses a lot of shared variables, probably more than necessary.
    Message Edited by Ravens Fan on 05-29-2009 01:38 PM

Maybe you are looking for

  • How to stop stuttering themes?

    The other day I was working on a project and noticed that some themes (Memories for example) were randomly stuttering while being played in the edit mode (Motion button activated). Everything is fine when I create a disc image or burn a DVD. I've not

  • INTEGER changed to NUMBER(22,0) when table is created in 9i release 2 !!!

    Dears, I have made DB schema for Oracle 9i release 2 on Solaris 5.9, and I was using INTEGER datatype when creating primary key, plz c the following sample script: create table SYSTEM_PARAMETERS ( ID INTEGER not null, NAME VARCHAR2(50) not null, cons

  • OracleOraDb10g_home1iSQL*Plus service is not starting..

    Hi, I am getting error while starting "OracleOraDb10g_home1iSQL*Plus" service. and my oracle is not stating. When i am trying to connect to oracle it is giving me following error C:\Documents and Settings\patelpa>sqlplus Error 6 initializing SQL*Plus

  • Sort a 'std::list' containing classes/structures

    Hi all, I find that std::sort' cannot be used to sort 'std::list' because it requires a random access iterator which is not available for a list. Although that works for dqueue without any problem. Is any body know about any workaround for std::list

  • Getting report data into crm

    Hello guru's I have a requirment like when i execute bw report that report data should be called to crm. 1.Please tell me which functional module to be used or suggest me any procedure. 2.Tell me how to populate the report data into a table.And can w