Using an array of references to Boolean controls as the input to a sub - VI edit propierties of orders...

Hello

I have a group of boxes and I want them to be exclusive one to change the objects visible to my vi when I change their State. So that my clear code, I decided to create a Subvi, which implements these features. My Subvi recives an array of references to objects that I want to change the visibility, an array of references to the boxes (to be change it's values to make them exclusive when one of the boxes change it is State) and an array of the values in the boxes in the last iteration (to be able to detect that we changed to true and false to others).

The problem I have is that when I use a node property to get the actual values in the boxes in the Subvi (to compare to their State previus and detect changes) I will get a type variant, and not a Boolean value. I tried to set the mechanical action of Boolean references used as input in the Subvi as switch, but it doesn't seem to work. I understand this is cause of the Sub - VI does not know the type of Boolean values that will receive and assume the worst case...

Is there a way to do what I want?

I hope I've explained myself... Thanks in advance!

There are several ways to deal with this, but it would be useful to see your code. Send the cluster in a VI, or those of the individual references boxes? It sounds like you are not using a strict reference. The workaround, since you know the type of data is to use the variant data and change the variant to a Boolean value, but this should not be necessary. Once again, some postal code so that we can be more help.

Edit: looks like you are trying to hard-code the Radio buttons. You know LabVIEW has Radio buttons now, no?

Tags: NI Software

Similar Questions

  • Can I use my android phone as a remote control for the air to my iPad

    I have an iPad Air, can I control remotely using my phone android mobile

    N °

    About the only thing you might be able to do is to get a basic application is which is about android and iOS, as a player (do they have an android app) and then you can use it to access the documents of these two devices (upload photos from your iPad and view them on your phone and vice versa, for example)

    but your phone and your iPad literally speak two different languages.

  • How to pin "Info button" Boolean values of the input data to acquire?

    I am a newbie to LabVIEW. I did this VI referring to this ARTICLE http://digital.ni.com/public.nsf/allkb/CA411647F224787B86256DD000669EFE
    I have problems with taking the values of these pines "Info"... As the functions of 32 buttons, 4 Directions, 8 info axis are wired to 3 Pins?...
    In fact, the goal of my project would be this...
    1 initialize the Joystick
    2. reading axis and Info button
    3 assign characters for each button (a Boolean value) and the axis (-32768 or 32767) as button 1 = Servo1, button 2 = Servo2, Y-Axis(-32768) = MF, Y - Axis (32767) = MB,
    X Axis(-32768) = ML, X-Axis (32767) = Mr... etc...
    4 send the characters to an Xbee Pro connected to the PC with a USB Dongle of Xbee.

    I know it's simple, but such things of convertion and the 'thing' entire component is really confusing... Kindly help me out to the point 3 & 4

    These are clusters.  You can simply use the Ungroup by name in order to leave the values of the components.

  • -Data 200141 was replaced before it can be read by the system. Mechanism of data transfer is interrupted, try to use DMA or USB in bulk. Otherwise, divide the input signal before taking the action.

    Hello

    Installation program:

    2 x PCI-6602

    Configuration:

    Sampling the five PWM signals of 50 kHz using five counters (2 on a map) and three on another for about 10-15 seconds by recording continuously.

    All meter tasks are configured for DMA transfer.

    Problem:

    I get 200141 errors from time to time.

    Question:

    I tried to increase the size of buffer and all tasks of meter are set to DMA. In the error message the last suggestion is to "divide the input signal before taking the action. I don't understand this suggestion. What is meant by "split the signal before taking the action?

    I am open to other solutions to the problem.

    /Mola

    Yes, I know that the 2 MB/s sound do not like much, but it's a way of high load very low tolerance to try to get 2 MB/s.  You have 5 DMA controllers to negotiate access to the bus and each transmits only 1 or 2 samples of 32-bit whenever he gets access.

    I've seen published baseline data where the maximum sustained rate was< 1="" million/sec="" (don't="" recall="" if="" it="" was="" mbytes="" or="" msamples). ="" as="" i="" recall,="" finite="" acquisition="" mode="" allowed="" higher="" rates="" for="" shorter="">

    Ah yes, here is a link that leads to the other links.  See the section on "The counter of the FIFO" in the first message.  Do you see a * very * significant difference in the performance of the M series for the series X-series.  Here are data for counters of the E series.  (It is fair to note that the comparative analysis was conducted with a much older PC hardware).  For the 6602 counter chip was designed between E- and M-series series, so you can probably expect performance in-between.

    Also note that the benchmarks seem to have been done with a task of window unique tent of owning all the bandwidth PCI as possible.  Since you would have 5 tasks they negotiate access, you lose definitely even more overhead.  In addition, for fair comparisons, your 50 kHz PWM would act as a measure of 100 kHz since you have 2 semiperiods to DAB per cycle of 50 kHz.

    Now that I've seen benchmarks once again, I am convinced that it is a no-go for you with just the 6602.  The good news is that the series X-series seem able to yet more ridiculously than I remembered.

    -Kevin P

  • control of the input string to the character to character upcase?

    Is there a property or method in chain control who can change the input character upcase character?

    Try the attached VI.

    Edit: Make sure that the update while typing of property is selected.

  • Get specific references for all controls

    Using slightly modified code from here, I'm generating a table of references of control on my main façade which is then transmitted to a number of subVIs. Although this feature does not work, it would be preferable to obtain specific references to controls (for example, Boolean RefNum instead of RefNum of control).

    Get these specific references seem possible using constants more specific class and the class specifier. However, the storage of data becomes a problem because I can use is more tables (because they are a different type of data). I don't know if there is another way to transmit these data. I experienced casting the RefNums in the variants, but to get the data of the variant, I need to know what type of RefNum I'm waiting order, of defeats the purpose of making it in the first place.

    A secondary problem is the names of references. The RefNums of control do not have names associated with them, and I do not know how to assign names to them. I tried again using variants and using the function name of the OpenG value data, but this block LabVIEW without indicating why.

    I have attached a version of my code that tries to assign names by using the name of the OpenG value data and build an array of variant. To run it, simple addition the VI as a Subvi has VI that has some Boolean controls on the front panel. My apologies for the crude State of the code - I'm still trying to find how to run things are a bit messy.

    I don't know if you're going to get much better.  There is really no way I know to have a completely flexible way to the building called cluster of references based on any set of given façade, Subscribe to this.

    I tend to do things the manual way (as there are also a bunch of references to elements of façade, that I wouldn't need).  I would like to do all the work for the grouping in a Subvi.

    I am attaching a zip file that contains the key to VI (unless I missed something) on the first project where I really tried to resume on the reference building.  The files are LV9.

    My main VI, I have the Sub - VI soon called to build the interface user of VI references during an initialization phase.  I pass the reference to the main VI in this sub - VI that generates all the references.  I worked on it as a master cluster that contains items that are arrays of references to related controls.  It uses an other sub - VI, called get references and names of labels that I created to help find witnesses.  I still need to use more specific class to get the property references, but I put only once at the beginning.  I then move this thread to cluster out and anywhere in my VI which should have access to references of the façade elements.

    I use arrays of strings to supply the names, I need to build and group references.  This allows me to ignore the controls, I don't care.  The drawbacks to my system, is that if I change the name of a command, I need to update the name in the Subvi.  And if I want to add all controls, not only do I need to add the label to search functions names, I also need to update my cluster typedef (and you absolutely want it is a typedef) to add a place to store the new reference.

    I hope that gives you some ideas.  It worked for me and I will probably use the scheme on another project (or even rewrite other projects using this diagram.)  If there are ideas of improvements, I'd be happy to hear.

  • ENUM Boolean control

    You know how you can click inside the box of an ENUM, or use the scroll arrows to have the list of choices of the ENUM pop up? How can I do this using a different Boolean controls on the front panel. My client wants the user to click on a big blue arrow to the right of the ENUM and have the ENUM menu pop up so that the user can scroll down and take the article they want to activate the box structure. Or else I would be able to change the appearance of the up and down scroll arrows to look like the image that the client wants for the user labelled. Thank you!

    Switching on the arrows of Labview for my own big blue works well for scrolling. Thank you so much.

    With the help of one of my blue arrows to get the pop-up menu sounds a little more involved than I thought it would have to know the coordinates of the box of ENUM, but I'll try it if the customer is not happy to have just the blue arrows to scroll through the options menu ENUM. Thanks again.

  • Confusing Boolean control

    Basically, a Boolean control gives a result: true or false. So, what's the difference between 'Cancel' and 'stop', the two Boolean controls in the palette of the façade?

    Mysteriously, I saw "off" in other programs. Where is he? It is equal to cancel or stop?

    Any answer will appreciated.

    Forget the glyphs.  Right-click on the block diagram glyph and uncheck the choice "display as icon".  This will show a smaller terminal without the label in the centre.  Boolean no matter what you choose, all terminals are the same.  This will avoid confusion.

    For this is to change the default action, click Tools - Options on the menu at the top bar.  In the window options, click the block category.  Uncheck the first box, Place Terminal façade in the form of icons.  Click OK.  Now when you create a control or indicator, the glyph will not be displayed, but will be the smallest terminal.

  • Sur-texte/insert in motion on a Boolean control

    Does anyone know how to move the text we or the text "off the coast of the State" value Boolean control to the lower-left corner of the control?  For example - if you resize the control on the Panel before you say 204 X 204 pixels and then try to move the text to any other location but Center.  I tried to "Justify" the text without success.  Thank you, John

    After releasing the text, you simply select it and drag it to a new location. It might be easier if you have disabled the auto-outil selection.

  • 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:

  • written boolean unique to the module of digital output or 9472

    I have a vi who writes in both modules of analog and digital, 9263 and 9472.

    I don't have a problem writing to the analog modules, but the modules digital (9472) gives me problems.  I want to write a single Boolean value, and he wants a Boolean array.  I was using the DAQ assistant, but dropped on it.  I'm probably not understand how to access the port correctly.

    I've included a partial copy of the code.  (LV crashed when I tried to create a snippet of the original code, so I had to copy it to a new vi.)

    You have not included the Subvi and if you want to generate a single Boolean value, it is absurd to use the Dig generate 1 D data and instance of DAQmx writing. Just use 1Line 1 point. Change the instance by clicking on the polymorphic selector under DAQmx writing. Select Digital > single channel > sample > Boolean. You can also use the DAQ Assistant by plugging in just a function table built between the Boolean command and the input of signals.

    You must also consider writing your code without globals.

  • Use an array of Boolean to jump to sections of code (extensible design).

    I currently have four pieces of code (which could turn into 5, 6 or more pieces in the coming months), I want to run or jump selectively according to an array of Boolean.  I have a cluster typedef of numbers, which are each refers to a port VISA number connected to a particular instrument.  This will be expanded in the future as the software is necessary to control the instruments more.  There is an array of Boolean (coming from the vi) attached which has a value of TRUE for each instrument that was detected (and therefore is connected).  In the case below, I want to initialize each instrument that is connected, but not try to do something for those who are not.

    The cluster and the Boolean chart is shown below:

    As someone who will need to expand in the future on this section of code, I want to write it in a way that will be infinitely extensible, without taking more space BD.  At the moment I find myself unable to do since I do not know how to pair the table of Boolean with the elements of the bunch, such that I can run or ignore the code accordingly.

    Help, please!

    -James

    Since you mention that you want to expand, I'd be more inclined to set a dashboard containing the port number, the type of instrument and the status of the instrument. When you search for your instruments you want to iterate over the array. You can use an ini file to determine which instruments must be present in the system. Others may be optional, and their associated actions could be ignored if necessary. However, the main point I'm trying to do is to combine your status with your instrument information table. This way, you eliminate the possibility of a mistake trying to keep and table and a synchronized cluster. A table makes it also much easier add or remove instruments from your system.

    A few other notes, if you check in a stop condition then stop. Don't simply continue the execution of each iteration of the loop with a business structure that will jump execution if the stop consifition is encountered. Simply stop. Imagine if you had 1000 items in your instrument cluster/table. Using your method always run you your loop 1000 times, even if the shutdown occurred during the first iteration. Eliminate duplication of code and logic twisted to combat it. You have two places incentive th euser, if they want to start or stop. You must have a place to make this code. Much easier to understand and maintain. Don't expand your code easily either because the hard-coded error strings. Your case statement will become very large if you generate your static error strings. Use a loop and a format common you build your missing channel of the instrument. If you use the table on the groups of instruments, I suggested that you will be able to format the string using the type of instrument. I'd be much more inclined to use a single notification utility that will be supported as well cancel and stop messages. It changes a lot better when you have additional message types rather than use a notification for each type of message.

  • How to select cases or an event using an array of Boolean 2D.

    Hello world

    I'm trying to use an array of Boolean 2D to select different events or case. For example, if the variable Boolean 1 and 2 are TRUE, case 1 will be selected. If the Boolean variable 1 is FALSE and 2 is true, case 2 will be selected and so on. I tried to use the Boolean to the number, but I need a way to differentiate between B1 = B2 = FALSE and B1 = B2 = TRUE, FALSE, TRUE. In other words, no two Boolean combinations can lead to the same case, seminar.

    ~ Mario

    You need to remodel your table 2D to 1 d first.

    Now, assuming that you have the items in table 64 less thant, "boolean array to the number" will give you a unique number for each possible combination of bit.

    M_Mario_M wrote:

    I tried to use the Boolean to the number, but I need a way to differentiate between B1 = B2 = FALSE and B1 = B2 = TRUE, FALSE, TRUE.

    As mentioned, each combination will give you a different value. You must simply ensure that you Add unique cases for each number. Add as many cases you want to structure your business. If you do not, several models of trigger default case-sensitive.

    If your problems persist, please contact your code.

  • How is it possible to change the 1 tab to Page 2 and page 3 page, etc. by using a Boolean control?

    Hi Sir,

    I created a 4-page tab control. How is it possible to change the 1 tab to Page 2 and page 3 page, etc. by using a Boolean control?

    Thank you vey much Mr. It worked

  • array element references confused me

    Then... I'm playing with references to arrays, specifically references to items in a table.

    It seems that I should be able to read the value of the table, but because of how I am tying TestStand and LabVIEW, I am trying to create a utility that automatically obtain data back between the LV and TS, where the types of data passed back are completely unknown and, possibly, paintings of beams that have tables nested clusters.

    I try to walk the LV data structure and reference TestStand and get the right data.  However, I can't seem to be able to use references to point to specific elements of a table - see example I expect the high and the low code works the same, but they do not.

    Any suggestions on what I do wrong to get the top and bottom to work the same?

    LV2011 attached code

    Ravens fan wrote:

    Property of the array element node gives you a reference to the element that makes up the table.  So if you set the properties of a digital control maybe to change the color or display format.

    Is not a way to get or set the value of a specific array element.  To set a particular array element, you must use replace table subset.  To get the value of a particular array element, you use table to index.

    Indexvalues property node is used to determine which is the first item that appears.  It changes the value of the indexer the upper left corner of the table.

    One thing I noticed that I don't know if I knew before, it was this setting the property value on the reference of array element, node will have an impact on the first element of visible table.  If you turn the highlight performance and play with array index, while it is running, you will see that the resulting table will be different.

    Although it IS possible, you can not do after seeing what it takes.

    We can get the value of an array element that is in a control or indicator provided it it the upper left display element.

    This nugget exploits that factand see how it can be done. Note: I have not tested this code lately so I don't know if NEITHER broke this behavior since the writing of this nugget.

    Ben

Maybe you are looking for