Changing a Boolean Value

I have a number of virtual valves placed on my front panel to control solenoid valves. When these virtual control valves are pressed, they illuminate to a green color and LV writes a 1 to my fieldpoint modules, actuating the valve. When the valve is turned off, the color is red and LV sends a 0 signal to the valve. I want to know if I can switch the signal states of the valve, so that a 1 is written during a red color state, and a 0 is written during an illuminated or a green colored state.

Prashant,
There are two way to accomplish this:
1. You can put a NOT vi function in the diagram, on the wire from the valve control to the rest of your VI.
2. You can edit the colors on the virtual valve controls so that the red and green are switched.
Hope that works for you!

Similar Messages

  • Changing a boolean value based on two buttons

    I know that this is a ridiculously simple question, but I've been having trouble with it.
    How would you set a boolean value based on the input from two other boolean values? Essentially what I want, in pseudocode, is this:
    boolA = true
    if (boolB)
         boolA = false
    if (boolC)
         boolA = true
    It should be really simple to do, but I can't figure it out. The problem is getting it to stay false, for example, after boolB goes back to false, and not just to have it only momentarily go to false. I want it to stay false until boolC goes to true, regardless of what boolB does after that. Any advice?
    Thanks,
    Logan Williams

    I would say implies is close to what was asked for.  However, the only issue is that for the case where both B and C are false, the logic shows that there is no change to A.  It is initially True, but if it happens to be False because of further changes, there is nothing in the If statements to change the logic.  And that is what is asked for.  That the Result stays False even when B goes back to False.  But the Implies function says that  F and F must be True.
    As described
    B         C         Result A
    T          T          T (because C is evaluated 2nd)
    T          F          F
    F          T          T
    F          F          x (initially T, but the code shown and what is asked for is actually no change from previous state)
       Implies Truth Table
    B         C         Result A
    T          T          T
    T          F          F
    F          T          T
    F          F          T

  • UCCX 10.5 Scripting: Allowing a CAD Task Button to Change A Boolean Value to Skip a Screen Pop

    Good Morning All...
    I've found some wonderful information on here in the past and I'm hoping you all can assist me now.
    I have a CCX Script (10.5(1)SU1) that is working beautifully. Within the CAD integration there is a screen pop which sends an ANI value to a corporate application to bring up customer information, this is also working with no issue. I've been given a request from the call center manager to put a task button on the agents' CAD instance to allow them to turn off these screen pops in the event that they need to be on the same screen for longer than the work/wrap-up time between calls.
    My Questions Are These:
    1. I know I can use a task button to set an Enterprise Data value i.e. skip_pop = true (skip_pop being tied to the Boolean value in the script). That being said, I can't change the value until the call reaches the agent and that is too late in the process to stop the prompt from running. Is there a better/different way that I am not thinking off to allow the agent to interact with Boolean value before the call arrives to the agent?
    2. Am I completely off base? Is there a much better way that I can do this in general?
    I am at your mercy and your help is greatly appreciated.
    Thank you
    Justin

    Hey Aaron:
    So I'm in the midst of working through this mess for a button push and I've hit a wall. Perhaps you'll have some insight? In my CDA (see screen shot) I've configured an HTTP action that is in theory sending the agent ID and a value of true.
    In my child script (attached) I have a Get HTTP contact info where I am looking for "Agent_ID" and "sPopState" when I do a test run with a reactive debug I am getting success but the database is basically adding lines but with no information in either column (I have verified that my DB is working correctly).
    Do you by chance have any idea what I might be missing? I'd like to think I'm close but I'm getting into dark territory for my experience level.
    As always, your help and expertise are greatly appreciated.
    Thanks,
    Justin

  • ObjectInputStream returns a wrong boolean value of a object

    ObjectOutputStream.writeObject once, then change the boolean value of the Contact object, ObjectOutputStream.writeObject again, but when ObjectInputStream.readObject, it returns SAME boolean values which should be different. can somebody explain me this? please. thx
       1. import java.io.*; 
       2. import java.util.*; 
       3.  
       4. public class TestSerializable { 
       5.      
       6.     /** Creates a new instance of TestSerializable */ 
       7.     public static void main(String args[]){ 
       8.         new TestSerializable(); 
       9.     } 
      10.      
      11.     public TestSerializable() { 
      12.         try{ 
      13.             Contact contact = new Contact("email","group",1); // contact.isOnline = true for default; 
      14.              
      15.             FileOutputStream fos = new FileOutputStream("ser"); 
      16.             ObjectOutputStream oos = new ObjectOutputStream(fos); 
      17.  
      18.             oos.writeObject(contact); 
      19.              
      20.             contact.setOnline(false); 
      21.             oos.writeObject(contact); 
      22.  
      23.             oos.flush(); 
      24.  
      25.              
      26.             FileInputStream fis = new FileInputStream("ser"); 
      27.             ObjectInputStream ois = new ObjectInputStream(fis); 
      28.             Contact ccRead1 = (Contact)ois.readObject(); 
      29.             Contact ccRead2 = (Contact)ois.readObject(); 
      30.              
      31.             System.out.println("ccRead1.isOnline() = "+ccRead1.isOnline()); 
    [u]  32.             System.out.println("ccRead2.isOnline() = "+ccRead2.isOnline() + " which should be FALSE. ERROR");  [/u]
      33.                        
      34.             oos.close(); 
      35.             ois.close(); 
      36.              
      37.         } 
      38.         catch(Exception e){ 
      39.             e.printStackTrace(); 
      40.         } 
      41.          
      42.     } 
      43.      
      44. } 
      45.  
      46.  
      47.  
      48.  
      49.  
      50. import javax.swing.tree.DefaultMutableTreeNode; 
      51. import javax.swing.tree.*; 
      52. import java.util.*; 
      53.  
      54. public class Contact extends DefaultMutableTreeNode { 
      55.      
      56.     private String email; 
      57.     private int arrayIndex; 
      58.     private String group; 
      59.     private boolean online; 
      60.      
      61.   
      62.     public Contact(String email,String group,int arrayIndex, boolean online){ 
      63.         this.email = email; 
      64.         this.group = group; 
      65.         this.setArrayIndex(arrayIndex); 
      66.         this.setOnline(online); 
      67.         this.setUserObject(this); 
      68.         this.setAllowsChildren(false);         
      69.     } 
      70.      
      71.     public Contact(String email, String group){ 
      72.         this(email,group,-1,false); 
      73.     } 
      74.      
      75.     public Contact(String email, String group, int arrayIndex){ 
      76.         this(email,group,arrayIndex,true); 
      77.     } 
      78.      
      79.  
      80.      
      81.     public String toString(){ 
      82.         return this.email; 
      83.     } 
      84.  
      85.     public String getEmail() { 
      86.         return email; 
      87.     } 
      88.  
      89.     public int getArrayIndex() { 
      90.         return arrayIndex; 
      91.     } 
      92.  
      93.     public String getGroup() { 
      94.         return group; 
      95.     } 
      96.  
      97.     public boolean isOnline() { 
      98.         return online; 
      99.     } 
    100.  
    101.     public void setOnline(boolean online) { 
    102.         this.online = online; 
    103.     } 
    104.  
    105.     public void setArrayIndex(int arrayIndex) { 
    106.         this.arrayIndex = arrayIndex; 
    107.     } 
    108.  
    109.      
    110. } 

    Did you try the reset() technique again?
    You could also have a look at ObjectOutputStream.writeUnshared().
    And it's not returning a 'wrong value', it is conserving the object graph of the original object sent, which is what it's specified to do and what it's supposed to do. If you don't want that behaviour use reset() or writeUnshared().

  • How to generate pulse during changing boolean value?

    I need to generate short pulse during changing boolean value from 0 to 1. This pulse is needed to reset counter. 
    I was trying with Event Structure with Value Change but I think that I did something wrong.
    Maybe sambody can give me some tips to do it in other way?
    Thank you in advance.
    Regards
    Solved!
    Go to Solution.

    Rogal wrote:
    I need to generate short pulse during changing boolean value from 0 to 1. This pulse is needed to reset counter. 
    I was trying with Event Structure with Value Change but I think that I did something wrong.
    Maybe sambody can give me some tips to do it in other way?
    Thank you in advance.
    Regards
    We assumed you wanted a pulse when a front panel button (boolean) was clicked.
    I am still not sure just what it is you want.
    Do you want a single pulse when x is greater than 4?
    You don't need an event structure for that.
    Omar

  • Sorting a datatable with a boolean value

    Hi all,
    I have a datatable and one of the columns is just a true or false field.
    I'm using the DTOComparator from the BalusC (here: http://balusc.xs4all.nl/srv/dev-jep-dat.html) server but I'm getting the error:
    Error 500: java.lang.RuntimeException: Getter getInclude cannot be invoked.
    It comes from this line of code:
    try {
                c1 = (Comparable) o1.getClass().getMethod(getter, null).invoke(o1, null);
                c2 = (Comparable) o2.getClass().getMethod(getter, null).invoke(o2, null);
            } catch (Exception e) {
                // Obvious. Check if method names are correct.
                throw new RuntimeException("Getter " + getter + " cannot be invoked.");
    Can you not use boolean values with this?
    Thanks for any help!
    Illu

    Instead of a primivive, use a wrapper objects as DTO property which represents a DB entry. Remember, DB2 fields can contain null values.
    So use Boolean instead of boolean. Or just change the comparator to make it compatible with primitives.

  • Network.protocol-handler.external.magnet type = boolean value = true

    Associating magnet files with firefox and qbittorrent
    With firefox 3.x the following entries in about:config worked just fine.
    network.protocol-handler.app.magnet type = string value = /usr/bin/qbittorrent
    network.protocol-handler.external.magnet type = boolean value = true
    network.protocol-handler.warn-external.magnet type = boolean value = false
    With 4.0 they don't, and as far as I can see the problem is that 4.0 will not accept "network.protocol-handler.external.magnet type = boolean", because it persistently changes its type to string.
    So how do I get magnet links transferred to qbittorrent through firefox 4.0?

    I too was trying hard to get it work, and none of them was working, but then i did something accidently ended doing, what '''[email protected]''' had done certainly with a little change.
    it didn work at first then, after couple of firefox restarts it asked for application to open magnet. ''firefox 4.''
    # network.protocol-handler.app.magnet = usr/bin/azureus
    # network.protocol-handler.expose.magnet = false
    hope it helps//./

  • Best way to check boolean value

    Hi!
    I have a schema defining an XML element with a boolean attribute. The document related to this schema use true/false literal boolean values, eg:
    <myelement myattribute="false"/>....<myelement myattribute="true"/>
    The data is stored in binary xml storage.
    I query the db on the boolean attribute with an xpath condition like this:
    ..../myelement[@myattribute=false()]
    Querying the db with this method:
    SELECT XMLQuery('....' returning content) from dual
    all works as expected.
    Instead, using:
    SELECT XMLQuery('....' ' PASSING OBJECT_VALUE RETURNING CONTENT)
    FROM "myxmltable"
    WHERE XMLExists('....' PASSING OBJECT_VALUE);
    I get the error: ORA-31038: Invalid hexBinary value: "false"
    To get the second query method working, I have to change the xpath condition, forcing a string comparison:
    ..../myelement[string(@myattribute)="false"]
    Can someone explain me this behaviour? What is the best way to check a boolean value? I'd like to write the same xquery working in both methods!
    Thank you.
    Bye
    Mirko

    Hi Geoff
    here the schema:
    <xs:schema xmlns:tns="http://OracleTest" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" targetNamespace="http://OracleTest" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="MyComplexType">
    <xs:sequence>
    <xs:element minOccurs="0" name="FirstChild">
    <xs:complexType>
    <xs:attribute name="A" type="xs:string" />
    <xs:attribute name="B" type="xs:string" />
    </xs:complexType>
    </xs:element>
    <xs:element minOccurs="0" name="SecondChild">
    <xs:complexType>
    <xs:attribute name="S" type="xs:string" />
    <xs:attribute name="B" type="xs:boolean" />
    <xs:attribute name="I" type="xs:integer" />
    </xs:complexType>
    </xs:element>
    <xs:element minOccurs="0" name="ThirdChild">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="ThirdChildA">
    <xs:complexType>
    <xs:attribute name="A" type="xs:string" />
    <xs:attribute name="B" type="xs:string" />
    </xs:complexType>
    </xs:element>
    <xs:element minOccurs="0" name="ThirdChildB">
    <xs:complexType>
    <xs:attribute name="C" type="xs:string" />
    <xs:attribute name="D" type="xs:string" />
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="ID" type="xs:string" />
    </xs:complexType>
    <xs:element xdb:defaultTable="MyElement" name="MyElement" type="tns:MyComplexType" />
    </xs:schema>
    and here two sample XML documents:
    <tns:MyElement ID="ID1" xmlns:tns="http://OracleTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://OracleTest http://OracleTest.xsd">
    <tns:FirstChild A="a" B="b" />
    <tns:SecondChild S="s" B="true" I="1" />
    <tns:ThirdChild>
    <tns:ThirdChildA A="aa" B="bb" />
    <tns:ThirdChildB C="cc" D="dd" />
    </tns:ThirdChild>
    </tns:MyElement>
    <tns:MyElement ID="ID2" xmlns:tns="http://OracleTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://OracleTest http://OracleTest.xsd">
    <tns:FirstChild A="aa" B="bb" />
    <tns:SecondChild S="ss" B="false" I="2" />
    <tns:ThirdChild>
    <tns:ThirdChildA A="aaaa" B="bbbb" />
    <tns:ThirdChildB C="cccc" D="dddd" />
    </tns:ThirdChild>
    </tns:MyElement>
    I registered the schema using Enterprise Manager. The "Show SQL" function returned this script:
    BEGIN
    DBMS_XMLSCHEMA.REGISTERSCHEMA(
    schemaurl => 'http://OracleTest.xsd',
    schemadoc => sys.UriFactory.getUri('/Testing/test.xsd'),
    local => FALSE,
    gentypes => FALSE,
    genbean => FALSE,
    gentables => TRUE,
    force => FALSE,
    owner => 'EMILIAROMAGNABUY',
    OPTIONS => DBMS_XMLSCHEMA.REGISTER_BINARYXML);
    END;
    This is my test script:
    -- This works fine: returns only the requested row.
    SELECT XMLQuery('declare default element namespace "http://OracleTest"; collection("/Testing")/MyElement/SecondChild[@B=true()]' returning content) from dual;
    -- This raises the error = SQL Error: ORA-31038: Invalid hexBinary value: "true"
    select xmlquery('declare default element namespace "http://OracleTest"; /MyElement/SecondChild[@B=true()]' passing object_value returning content).getclobval() from "MyElement";
    -- This doesn't work correctly: returns the requested row and two empty rows ?!? I don't like this cast, anyway.
    select xmlquery('declare default element namespace "http://OracleTest"; /MyElement/SecondChild[string(@B)="true"]' passing object_value returning content).getclobval() from "MyElement";
    Thank you
    Mirko

  • JTable cell color overriding Boolean values displayed as checkboxes. Fix?

    I have a JTable column of Boolean values that automatically appear as checkboxes. When I apply my DefaultTableCellRenderer to this column, the checkbox disappears and a "false" or "true" appears instead. But if I mouseclick on the cell, the checkbox will appear momentarily.
    Any suggestions for getting the Boolean value displayed as a checkbox and seeing my colors change? (I suppose the easy way is using JCheckBox, but I'm curious if I can do it using Boolean)
    Thanks for the help. Code follows for the cell renderer.
    class ColorRenderer extends DefaultTableCellRenderer{
    public ColorRenderer() {
    super();
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    if (isSelected == true) {
      setBackground(Color.getHSBColor(100, 100, 1));
      setForeground(Color.BLACK);
    } else {
      setBackground(Color.LIGHT_GRAY);
      setForeground(Color.WHITE);
    if (hasFocus == true) {
      setBackground(Color.RED);
      setForeground(Color.WHITE);
    setOpaque(true);
    setValue(value);
    return this;

    Wouldn't extend DefaultTableCellRenderer as that extends a JLabel
    I would extend a JCheckBox and implement TableCellRenderer.

  • cfselect display boolean values

    I am trying to create a cfselect on a search page that checks for a boolean value in an access database. It works when I put a 1 or 0 in the option/values, but I want it to say yes or no instead of 1 or 0  -- novice - thank you-- jim
    <label for="Addressed">Addressed:</label>
    <cfselect name="addressed" id="addressed" >
    <option value="">Select an option.</option>
    <option value="1">1</option>
    <option value="0">0</option>
    </cfselect

    What would happen if you changed this:
    <option value="1">1</option>
    to this
    <option value="1">yes</option>

  • BAPI_CUSTOMERQUOTATION_CHANGE - error while changing a condition value

    Hallo Gurus,
    I am trying to use tshi BAPI BAPI_CUSTOMERQUOTATION_CHANGE to change a condition value of a condition record of a quotation.
    Every time I execute the BAPI, instead of the condition tyoe being changed, a new record is added to the list of conditions!
    Can someone please help!
    Thsi is my piece of code::
    itab_BAPISDH1X-UPDATEFLAG = 'U'.
    append itab_BAPISDH1X.
    itab_BAPICOND-ITM_NUMBER = '10'.
    itab_BAPICOND-COND_ST_NO = '31'.
    itab_BAPICOND-COND_COUNT = '00'.
    itab_BAPICOND-COND_TYPE = 'ZST3'.
    itab_BAPICOND-COND_VALUE = '15.00'.
    itab_BAPICOND-COND_UPDAT = 'X'.
    append itab_BAPICOND.
    itab_BAPICONDX-ITM_NUMBER = '10'.
    itab_BAPICOND-COND_ST_NO = '31'.
    itab_BAPICOND-COND_COUNT = '00'.
    itab_BAPICONDX-COND_TYPE = 'ZST3'.
    itab_BAPICONDX-UPDATEFLAG = 'X'.
    itab_BAPICONDX-COND_VALUE = 'X'.
    append itab_BAPICONDX.
    CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
      EXPORTING
        salesdocument                = p_vbeln
      QUOTATION_HEADER_IN          =
        quotation_header_inx         = itab_BAPISDH1X
      tables
        return                       = itab_BAPIRET2
       CONDITIONS_IN                =  itab_BAPICOND
       CONDITIONS_INX               =  itab_BAPICONDX
    Thanks!
    Mukta

    Hmm...
    Change the following....and check..
    itab_BAPICONDX-ITM_NUMBER = '10'.
    itab_BAPICOND-COND_ST_NO = '31'.
    itab_BAPICOND-COND_COUNT = '00'.
    itab_BAPICONDX-COND_TYPE = 'ZST3'.
    itab_BAPICONDX-UPDATEFLAG = 'X'.
    itab_BAPICONDX-COND_VALUE = 'X'.
    append itab_BAPICONDX.
    "change the above to.....
    ab_BAPICONDX-COND_TYPE = 'X'.
    append itab_BAPICONDX.
    The BAPICONDX.. should contain only X.. in the fields which you want to update.. try this change..and let us know if it works.
    Also have a look at the FUNCTION MODULE DOCUMENTATION for this bapi in SM37.
    Cheers...

  • BI-IP: Change of characteristic value in ABAP EXIT planning function

    Hi
    I have created a planning function of the type EXIT with reference data without blocks. In method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE I am going to implement my code.
    Now, one of the purposes is to update the VALIDTO of an existing record. Is it possible to modify the characteristic values directly in C_TH_DATA (thus allowing me to just update the date directly on the record) or can I only append records?
    Cheers!
    /Karsten

    Hi Larse,
    Yes you can change directly your value in a record withou appending a new one,but still it will create 2 records in the delta buffer ready to be save to the cube.
    Reagrds,
    Eitan.

  • How to Change a Default Value from Drop Down Box displayed in Web Dynpro?

    Hi,
    How to Change a Default Value from 'High' to 'Low'  in a Drop Down Box for RANGE field displayed in Standard Web Dynpro Component.  I saw a Default Value set for a RANGE field  in View Context When I select that field and click on Display. I am seeing Default Value set it to 'HI'. Please let me know how to change from HIgh to Low.
    I appreciate your help!
    Thanks,
    Monica

    hi,
    use the set_attribute( ) method now to set the attribute with a particular key eg HIGH in ur case
    // u can use the code wizard( control +f7) this code will be auto generated when u select the
    //radio button to read the context node
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
      DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
      DATA ls_cn_node TYPE wd_this->element_cn_node.
    * navigate from <CONTEXT> to <CN_NODE> via lead selection
      lo_nd_cn_node = wd_context->get_child_node( name = wd_this->wdctx_cn_node ).
    * get element via lead selection
      lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    * set single attribute
      lo_el_cn_node->set_attribute(
          name =  `ATTribute name.`
          value = 'LOW' ).
    it will solve ur query ..
    also refer to this component
    wdr_test_events -> view dropdownbyidx and dropdownbykey ->method name onactionselect.
    regards,
    amit

  • How to change the profile value in the pl/sql code without making change in the database

    How to change the profile value in the pl/sql code without making change in the database.

    I have program ,where if the profiles 'printer and nunber of copies ' are set at the user level, by default when the report completes the O/p will be sent to the printer mentioned in the set-up. but what user wants is
    if these Profiles are set for the user running this program automatic printing should not be done.

  • How to change the column value which is coming from DO by a calculated field?

    Hi all,
    I want to change a column value based on my calculated field value. I have a column which is coming from DO which is based on External Data Source. I have a calculated field in my report. When there is any change in the calculated field then the column which is coming from DO needs to be changed. It means the DO needs to get updated when there is a change in the calculated field. Or like if the calculated field meets some condition then I need to change/update the same in the DO. This has to be done on the fly. the report should not submitted for this. when there is a change in the calculated column the DO column needs to get updated.
    Thanks,
    Venky.

    Ok, I've been a customer for very many years, I'm on a fixed retirement
    income.  I need to reduce my bills, my contract ends in  Dec. I will be
    pursuing other options unless I can get some concessions from Verizon.  My
    future son-in-law was given this loyalty plan, so I know this is a
    reasonable request.  My phone number is (removed)  acct number
    (removed)
    >> Personal information removed to comply with the Verizon Wireless Terms of Service <<
    Edited by:  Verizon Moderator

Maybe you are looking for

  • Error while coming out of MM06 without making any change.

    Hi I am trying to check-uncheck some flags for material deletion in transaction MM06 through LSMW. I am using the Batch Input recording method. When i am making any sort of change to the material it works fine. But when there is a material whose flag

  • HT4864 Large file stuck in iCloud

    I sent a file from my iPhone that is apparently too big for iCloud to handle and it is stuck in the outbox of my iPhone. I can not delete it. I tried and tried. Its been stuck about 6 hours now and it is drainking my battery. I also restarted my phon

  • Twenty inch Imac display does not shut off in Yosemity.

                   I am blind, My Mother who can see informs me that the background has been on for days.    

  • Is Lightroom CC available?

    I don't see it in my CC list of aps. I have requested a download through the Adobe page, and the page replied "... is downloading" but I don't see any actual evidence of download... Anyone? Subscripting paid up to date; Photoshop CC successfully down

  • Keys not working right

    I put my powerbook to sleep and after i turn it back on the Caps Lock and the Num Lock were turned on. However, they work in reverse. I have have to have Caps lock on in order to type in small letters and when it is off it types caps. When Num Lock i