Best way to do a simple Boolean test?

Hello All,
  Trying to do a simple Boolean test, but it is proving to be more complicated than I would have expected.  Hoping that I am missing something simple.
I have a Labview code module that provides a Boolean value for the output.  I want to evaluate this value and provide pass/fail results to the report.  Sounds simple, but here is what I am running into:
-The built-in NI step type "Pass/Fail Test" will evaluate the Boolean directly with True=Pass, and False=Fail.  This would be fine, except that I have situations where I need False to equal Pass.  I've read a few posts that speak of inverting or negating the Boolean result, but they all involve passing the result to a parameter or variable, and then evaluating it outside of the test step.  This adds several layers that I don't think I should need.
-I have read a post that suggested I convert the Boolean to a numeric inside of the code module.  This does indeed make sense, but this is not practical in my situation because of the scale and implementation of my code modules.  I use custom type definitions for controls and indicators from a Labview project, and would have to create a new control/indicator for every one if I wanted to change the data type.  
-Next logical step was to see if the "Numeric Limit Test" would recognize a Boolean.  Turns out it doesn't.     
-After this, I looked into creating a custom step type.  This would probably be the most useful, but it is beyond my current ability to do so.  I got as far as making a copy of the built in step type and putting it in the custom "MyTypes" directory, but I have made very little progress in editing it to make it a work.  Additionally, I've read a few posts that recommend avoiding custom step types.  
Hoping someone can point me in the right direction.  Please advise.
Thanks,
GSinMN    
Solved!
Go to Solution.

You could change the Data Source based on what value you want.  Since there doesn't appear to be an logical XOR, you will need to use a case statement.  For example, you could do:
Locals.Desired? Step.Result.PassFail:!Step.Result.PassFail
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Best way to code a simple wait/delay?

    What is the best way to code a simple wait/delay so that my application idles for a few seconds before continuing? I'd rather not use a loop to do this and am looking for a better solution. This code will not be threaded, so I'm not going to use sleep(). TIA

    From the OS level, yes it is a process; from Java's perspective, it's a Thread, at least in Sun's implementation.
    According to the JVM specification, section 2.1.9, "The Java virtual machine initially starts up with a single nondaemon thread, which typically calls the method main of some class. The virtual machine may also create other daemon threads for internal purposes. The Java virtual machine exits when all nondaemon threads have terminated."
    http://java.sun.com/docs/books/vmspec/2nd-edition/html/Concepts.doc.html#33308

  • Best Way to Draw A Simple Isoceles Triangle, and Fill it.

    Hi,
    What I assume is a relativly simple problem, ive got the coordinates of the bottom two points of an isoceles triangle, and the height, and need to draw it in Java2D. It's base will always be parrellel to the bottom of the screen.
    I also need to be able to fill or not fill it very simple, what would be the best way to do this?
    Thanks for your time,
    atreides7887

    Create your triangle as an instance of [java.awt.Polygon|http://java.sun.com/javase/6/docs/api/java/awt/Polygon.html] and call [java.awt.Graphics2D.fill(Shape s)|http://java.sun.com/javase/6/docs/api/java/awt/Graphics2D.html#fill(java.awt.Shape)] to paint the triangle to a BufferedImage or in a paintComponent override.
    Read the other methods of Graphics2D for the rest of your answer.
    db

  • Best way to implement a simple read of multiple stings from a db

    Hello guys,
    I am trying to read a collection of countries (Strings) into a collection inside a Movie object. The countries reside in a separate DB table with a FK referencing the Movie.
    My questions:
    1) What is the best way to implement this? Do I need a seperate entity 'country' ? Is there a general way to read many strings into a collection?
    2) the countries list does not have to be updated, only read. How do I make sure it is not persistent?
    I have noticed that in my JPA implementation (in netbeans) I do not have something like CollectionOfElements (that is present in hybernate).
    Thank you,
    Marek

    >
    My questions:
    1) What is the best way to implement this? Do I need a seperate entity 'country' ? Is there a general way to read many strings into a collection?
    Probably yes, you need to have one entity for country.for getting the right answer, Post it here - Enterprise Technologies - Java EE SDK (http://forums.sun.com/forum.jspa?forumID=136)

  • Best way to do a simple slide animation in GoLive 6?

    Hi,
    I'm an illustrator and manage my own site (only) in GoLive 6. I only update rarely and this last time it has been 3 years. My index page has a single image, but I'd like to use 4 or 5 images cycling in that spot with the best "disolve" I can get.
    www.daveseeley.com
    I've tried building the animation as a swf file in Imageready (cs2) = 10 second download of 3.4mb file in DSL=nonstarter...then tried an animated gif in which is about the same size, with much worse image quality, and it loads immediately and plays while continuing to load....so could work, but not ideal. I see that GoLive has a slideshow action, but cannot figure out how to do it.... Will that be with no dissolve setting=harsh transition if I just have the 4 or 5 images as jpegs with no transition files, or is there a way to do that automatically?
    I do have photoshop cs3, but haven't yet loaded it.
    Thanks for any help...
    Dave

    In article <[email protected]>,<br /> "David Seeley" <[email protected]> wrote:<br /><br />> Will that be with no dissolve setting=harsh transition if I just have the 4 <br />> or 5 images as jpegs with no transition files, or is there a way to do that <br />> automatically?<br /><br />Yes, GL's slide show action doesn't do transitions.<br /><br />I use a simple application called SWF'n Slide to create lean Flash <br />slideshows:<br /><a href=http://verticalmoon.com/products/swfnslide/swfnslidecommon.htm><br /><br />I have the Pro version, but the standard version offers loads of <br />features, too. Check out the samples:<br /><a href=http://verticalmoon.com/products/swfnslide/samples.php><br /><br />It's cheap and easy to figure out.<br /><br />-- <br />Cheers  Martin

  • What is the best way to design a simple form that is captured in structured accessible database/file?

    Hi there,
    I need to design a simple form to capture some data from the users. This data shall be able to post into structured database where I can connect to the content to grab the data automatically every night.
    What is the simple recommended way to do this?
    Thank you

    I will agree with Margriet Bruggeman, But if you want to have a collaboration with these data with security, then "Business Connectivity Services (BCS) " could be another option. It need more config/development but it has own use too.
    Few detail links
    A
    step by step guide in designing BCS entities by using a SQL stored procedure (Jyoti Saikia)
    Business Connectivity Services (BCS) Overview
    If SharePoint list form will be only data entry interface then go with InfoPath, if not then BCS
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • What best way to create a simple DB based GUI application

    Hi
    I want to develop a small home-use DB GUI application. My questions relate to the GUI:
    1. If I want a main window to be a form containing mainly several text fileds (with labels attached) and a search button - what best layout manager would you reccomend?
    2. For good-practice programming I want to seperate my backend layer from the UI layer. Is there a good design pattern on how to do so?
    Thanks

    what best layout manager would you reccomend?Use a combination of Layout Managers to get the job done. See some example from the Swing tutorial on "Using Layout Managers":
    http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html

  • Best Way to Make a Simple Java Program Configurable?

    I have a java program that does some stuff involving a database. It's basically a script, but I chose to use Java because of the nice JDBC facilities. Anyway, I plan to schedule a task to have the java program executed daily, but it would be nice if I could configure it without having to recompile the program every time. By configuration, I mean remembering about 6 lines of text, such as database connection address, user-name, password, spread sheet to update, etc. Since I am storing a username and password, I should also encrypt the data. Is there some standalone Java program that is made for creating config files, which would be encrypted and have some sort of an API to access all the data stored in the config file? I am basically thinking of a savable hashtable of Strings mapping keys to values where the values can be configured by some standalone application that allows the values associated with each key to be changed, preferably through a GUI. I could make this, but I figured there may already be something that does this.

    SNYP40A123 wrote:
    Only thing I still need is some way to hide the password that I plan to store in it.That's a completely separate issue. There could be a lot of discussion on this but basically you can't reliably hide a password that you store somewhere no matter what you do. You can do things that will prevent the idly curious from knowing it but it's a lot harder to prevent the determined cr&#97;cker from knowing it.

  • What's the best way to do a simple click-to-enlarge photo?

    The slideshow and presentation widgets seem a bit elaborate for the purpose.

    Hello,
    Take a look at this post: http://forums.adobe.com/thread/1191086
    Cheers
    Parikshit

  • Best way to perform third party app integration in version 4.6

    I am working with a third-party vendor offering a freight and transportation rate software (Bourque Rateserver and Railtrac). 
    From our 4.6 system, we need to perform relatively simple remote SQL statements (inserts, call stored procs, reads).  We attempted to code these operations with EXEC SQL abap statements, but ran into permissions problems on the remote system.  We do not want to deploy middleware (XI, other EAI tools).  Can anyone provide thought on the best way to develop this simple integration?

    Hi Robert,
    We have a very similar requirement... to call a stored procedure on Borque RAILTRAC system to get the Rail Freight Rate at the time of creating a Sales Order. Can you please give me more details on how you have implemented the call to the stored procedure and how the RFC connection is established? Thanks a lot.

  • 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

  • What's the best way to get user testing of our app (we're based in the UK)

    Hi all.
    We've just developed our first app for Palm and would really like to get some feedback from Palm users (our app allows users to take photos and send them as real printed postcards. We'd be very happy to give users free postcards in exchange for feedback).
    The problem we have is that Palm users are pretty sparse in the UK. We've found that user testing with non-Palm users becomes handset testing rather than app testing. We have to teach them how to use Palm ("Where's the back button?") and so the testing mainly focuses on the particularities of Palm rather than our app. Plus, we don't benefit from the user being able to compare to other Palm apps.
    Any advice on the best way to get feedback from Palm users? Especially as they'll need to download the SDK and install our app using it in order to get it onto their phones.
    If any of the users of this forum are interested in giving the app a go and sending us feedback, I'd love to send you the IPK and then chat. Just send me an email using [email protected]
    Our app is available for Pixi+, Pre+ and Pre2.
     Thanks,
     Freddie.
    Post relates to: Pixi Plus p121ueu (SFR)

    Hello freddie:
    Welcome to the Palm Forums. Thank You for the offer. I highly suggest offering it up
    to our many enthusiasts on Twitter as a beta with the #webos hashtag or joining
    the Precentral.net community and list it in a topic there, homebrew beta. You would
    get better beta response if you Package your app and put it in an ipk to simplify
    the install.
    Hope that helps... Best of luck with your app!
    notimeoff

  • Whats the best way to get a copy of a clients DB onto an internal test DB?

    Hi there
    We have a client who hosts an Oracle 9i DB in house and we need to get a copy of this DB onto our own servers for testing purposes. What is the best way to go about doing this?
    I was reading about the data pump for exporting and importing [http://www.exforsys.com/tutorials/oracle-10g/oracle-10g-using-data-pump-export.html]
    Would this meet my requirements and how easy is it to do? Also what type of export would I need to do (there a 5+ schemas using different tablespaces)
    Sorry if this is all a bit vague, but i am not a DBA and have been tasked with doing this :(
    Thanks in advance,
    Toby
    edit: sorry i meant a 9i DB
    Edited by: redeye on Nov 5, 2009 11:21 AM

    If you want to export schemas/objects from 9i db you wouldn't be able to use datapump for exporting them,although you can import the dump file that will be created using the datapump.
    Determine what schemas you need at the test(destination) database, and then export them from the source(clients db) database.
    Also make sure that on the target database server, os paths where the oracle related files will be created(redo logs,datafiles...) are the same as the ones that are on the source database.

  • Best way to transfer application from Test Environment to Dev. Environment

    Hi All,
    We are try to create an application on Hosted Environment similar to www.apex.oracle.com.
    We got two work space
    1. app_production
    2. app_test
    My application will have 200+ tables and many other supporting object.
    My question is in hosted environment what is the best way to copy application from test to production environment (P.S In hosted environment I can uses SQL Developer / TOAD or any other tool .. its similar to www.apex.oracle.com)
    With my present workaround I have to use
    Go to Utilites -> Generate DLL
    and then export this and application..
    The main problem is 200+ table and associated structures .. its very difficult to keep track ...
    Can anyone suggest me any good way for HOSTED ENVIRONMENT

    Hi,
    Just an idea:
    1 - Do a DDL export of the source env
    2 - Do a DDL export of the target env
    3 - Use some tool to compare those files and highlight the differences. There are even some tools that are smart enough to generate SQL statements to apply the differences in the target env.
    I hope this helps.
    Luis

  • Best way to update through testing repo

    As I am finding out, there are certain limitations to pacman. I enabled the testing repo to try out xorg 1.7, and to see if this could help with my X delay at startup. I enabled the repo and installed xorg, gcc, and among other packages. My problem is, I dont want the testing repo enabled by default. So I comment out testing from my pacman.conf, and now I cannot upgrade without dependency errors.
    Should I have used the ABS to install xorg 1.7...? Now I would like to disable the testing repo and be able to still sync and upgrade as normal. Am I missing something here...? Since I upgraded all packages from the testing repo, and now all my revisions are newer, and when I disable the repo to prevent any other updates, I am now unable to upgrade normally...  So... what is the best way to upgrade through the testing repo..?
    Last edited by StanIsTheMan (2009-10-23 10:15:00)

    Allan wrote:
    You can revert all packages to versions in [core]/[extra] by using "pacman -Suu".  Otherwise, you need to wait for these to move out of [testing].
    What problems are you observing?
    I didn't necessarily want to downgrade all of the packages I upgraded through the testing repo. It was after upgrading the packages from the testing repo, and then commenting out the "testing"  in pacman.conf, and then trying a normal 'pacman -Su'. I was then receiving errors on dependencies that were not met, and was refusing an upgrade. (which i can understand, since the testing db is being ignored, and the revision numbers are different and would cause conflicts)
    I have reverted back to the earlier versions from the upgrade with a 'pacman -Suu'  Now what is the proper way to upgrade just xorg..? Should I use the ABS..? I dont want to enable the testing repo, because if I do, It wants to pull in all of the testing branch that I dont want. So really my original question is... What is the bet way, or proper way to upgrade a package from the testing branch...?
    Last edited by StanIsTheMan (2009-10-23 10:40:00)

Maybe you are looking for

  • Mixing RAM types on my new MacBook Pro

    Hello all, Just purchased a week 44 Mac Book Pro (Core Duo Only), and so far, everything is good, no cpu whine, no screen whine (though I think those issues were solved by this revision). I wanted to know, is it possible to take the 1GB of the ddr2 p

  • Error while trying to synchronize Audio

    Dear Garageband Gurus, I stand in need of your expertise. Specs: Garageband Version 10.0.3 Apple Specs: Here's context of my problem first: During a live seminar, I am recording three tracks in Garageband, they are connected to an audio/usb MIDI devi

  • Error when trying to view historical versioning

    when I try to see the history of versioning a file versioned by svn this error occurs, and I can not see the history version of sql dev: 2.1 org.tigris.subversion.svnclientadapter.SVNClientException: org.tigris.subversion.javahl.ClientException: svn:

  • Message Resource Error

    Hi, I've written a Struts application which uses i18n, I'm getting the following exception javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE      org.apache.jasper.runtime.PageContextImpl.doHandl

  • I have too much fonts installed in my computer.

    In may computer I have many programas that installed fonts, like Photoshop, Corel Draw, Microsoft Office, Adobe Acrobat and others. There are hundreds of fonts installed, and the performance is going down. I want to delete ALL the fonts and then inst