Activating boolean cluster from a scan code

Hi, I am trying to activate Boolean controls within a cluster using a scan code.  Can anyone help me?  I have attached a VI below with instructions to illustrate the problem. Thanks.  John
Solved!
Go to Solution.
Attachments:
Listbox_Cluster.vi ‏17 KB

Not sure if this is what you are looking for. Have a try, there are many ways to implement this. I would also recommend type defining your cluster, also think about splitting it in to three different categories which means that you can disable the whole thing at once. It also means that you can add controls later on and as it is a type defined item, everything should still work fine.
Beginner? Try LabVIEW Basics
Sharing bits of code? Try Snippets or LAVA Code Capture Tool
Have you tried Quick Drop?, Visit QD Community.
Attachments:
Listbox_Cluster[1].vi ‏23 KB

Similar Messages

  • Scan code for hyper key

    I bought a programmable keyboard recently for which I can program the hardware scan code of each key. I would like to have a key that is recognized in X using the default xkb rules as the hyper key, but I can't figure out for the life of me how xkb translates hardware scan codes into "keycodes" which are then mapped to symbols in the /usr/share/X11/xkb/keycodes files. Basically, if someone can tell me how X goes from hardware scan codes to keycodes, or just what the scan code is for hyper in the default X keyboard config, I would appreciate it immensely.

    Thanks for the replies, everyone. So after seeing this thing about setkeycodes, I thought that maybe there was also a getkeycodes, and surely enough there was. Running it gets you a table like this:
    Plain scancodes xx (hex) versus keycodes (dec)
    for 1-83 (0x01-0x53) scancode equals keycode
    0x50: 80 81 82 83 99 0 86 87
    0x58: 88 117 0 0 95 183 184 185
    0x60: 0 0 0 0 0 0 0 0
    0x68: 0 0 0 0 0 0 0 0
    0x70: 93 0 0 89 0 0 85 91
    0x78: 90 92 0 94 0 124 121 0
    Escaped scancodes e0 xx (hex)
    e0 00: 0 0 0 0 0 0 0 0
    e0 08: 0 0 0 0 0 0 0 0
    e0 10: 165 0 0 0 0 0 0 0
    e0 18: 0 163 0 0 96 97 0 0
    e0 20: 113 140 164 0 166 0 0 0
    e0 28: 0 0 255 0 0 0 114 0
    e0 30: 115 0 172 0 0 98 255 99
    e0 38: 100 0 0 0 0 0 0 0
    e0 40: 0 0 0 0 0 119 119 102
    e0 48: 103 104 0 105 112 106 118 107
    e0 50: 108 109 110 111 0 0 0 0
    e0 58: 0 0 0 125 126 127 116 142
    e0 60: 0 0 0 143 0 217 156 173
    e0 68: 128 159 158 157 155 226 0 112
    e0 70: 0 0 0 0 0 0 0 0
    e0 78: 0 0 0 0 0 0 0 0
    which shows that a scan code of e068 maps to 128, the keycode for Hyper, by default. Great, problem solved.
    Unfortunately, when I fired up the keyboard programming software, it wouldn't let me assign a scan code of e068 to any keys, for some unexplained reason. Okay, so I use an unmapped scan code, 0x68,  that it does allow me to use. I figured I'd use setkeycodes to set 0x68 to map to 128. But now when I run showkey -s, the key that I thought I programmed to 0x68 gives 0xe078, with a keycode of 192, even though getkeycodes suggests that 0xe078 is unmapped. I even tried booting the kernel with the atkbd.softraw=0 parameter, to no avail. Furthermore, when I run xev in an X session, the keycode for the key in question now shows up as 249.
    By this point, I had no idea what was going on anymore, so I just gave up and used xmodmap to set keycode 249 to Hyper_R. I now have a Hyper key, but I can only get it via a series of obscure commands, rather than something that works out of the box. Oh well.
    If anyone can explain what was going on here, I'd still like to know, just out of curiosity.
    Thanks again.

  • Stub out Error Cluster from Error Code.vi?

    When I profile my application, I find that the biggest consumer of CPU time is the Error Cluster from Error Code.vi, called from a number of locked NI libraries.  How can I stub out this .vi, replacing it with basically a pass-through?  I tried creating a project specific .vi with the same name, and when I open my project all the project and vi.lib .vis used link to it, but they all come up broken and have to be re-linked, which I can't do in the locked .vis (I matched the ins and outs and connector pattern).  I can't edit the Error Cluster...vi directly, getting a message about the .vi being used by another application even with a clean start of LV and going directly to that .vi in the library (and I would prefer to not mess with the vi.lib version anyway).  Any suggestions?  Thanks.  LV 2011.
    Matt

    If you have the LLB manager open it reserves your VI in a different appliation instance, therefore it is locked and no editing.  Simply close the LLB manager and you can whack away at that VI.
    I doubt that the shared clone setting plays much of a role here, there are some deeper issues.   A rather amusing VI in a few ways:
    In order to show the VI Title instead of the Name you Open a VI reference which is going to stick you into the root loop.  10 reentrent clones simply means 10 copies waiting in line for the root loop.  A non-reentrent version would simply have 10 copies waiting to run.  Minus the root loop issue, reentrency is the way to go, and on a desktop machine shared clones is typically quite effective.
    It can't be a slow VI, look Trim Whitespace was inlined manually to avoid a performance hit!  In a loop maybe, but really, shaving off the overhead of a single subVI?  That's optimization.
    But wait, all of that and much, much more is given right back by the use of Delete From Array to remove the first element of the Array.  Bad on so many levels.    Delete From Array is a data copy machine, and now you are doing one needlessly.  Array subset is your friend here, tells the compiler you are only reading, nothing to get excited about. Pull it outside the case structure, you are ditching the first element twice in the two branches.
    Concatenating strings in a loop, also a recipe for fun.  Often there are ways to leverage Array to Spreadsheet string for better performance, or build a string array and then concatenate at the end.  Probably not a big deal here, how big are call chains really, but if you are inlining subVIs by hand then you should really be frying the bigger fish.
    I find myself in your shoes fairly often.  Some clunker in vi.lib causes a bug or sluggish performance.  You either ditch the NI code and roll your own, or make it work on your machine but not others, or chalk it up to the cost of doing business.  I have tried on numerous occasions to suggest that all patches to vi.lib be made readily and freely available to all previous versions of LV that are compatible.  Let's say this VI got tweaked so it was a bit more performant for you, at least enough to be viable.  Then you could happily use the patched version in LV11, and if you went to a different machine you would simply make sure vi.lib was up-to-date.  These types of patches could roll out incrementally as needed, less need to cross your fingers that you won the CAR lottery with each new version of LV.  (I guess most lottery winners don't shell out $$$ to collect their "winnings" though).
    After all that what would I do here?  I would wrap that sucker inside a disable structure (provide minimal functionality, like pass through caller name, code and error instead).  Then I would check the performance again.  Now you have a data point as to whether or not it is worth it to proceed.

  • How to use new cluster  'cl' commands from c/c++ code

    Hi All
    I need to invoke cluster commands from c/c++ code and parse the output to retrieve neccessary fields e.g status to be used in program.
    e.g
    #cluster status
    I need to capture output and use it in c/c++ code.
    Does any one have tried to use new cluster 'cl' commands from c/c++ code??
    Thanks
    Pandit

    The output of the cl* commands is for human consumption and as such (as most administrative commands) the output is not considered stable, so it could change with a Patch, etc.
    Instead you should use the cluster api to retreive the information you need.
    The Sun Cluster Data Services Developer's Guide for Solaris OS (http://docs.sun.com/app/docs/doc/819-2972?a=expand) describes the various possibilities, including the C API.
    Read especially http://docs.sun.com/app/docs/doc/819-2972/6n57ngitf?a=view for more details as which functions are available via the libdsdev. Each function has a specific manpage outlining the lib and includes needed as well es which information it offers.
    In your example, you can use scha_resource_get() (3HA) in order to retrieve the status of a specific resource (http://docs.sun.com/app/docs/doc/819-3055/6n5a6lhnl?a=view).
    Greets
    Thorsten

  • Pass error cluster from labview dll to teststand

    Hello,
    I just want to pass an error cluster from a dll compiled in LV7.1 to TestStand 3.1. I never receive the contents of the LV error cluster in TS. I compiled my function with standard calling convention option, this should work. In my VI I generate only an error and pass to error output.
    LV Settings:
     TS settings:
    regards
    MB

    MB,
    please follow the info in this KB:
    http://digital.ni.com/public.nsf/allkb/22BF02003B4588808625717F003ECD67?OpenDocument
    Please note that using "By Value" will never return any values to TestStand!
    You cannot use the default error-container in TestStand to receive data from the LV error cluster if you compile the VI into a LV DLL.
    So either you choose to follow the KB or you split up the error cluster in your LV VIs to return error.occurred (boolean), error.code (numeric i32) and error.msg (LV String) .
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to use Boolean values from 2 different sources to stop a while loop?

    I am working on a program for homework that states E5.4) Using a single Whil eLoop, construct a VI that executes a loop N times or until the user presses a stop button. Be sure to include the Time Delay Exress Vi so the user has time to press the stop botton. 
    I am doing this right now but it seems as though I can only connect one thing to the stop sign on th while loop. It won't let me connect a comparision of N and the iterations as well as the stop button to the stop sign on the while loop. So how would I be able to structure it so that it stops if it receives a true Boolean value from either of the 2 sources (whichever comes first)? 
    Basically, I cannot wire the output of the comparison of N and iterations as well as the stop button to the stop button on the whlie loop to end it. Is there a solution?
    Thanks!
    Solved!
    Go to Solution.

    Rajster16 wrote:
    Using a single Whil eLoop, construct a VI that executes a loop N times or until the user presses a stop button. 
    Look in the boolean palette for something similar to the word hightlighted in red above.
    LabVIEW Champion . Do more with less code and in less time .

  • Query Microsoft Active Directory info from PL/SQL

    Hi,
    We are developping an APEX application that would need to query information about the enterprise computers defined on the Active directory. Anyone knows it would be possible acces to this info from PL/SQL?
    I ahve read that exists a package that enables manipulate COM objectes (http://download-east.oracle.com/docs/cd/B10501_01/win.920/a95499/ch3core.htm#1006978)
    and I know that they exists COM interfases to Active Diretory (they are named Active Directory Service Interfaces (ADSI) ) but I have no idea if its possible to succesfully merge these 2 concepts.
    Has anyone tried to query Active directory info from PL/SQL using COM components or any other method?
    Thanks by advance

    Why not use DBMS_LDAP? That is what APEX's (built-in) LDAP authentication module uses. And it works just fine (doing a bind call) against a MS Active Directory Server.
    As for mucking about with COM from Oracle.. me no like. That ties your Oracle and PL/SQL to a specific operating system and you loose of the biggest advantages of Oracle - portability. Worse, you are at the mercy of the o/s vendor sticking to whatever standards used. In the case of Microsoft, that means mostly proprietary "standards" and very likely changes in those "standards" with every new version of the o/s - which will break your software. (personal experience talking)
    Rather let Oracle deal with the o/s complexities and restrict your code to using Oracle features only, as far as possible.

  • Active - Passive Cluster

    Hey, I have to manage an active passive cluster on SLES10 SP4. Oracle 10.2.0.4
    All oracle binaries are on a DRBD Device on mountpoint /oradata.
    This mountpoint includes the binaries and all datafiles.
    I havent installed these systems. At one stage on node died and got reinstalled by a systemadministrator.
    After a switch from the running node to the standby node, the cluster is not starting.
    Jan 3 14:36:01 a logger: Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.6114.
    Jan 3 14:36:14 a logger: Waiting for Oracle CSS service to be available before starting
    Jan 3 14:36:14 a logger: ASM instance +ASM. Wait 2.
    After issung $ORACLE_HOME/bin/localconfig add the cluster is starting, the asm instance is coming up, and also the database instance is starting.
    Shortly after that the db instance dies. Alertlog is showing something like recursive sql error.
    Looks like writing to the datafiles is not working.
    In asmcmd the diskgroups are showing DISMOUNTED (show MOUNTED before)
    so what to do ?
    a) Why is it necessary to issue "localconfig add" to make the cluster starting ?
    b) What could be a reason for not being able to write to the database ?
    c) How would you guys install an active/passive cluster ?
    c1) Install OS on both nodes
    c2) Install oracle binaries
    c2.1) on both nodes in the local files system and do the mapping to the drbd afterwards?
    c2.2) only on one node and just switch the mountpoint ?
    Chris

    Hi,
    first of all please clarify, if you have Oracle clusterware installed, or just the local configuration for local ASM.
    There is a big difference between the 2, and also using DRBD has nothing to do with Oracle clusterware (and is not supported by Oracle).
    a.) Localconfig may be necessary for a local ASM installation in 10.2. Main reason is, that the CSS service configuraton includes the hostname (which changed if you switched nodes). Hence may not be able to start ASM. With localconfig you are fixing this issue.
    Very important: It is not a good idea to run this is a cluster configuration, since it will break things (a lot of things).
    b.) If the ASM diskgroup got dismouned, then the database cannot write. Hence your problem. Why the diskgroup dismounted, you should find in the ASM alert.log
    c.) I would go for RAC One Node. Which has this all preconfigured. So it makes life easier. Search for "RAC One Node" on OTN for more information. At least I would take a manual cluster, and do mirroring by ASM, and not DRBD....
    c1.) Yes install Oracle cluster (or Grid infrastucture in 11.2) on both nodes. Like a RAC.
    c2) Install database software on both nodes locally.
    c2.1) No. No DRDB.
    c2.2) Both nodes. Same installation.
    Regards
    Sebastian

  • Receive a cluster from a dll function

    Hi,
    I have a function in a DLL which returns a C struct.  I want to know how can I receive a cluster from a CLFN?
    struct info:
    struct typedata{
    int a;
    int b;
    const char * c;
    int d;
    int e;
    }data;
    function call:
    const typedata * hostinfo(int param);
    Solved!
    Go to Solution.

    LVCoder wrote:
    Thanks a lot both of you for letting me know about my dumb assumption that 2 different processes can use the same memory space.
    Anyways, I figured out the problem with my code that was reading the double value. 
    the DLL function returns the address of the struct which has 5 elements.
    struct test {
    int a;
    int b;
    int c;
    double d;
    double e;
    suppose the address I receive is 10
    address of test->a = 10
    address of test->b = 14
    address of test->c = 18
    address of test->d = 26 // I was refering it as address 22. but I forgot that I was on a 64 bit machine and that the OS will allocate the whole memory address for a double and won't utilize the 4 bytes left in the previous memory address. 
    thanks!
    That has nothing to do with the bitness of your CPU or the OS. It is only dependent on the compiler alignment setting when you compile your DLL. Microsoft Compilers use a default alignment of 8 bytes. That means every variable or element inside a cluster will be aligned to the smaller one of either its own size or the default alignment.
    You can change the compiler alignment either with a compiler switch or an explicit #pragma iin your source code where you declare the variables or structure typedefs.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Find active user exit for a transaction code

    Hi All,
    Please help to find the active user exit for a transaction code.
    for Ex. below is the list of user exits for package VA ( for creation of sales order and changing sales order). Let me know which user exit is active and which is not active.
      Exit name    Short text
      SDTRM001  Reschedule schedule lines without a new ATP check
      V45A0001  Determine alternative materials for product selection
      V45A0002  Predefine sold-to party in sales document
      V45A0003  Collector for customer function modulpool MV45A
      V45A0004  Copy packing proposal
      V45E0001  Update the purchase order from the sales order
      V45E0002  Data transfer in procurement elements (PRreq., assembly)
      V45L0001  SD component supplier processing (customer enhancements)
      V45P0001  SD customer function for cross-company code sales
      V45S0001  Update sales document from configuration
      V45S0003  MRP-relevance for incomplete configuration
      V45S0004  Effectivity type in sales order
      V45W0001  SD Service Management: Forward Contract Data to Item
      V46H0001  SD Customer functions for resource-related billing
      V60F0001  SD Billing plan (customer enhancement) diff. to billing plan
    Thanks & Regards,
    Sabu

    Goto TADIR table give program id as R3TR ,Objec type as CMOD and execute.
    You will get all active exits in system.
    Exits related to SD may be in ZSD package.

  • How do I return a Boolean array from LabView to TestStand?

    I am trying to return a Boolean array from Labview to TestStand and have TS evaluate the results. I can do this for arrays of integers or reals but booleans do not work. I tried copying the PassFailTest step type and adding an array of Bool but I couldn't get it to evaluate the array. It simply always passed. How can this be done?
    Bob A.

    I have thought about evaluating the Boolean data in TestStand but, as you say, this is a lot of work. What I have been doing is to map the boolean data to integers in LV (very easy) and then use the multiple numeric step type to evaluate the integer array automatically. This feels kludgy and I have tried a couple of times to create a "multiple boolean" step type with little success. I'm surprised TS hasn't anticipated a test returning multiple pass/fail results. I do this all the time for production code.
    What I have tried is to copy MultipleNumericLimitsTest data type to a custom type and add a BooleanArray with a data type Array of Boolean[0..empty]. Then when I specify module, I select Step.BooleanArray as the value. The last step (that I know of) is to select Step.BooleanArray as the data source in the edit limits window. At this point if I run the test, I get the error "expect numeric, found boolean" (or something similar). When I look at the properties of my custom step type, the Substeps has DoMultiNumericMeasEvaluation as the Post-Step. I believe this is the root of my problem but I can't figure out how to change this to "DoMultiBooleanMeasEvaluation" or similar. Any Ideas?

  • Is it possible, when i call a vi from within my code, to pass to it parameters as input and to return some values too?

    Hi There!
    I am currently calling a vi from within my code. However, what i would like to do, is to pass it 2 int values when i call it and for it to return 2 int values when it is done!
    Any advice on how i can do this please.
    Thanks.
    Regards,

    Hi Matrix,
    is there a reason you do it this way? By Ref (it is called dynamically loading)
    If you place the VI directly on the BD of a VI you can just wire things up.
    Now if you need dynamically loading. hoover the open VI-ref function and right click on the type specifier and select create constant. Then right click browse, browse to your VI. Now you have the connector pane.
    But if I were you I just use VI directly, because you'll keep connections active between the two VI's
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Drop Database in Active/Passive Cluster

    Hi,
    database is 10.2.0.4 on RHEL AS 4. Database is using ASM for the storage of physical files. This database is part of Active Passive cluster.
    Can you please guide me as how can I drop this database and also remove the entry from cluster.
    Thanks

    Panicked DBA wrote:
    Hi,
    database is 10.2.0.4 on RHEL AS 4. Database is using ASM for the storage of physical files. This database is part of Active Passive cluster.
    Can you please guide me as how can I drop this database and also remove the entry from cluster.
    For dropping the database, using the DBCA is the best approach. After the removal, use the command srvctl to remove the entries from the OCR.
    HTH
    Aman....

  • Oracle Active / Passive Cluster Installation

    Hi everybody,
    I have searched a lot about installation of Active / Passive Cluster installation in Oracle on Linux, neverthless nowehere I found it.
    Can anyone help me to install it or send me any documentation about it from start to end.

    Hi,
    if you are talking to a High Availability feature in OAS 11g then check the following document.
    Reference
    http://www.oracle.com/technetwork/database/features/availability/maa-edg-frd-129690.pdf
    Regards Roberto

  • How do get a serial number for Photoshop elements 12 from my redemption code

    I recently purchased Photoshop Elements 12 from Office Max and I am trying to get the serial number from my redemption code.  I have followed the instructions from Adobe
    as well as those provided in the box and keep getting the message that "Something seems to be wrong on our end.  Please try again".  I have tried multiple times and still
    get the same answer.  What's wrong and how do i get myserial number so I can start using this product

    I was going through the same hassle with a Photoshop Elements 12 and Premiere combination box from Office Max. The receipt said that it was activated, but the numbers on the receipt and on the box were the wrong length. I finally found the 24-digit Redemption Code on a card mixed in with the other printed materials inside the box. I activated the Redemption Code through my online Adobe account and received the Serial numbers for both Photoshop and Premiere with no more problems.

Maybe you are looking for

  • Awt.toolkit returns null

    Hi all, I've discovered that the awt.toolkit system property returns null on the linux server hosting a java web application am working on. I've listed some of the AWT system properties on the system but the awt.toolkit returns null. java.awt.graphic

  • Instanceof in ejb ql

    Hi Am I the only one that noticed the lack of instanceof operator in EJB QL? Suppose I have "class B extends A", and I want to select the A entities which are not A, for instance. I'd expect to be able to do: "from A a where not(a instanceof B)" Ther

  • I am having difficulty clearing the cache on the latest upgrade of Firefox. I click both clear now buttons in preferences but the images remain cached.

    I close the tab, click both clear now buttons in preferences > advanced, but the images do not update to newly uploaded ones on my site. I had a long session with my CDN and it is not their issue. It does not occur on Safari or Chrome, only Firefox.

  • Getting error while starting application services.

    HI, I have installed 12i application but while starting the application services getting below error. libopmnoraclenls.so: unable to open library main: NLS initialization failed!! libopmnoraclenls.so: unable to open library main: NLS initialization f

  • Visual aides in code view

    Is there a plug-in or some other way for Dreamweaver to highlight closing tags for any element? Indention is nice but when working on longer pages or more complicated pages, trying to 'eyeball' where the closing tag is for a particular div can be mad