Boolean control for integer value

I am writing wrapper VIs for a DLL, and demo programs to, well, demonstrate their use
I have several functions which take the same structure as an input.  This structure has several integer fields (U16, if you must know) which are logically booleans (that is, only valid values are 0 and1, and in fact at some level they are converted into a single bit each).
My VIs currently work, using a cluster that is laid out exactly like the structure.  However, I would like the interface to be prettier and easier to use.
What I want to do is to show each of these fields as a pushbutton.  However, if I change them to pushbuttons, the cluster's internal representation is now different and I can not pass it into the DLL function.
The only solution I have thought of is to have an input cluster with pushbuttons, then unbundle the whole thing, convert all the bools to ints, and then rebundle.  This is very cumbersome.
Is there any way to have an integer field appear as a pushbutton (or other boolean-style) control, while remaining represented as an integer?  Or any other createive ideas?
Thank you.
B.

Smercurio,
Thank you.  I don't even know what an XControl is! 
I was thinking of using unbundle by name -- but at least half of my cluster is this kind of field, so it will get a bit messy anyway.  Also, if I am taking apart one type of cluster and building a different one, with different types, is it actually possible to only unbundle part of it?  I haven't tried it, but somehow it doesn't make sense in my mind.
The menu ring is an interesting idea and sounds like it might be a reasonable solution, though pushbuttons are nicer; I'll have to play around with it and see how it looks.
Mark,
In general, I agree with you about separating the UI and the implementation, and that is how I generally write applications.  You are 100% right that it is the correct approach to engineering an application.
The difference here is that my applications are really just demos of the library we create, and thus I don't really have to worry about giving the GUI a new look and feel or such things -- there is very little chance that my company will invest engineering time in changing the look and feel of the demo programs!
We control the DLL, and we have to stay backwards compatible for our customers, so we don't have to worry about it changing.  We certainly don't have to worry about switching DLLs -- the entire purpose of this VI library is to wrap the DLL for customers who use LabVIEW!
If I were just doing this in the GUI, it would be one time and maybe I'd just do it.....but I wanted to make a custom control which would be at the interface to the VIs also (they can be run manually also).
At this point I am thinking of either the menu ring or of making a subvi which takes the UI type of cluster with booleans and does all the bundling and unbundling and type changes.  I'd still have to do it, but once, and it would be basically hidden.
Hmmmm....
B.

Similar Messages

  • Run Allocation for integer values

    Hi experts,
    I am runnig an allocation for a HeadCount Account (all integer values) and I would like that the result of the allocation were also integer values, using a round instruction for example.
    Could I define in Account Dimension that Signed data must be integer? or using rounding logic?
    Regards

    Correct me if i am wrong:
    E.g.1
    *REC(EXPRESSION=int(%value%))
    E.g.2
    *RUNALLOCATION
    *FACTOR=USING
    *DIM ACCOUNTB          WHAT=BR030;                           WHERE=<<<;                                               USING=PR01;
    *DIM TIMEB                  WHAT=%YEAR%.TOTAL_D;       WHERE=[PARENTH1]= '%YEAR%.TOTAL';    USING=<<<;
    *ENDALLOCATION
    *COMMIT
    How could apply Int statement in a RUNALLOCATION?

  • Free sample sales - Control for Total Value

    Dear all,
    In our sales free process we configured
    a condition type Z100 Net value
    and condition record maintained with Key
    Customer / Material / Plant
    Higher authority is maintaining teh condition reocrd for one day.
    10000/ Fg123456 / h210 - 100 % 12.8.2011 12.8.2011
    and It will come in the sales order and the Total value will get knocked off by Z100 condition type.
    But in this user can enter any number of quantity in the day and product can be dispatch as free sample.
    Now we want here
    The Basic value (multiply by qty) of the sales order should not go beyond Rs 5000/-
    It should be restricted.
    Or can we have some release strategy so that Rs 5000 marketing manager can release,
    5000 - 10000 COO and above CEO.
    Please suggest me, even the full process need to changed also OK for us.
    Thanks and Regards,
    Mani

    Hi Mani,
    As explained already, through user exit MV45AFZZ, you can acheive the block.
    for your 2nd part, you can get a z-report develop to check the orders that are blocked with this specific delivery block and their net value and item details. Allow the business user to choose the documents he wants to release, since this is purely a business decision. For the orders he wants to release, again through the same user exit MV45AFZZ and FORM USEREXIT_SAVE_DOCUMENT_PREPARE, you can get this block removed through ABAP programming.
    You can define a new blocking reason, if required in OVLS.
    Regards,
    Raghu.

  • Conversion error in Table control for Negative values

    hello all,
    Iam using table control with 6 columns and in that columns values are coming from Ztable. and out of that one column is of value which is input/output field and having negative value's also.type of that column is DEC.
    Now when i run the report dump occurs showing error message as COnversion Error.
    I think its because of negative value even the in attributes of that column i had selected With Sign checkbox.
    Now when i run the report then if in Ztable negative value is there then i want to display negative value in table control also.
    Please suggest me...
    <removed_by_moderator>
    Thanking you.
    Regards.
    Edited by: Hemant Baviskar on Sep 10, 2008 3:07 PM
    Edited by: Julius Bussche on Sep 10, 2008 1:13 PM

    Hemant
    Refer to following link:
    Table Control : Conversion error
    Thanks
    Amol Lohade

  • While Loop to Monitor a 1D 8Bit boolean Array for changes

    Hi;
    I need help in monitoring a 1D 8-bit boolean array for a value change. I think I need to use a while loop with shift registers???
    Any suggestions?
    Thank you,
    4BoysDaD

    Where are you going to put it in your code. It will depend on what you are already doing. Here is an example to show you how to do it with out shift registers.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    Example.vi ‏8 KB
    Check of 1D Boolean Array has Changed.vi ‏8 KB

  • Import a column from an excel spreadshee​t, then enable/dis​able boolean controls in a cluster based on imported values

    Greetings all. I have an application I've been developing and refining for some time.  Part of it entails an interactive periodic table of elements where the user can select multiple elements to include in a multi-element chemical standard.  The part I'm having difficulty with now is disabling multiple elements within the periodic table.  Specifically, what the scientist wants is to be able to reference an excel inventory that they keep of available on-hand single-element standards.  I need to be able to read in column A of that spreadsheet, build a distinct array of those elements listed (some are listed more than once) and then disable the boolean controls in my periodic table for those elements not in the array (or enable those elements which are in the array, whichever makes themost sense).  This way, the analyst cannot select elements in the periodic table for which thay have no on-hand inventory.  I see how to enable or disable all controls in a boolean cluster, and I see how to enable/disable a single control, but I'm looking for an elegant way to import the excel column, build an array of thsoe values and then enable only those values.  Any help is always appreciated.  Thanks again.

    hi
    try this
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.
    Attachments:
    Excel column read.vi ‏29 KB

  • Event execution based on the changing direction of boolean control value

    Generally an even case is executed as long as the value of a boolean control changes, no matter the change is from true to false or false to true.
    However, if I want to event case1 to execute if false to true, and case2 to execute if true to false, how to implement this?
    Thanks in advance.

    Dejun wrote:
    NI forum support is much more efficient than tele support!
    And we don't play cheesy elevator music while you wait.
    LabVIEW Champion . Do more with less code and in less time .

  • Regarding control graphs for external values

    I have a set of values for a month for a particular material.
          day             qty.
    ie  20080801      10
        20080802       15
        20080830       30.
    I used GFW_PRES_SHOW
    function module to plot values.
    The control limit for the material is 30. I want to encorporate this value also in the graph and show the deviation.
    Plz help me with some other function module
    for control limit graph for external values.

    hi,
    check this function module.
    GFW_PRES_SHOW_MULT.
    also use these programs.
    DEMO_GFW_PRES_SHOW_MULT
    DEMO_GFW_SHOW1.

  • How do I initialize a boolean control to a read value

    I need to perform a "read from digital line.vi" which I will get a
    boolean value x from a read port of a switch. I want to initialize a
    control write line (write to digital line.vi) to this x value. This is
    so the INITIAL boolean control button is showing the present state of
    the switch before it is set to another value. New to labview (version
    6.0i) , what is a good way to do this?
    thanks
    ( PC-DIO-96 card )

    Hi,
    Right click on your control, select Create/local variable. Then wire the output x from "read from digital line.vi" to the local variable. This way the control will be set to the value x.
    Hope this helps,
    Dan

  • Event Structure, Boolean Control and Value Changde

    I have a boolean control which is related to a frame in an event structure, the action set as Value Change. It worked ok with front panel click but I have problem with triggering it programmatically. I used the Val(sgnl) property node to trig the event. My problem is that it will trigger whenever a true or false value is sent to the property node, no matter it's changed or not. I don't know whether it's the normal behavior or I'm doing something wrong. Anyone can give some advices? Thanks in advance.
    Guangde Wang

    What you are seeing is the expected behavior, Value Signaling always sends the event.  An easy way inside the event to see if that is the case is to compare the new and the old value.  If they are the same then you can do nothing in that event.

  • Using an event structure to reset a boolean control with ring menu value change

    I am trying to get two boolean buttons to reset when the value of a ring menu changes.  For this I am using an event structure set to execute with a ring value change.  However I have other code that needs to be executing while the event structure waits for the value change.  I place my event structure inside the while loop the buttons reset as expected but my other code does not run (except at the moment of value change). If I place it outside the loop the rest of the code functions as expected but the buttons do not reset.  Any help you can offer is much appreciated.
    Solved!
    Go to Solution.
    Attachments:
    event structure reset.vi ‏11 KB

    try this
    Attachments:
    event structure reset_edit.vi ‏14 KB

  • LabVIEW DSC Logging too Many Data Points for Integer Tags

    Hi,
    I am having a strange problem with LabVIEW 2013 SP1 DSC data logging, running on XP SP3.
    All the integer Data Type Tags in my Tag Database that are set to data log, are logging way too much data. When I look at the amount of logged data points for these int16 in Historical view I see its logging a point nearly every second. See screen shots below or attached jpeg's of screen shots of trace view and Trace Props of one of the integer Tags. I would prefer the integer tags to only log on change like the boolean tags.
    These tags are being acquired from a Horner OCS over Modbus Serial RTU. The Modbus comms is set-up to poll once a second.
    The problematic Tag Data Type in DSC logging are Int16
    The Modbus register data items denotations I am using for Int16 is S4#####
    Example  'OCS_Modbus_Master\S403709' 
    The same register represented in OCS Register is shown as '%R0709'
    The trace properties for some of these int16 tags is showing database page numbers in the thousands, which compared to the largest floating point tag is currently showing 172 pages after several months of logging.
    I would have expected int16 tags to only log a value when the value changes and since the 'update deadband' tag setting is disabled for integer tag properties there is no way to config the tag to only log on changes. What is the default logging config for integers. Log everything or log on any change?
    I would prefer for these integer tags to only log on change, since they change infrequently, log on change would be much more data efficient.
    I tried changing the tag data type to floating point and gave it an update deadband value to try and see if that would reduce the amount of logged data, it didn't seem to make any difference.
    Not sure if the issue lies in the
    > Modbus Comms
    > The DSC data event tracking module
    > The DSC Data Logging module
    > Some kind of  Horner OSC data type mismatch which results in DSC polling seeing the acquired value as having changed on every poll.
    Any suggestions greatly appreciated
    Thanks
    Paul
    Attachments:
    Integer Tag Data Points Trace View.jpg ‏125 KB
    Integer Tags Data Points Tag Properties.jpg ‏42 KB

    This definitely sounds like a citadel/logos issue. There are two possibilities:
    1) corrupt database
    2) corrupt logos
    To see if it is a corrupt database, simply go to your database folder and move all the files out of that folder to a different folder. Then restart the application. Your application will create a clean database. This may solve the problem. If so, then you know it is a corrupt database.
    To upgrade/reinstall logos, go to the Control Panel -> Add/Remove Programs. If you see logos there, uninstall it. After uninstalling it, install the most recent logos version (found at ftp://ftp.ni.com/support/lookout/logos).
    Please let me know if the problem persists. As you know, you may also always call in to the Tech Support Line.
    Thanks.

  • Mapping Alsa Volume Control for USB SoundCard (C-Media 650)

    Hello everyone who is interested in helping me solve my volume control problem!
    Lets see, I have sound playback working, currently I am listening to some Foo Fighters mp3s in XMMS using the Alsa plugin, so I can't complain too much.
    However, volume control doesn't work. If I set the alsa plugin to use software volume control, then I have volume control but its not ideal and it doesn't help me when I'm not using xmms. When I run alsamixer or open the gnome volume control, I have multiple volume controls for the "Speaker" device. The 1st pair of volume controls do nothing, I can mute them and my music keeps playing... no idea what they're controlling. The 2nd pair ("Speaker 1") DOES control the sound volume. I just need to find a way to remap it or something so I can configure my applications/tray icon/etc to use it. (And preferabbly not the other 6 channels)
    In the Gnome sound control, the devices are:
    "Speaker" - stereo control that doesn't do anything
    and "Speaker 1" - a 7.1 channel (8 sliders) with the first two controlling front left and right sound for my stereo speakers.
    I've tried setting xmms to use "speaker 1", but the option is not in the drop-box, tried typing it manually but that didnt work.
    I set my tray icon to control "speaker 1" but the sliders don't seem to lock properly and the volume just jumps around, unlocking the channels and not staying balanced or scaling with the slider.
    The only way to get the volume to change as expected is to open the gnome volume manager, make sure the channels of "Speaker 1" are UNLOCKED and slide the first 2 sliders to the desired volume.
    So I was thinking if I could just remap the first two channels of "speaker 1" to something else using an alias or link or editing asound.state (which just confused me) for example, then I could use my alias to control the sound in my applications. Thanks for any help with this!
    Here's some system info that may or may not help:
    AMD Athlon 5400 X2
    Asus M2N-E SLi /w C-Media 650 onboard 8-channel audio CODEC (transfer audio signal over USB bus)
    Fully uptodate Arch Linux 64-bit (pacman -Syu'd this morning)
    aplay -L
    default:CARD=default
    PnP Audio Device , USB Audio
    Default Audio Device
    front:CARD=default,DEV=0
    PnP Audio Device , USB Audio
    Front speakers
    surround40:CARD=default,DEV=0
    PnP Audio Device , USB Audio
    4.0 Surround output to Front and Rear speakers
    surround41:CARD=default,DEV=0
    PnP Audio Device , USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=default,DEV=0
    PnP Audio Device , USB Audio
    5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=default,DEV=0
    PnP Audio Device , USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=default,DEV=0
    PnP Audio Device , USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    iec958:CARD=default,DEV=0
    PnP Audio Device , USB Audio
    IEC958 (S/PDIF) Digital Audio Output
    null
    $ cat /proc/asound/devices
    2: : timer
    3: : sequencer
    4: [ 0- 0]: digital audio playback
    5: [ 0- 0]: digital audio capture
    6: [ 0] : control
    asound.state:
    state.default {
    control.1 {
    comment.access 'read write'
    comment.type BOOLEAN
    comment.count 1
    iface MIXER
    name 'Mic Playback Switch'
    value false
    control.2 {
    comment.access 'read write'
    comment.type INTEGER
    comment.count 2
    comment.range '0 - 8065'
    comment.dbmin -2400
    comment.dbmax -2400
    iface MIXER
    name 'Mic Playback Volume'
    value.0 6144
    value.1 6144
    control.3 {
    comment.access 'read write'
    comment.type BOOLEAN
    comment.count 1
    iface MIXER
    name 'CD Playback Switch'
    value true
    control.4 {
    comment.access 'read write'
    comment.type INTEGER
    comment.count 2
    comment.range '0 - 8065'
    comment.dbmin -2400
    comment.dbmax -2400
    iface MIXER
    name 'CD Playback Volume'
    value.0 5575
    value.1 5575
    control.5 {
    comment.access 'read write'
    comment.type BOOLEAN
    comment.count 1
    iface MIXER
    name 'Speaker Playback Switch'
    value false
    control.6 {
    comment.access 'read write'
    comment.type INTEGER
    comment.count 2
    comment.range '0 - 8065'
    comment.dbmin -2400
    comment.dbmax -2400
    iface MIXER
    name 'Speaker Playback Volume'
    value.0 6144
    value.1 6144
    control.7 {
    comment.access 'read write'
    comment.type BOOLEAN
    comment.count 1
    iface MIXER
    name 'Speaker Playback Switch'
    index 1
    value true
    control.8 {
    comment.access 'read write'
    comment.type INTEGER
    comment.count 8
    comment.range '0 - 197'
    comment.dbmin -3693
    comment.dbmax -147
    iface MIXER
    name 'Speaker Playback Volume'
    index 1
    value.0 196
    value.1 196
    value.2 196
    value.3 196
    value.4 196
    value.5 196
    value.6 196
    value.7 196
    control.9 {
    comment.access 'read write'
    comment.type BOOLEAN
    comment.count 1
    iface MIXER
    name 'Mic Capture Switch'
    value true
    control.10 {
    comment.access 'read write'
    comment.type INTEGER
    comment.count 2
    comment.range '0 - 6928'
    comment.dbmin -1600
    comment.dbmax -1600
    iface MIXER
    name 'Mic Capture Volume'
    value.0 4096
    value.1 4096
    control.11 {
    comment.access 'read write'
    comment.type BOOLEAN
    comment.count 1
    iface MIXER
    name 'PCM Capture Switch'
    value true
    control.12 {
    comment.access 'read write'
    comment.type INTEGER
    comment.count 2
    comment.range '0 - 6928'
    comment.dbmin -1600
    comment.dbmax -1600
    iface MIXER
    name 'PCM Capture Volume'
    value.0 4096
    value.1 4096
    control.13 {
    comment.access 'read write'
    comment.type BOOLEAN
    comment.count 1
    iface MIXER
    name 'CD Capture Switch'
    value true
    control.14 {
    comment.access 'read write'
    comment.type INTEGER
    comment.count 2
    comment.range '0 - 6928'
    comment.dbmin -1600
    comment.dbmax -1600
    iface MIXER
    name 'CD Capture Volume'
    value.0 0
    value.1 0
    control.15 {
    comment.access 'read write'
    comment.type BOOLEAN
    comment.count 1
    iface MIXER
    name 'PCM Capture Switch'
    index 1
    value true
    control.16 {
    comment.access 'read write'
    comment.type INTEGER
    comment.count 2
    comment.range '0 - 6928'
    comment.dbmin -1600
    comment.dbmax -1600
    iface MIXER
    name 'PCM Capture Volume'
    index 1
    value.0 4096
    value.1 4096
    control.17 {
    comment.access 'read write'
    comment.type ENUMERATED
    comment.count 1
    comment.item.0 Mic
    comment.item.1 Mixer
    comment.item.2 'CD '
    comment.item.3 'Input 3'
    iface MIXER
    name 'PCM Capture Source'
    value Mic
    Thanks again!

    Some other observations that may be helpful (and, hopefully, get closer to the heart of the problem)...
    (1) Whenever VLC is playing audio (as mentioned in previous post, it is only application that works in desired manner), it will show up in Kmix's "Playback Streams" tab. Whenever Wine and Firefox are playing, they do NOT show up in the "Playback Streams" tab.
    (2) Kmix will not allow more than one open application to grab the UA-5 sound (e.g. If I open Firefox and play audio, stop playing audio (while leaving Firefox open), then open VLC and try to play audio, VLC will not play audio (unless Firefox is closed)). This is likely a related problem to the problem outlined in the previous post, but it might not be. If it isn't, I'll take advice on how to let KMIX grab multiple audio sources simultaneously on the same sound card.
    Thanks for reading!

  • Adding a check box control for each row of data in a DataModel

    Hi all,
    I need to add a checkbox control for each row of data on a DataModel object.
    I have a "commandButton" at the bottom of DataModel, and whenever someone checks some of the rows on that list of rows,
    I need to get the selected dataModel(fragment of the list) in my backing bean.
    How do I achieve this functionality in JSF?
    Thanks,
    Meghasyam.

    Hi all,
    I need to add a checkbox control for each row of data
    on a DataModel object.
    I have a "commandButton" at the bottom of DataModel,
    and whenever someone checks some of the rows on that
    list of rows,
    I need to get the selected dataModel(fragment of the
    list) in my backing bean.
    How do I achieve this functionality in JSF?
    Thanks,
    Meghasyam.You'll want to have a wrapper class as suggested above, which has a "selected" boolean in it. Then use the "binding" attribute of the h:selectBooleanCheckbox component to bind the checkbox to that property... Make the property public and specify the properties exact name in the binding... bindings do not append "get" to the EL.
    Here is an example of what your table might look like... This code would display the list of names with a checkbox to the left of each name... When the check box is selected, the "selected" property of that wrapper class is set to true or false as needed. Then when the form is submitted, and you are inside your actionListener or action method call, you can look through your collection of wrapper classes asking each one if it was selected or not... Then do whatever you want with them... In this example, replace "myBackingBean" with the name of your backing bean, and "names" with the name of the method in your backing bean which returns the collection of wrapper classes... create a flag "public boolean selected" or similar in your wrapper class..
    <h:dataTable id="namestable"
    value="#{myBackingBean.names}"
    var="aName">
    <h:column>
    <h:selectBooleanCheckbox binding="#{aName.selected}"/>
    <h:outputText value="#{aName.nameText}"/>
    </h:column>
    </h:dataTable>
    Let me know if that isn't clear enough and I'll see if I can find a better way to explain it...
    -Garrett

  • How to implement a boolean control via network

    Hi,
    I am developing an application by using LabVIEW 8.2 and RealTime. There is a host PC connecting to a PXI
    through network cable. Application VIs are running at PXI and GUi is running at host PC. My problem is
    When I config a boolean control as "Latch when release" mechanism, pass it to a shared network variable
    and then to a boolean control at PXI. "Latch when release" mechanism seems not run very well. Most of the
    time, no action when I press the boolean control button in my GUI. It seems that shared network variable
    could not act as "Latch when release" mechanism. I checked some examples from NI. Most of examples set
    the boolean control button mechanism as "Switch when press" and manually switch it status later on. I have
    a bunch of such boolean control buttons in my GUI. It will be hard to handle every of them in this way.
    I'd like to know whether there is an easier solution for this.
    Thanks
    Jason

    Hi Jason,
    How are you passing the shared variable to the Boolean control in PXI VI?
    Here is something to try out.
    --Configure the Boolean controls on both systems to "latch until released".
    --Create the shared variable (network-published) on the host PC and wire the output of the Boolean control to it.
    --On the remote system, bind the Boolean control to the shared variable on the host PC. To bind to the shared variable, right click the Boolean control 
       and select properties. Then select the "Data Binding" tab in the property window. Set the "data Binding selection" option to "Shared Variable Engine
       (NI-PSP)" and browse for the path to the shared variable created on the host PC.
    --With this setting, whenever the Boolean control on the remote system (PXI) reads a true value, it stays true until the value is read by LabVIEW and
        goes back to the initial (false) state.
    Checkout the attached sample LabVIEW project.
    Tun
    Message Edited by Tunde A on 12-12-2006 05:27 PM
    Attachments:
    Boolean Shared Var.zip ‏18 KB

Maybe you are looking for

  • I have misplaced my disk for Adobe Premiere Elements and i got a brand new computer that doesn't have a cd drive. any suggestions?

    Adobe Premiere Elements

  • TO_NUMBER and NLS parameters......don't understand

    I am trying to get my head around the use of format elements and NLS parameters with TO_NUMBER and TBH am at my wits end. So I'm going to start with something simple. I've never bothered or had to bother with the third parameter 'nls params' for NLS

  • Vendor Discount postings

    Hi, When I am posting an Invoice and entering the discount in the payment tab and post the invoice it does not post the discount to any account.Ideally it should post the discount to some account. It's not posting to any account. What could be the re

  • Error In Glassfish Server

    Error attempting to process extensions from the manifest of JAR file C:\sabonay\stchurch\stChurchEnterpriseApp\dist\gfdeploy\stChurchEnterpriseApp-ejb.jar; ignoring it and continuing java.io.FileNotFoundException: C:\sabonay\stchurch\stChurchEnterpri

  • WMV file problems

    I noted before that I was unable to open a wmv file. I have tried VLC, DIVX, and XDiv all without success. the VLC application gave me a little extra information that should be relevant. It tells me that it can't open a wvp2 file. Can that help anyon