LabVIEW and Set Operations

Hello all,
I am a student at the University of Texas @ Austin and I have been
looking through the LV 5.0 documentation for any documentation about
Sets and/or Operations on Sets but cannot find anything usefull. Does
anyone know if LV supports Sets and operations on Sets, for example,
Union, Intersection, or just a way to specify the elements of a Set? I
have an assignment to create a Non-Deterministic Finite State Machine
Simulator and would like to implement it using LV? I have some ideas on
how to Fake the set operations but it would be much easier to not have
to re-invent the wheel. I will check the newsgroup, but please also
respond to [email protected]
Thanx in advance Jeffo ....

"Jeffrey R. Orbach" wrote:
> Does anyone know if LV supports Sets and operations on Sets, for example,
>
> Union, Intersection, or just a way to specify the elements of a Set?
There are probably a number of ways to implement this in LabVIEW, depending
upon what kind of data you want in your sets, what kind of operations you
want to perform on them, etc. It's a pretty open-ended question without
more detailed knowledge of what you're after.
From my point of view, the LabVIEW array structure and its operators are a
construct that provides some set-like functionality right away:
specify set elements => array control on panel
check for membership => Search 1D Array
set union => Build Array (followed by Sort 1D Array if you want to keep the
set sorted)
set intersection
=> loop through one array using Search 1D Array on the
other to generate output set
This is one simple approach that shouldn't require a whole lot of coding or
wheel reinvention...
Regards,
John Lum
National Instruments

Similar Messages

  • LV 5.0 and Set Operations

    Hello all,
    I am a student at the University of Texas @ Austin and I have been
    looking through the LV 5.0 documentation for any documentation about
    Sets and/or Operations on Sets but cannot find anything usefull. Does
    anyone know if LV supports Sets and operations on Sets, for example,
    Union, Intersection, or just a way to specify the elements of a Set? I
    have an assignment to create a Non-Deterministic Finite State Machine
    Simulator and would like to implement it using LV? I have some ideas on
    how to Fake the set operations but it would be much easier to not have
    to re-invent the wheel. I will check the newsgroup, but please also
    respond to [email protected]
    Thanx in advance Jeffo ....

    Tom Impelluso wrote:
    >
    > Hello
    >
    > Due to interncine battles between various system admin. people,
    > I have a problem.
    >
    > I have written a vi in lv 5.01, but must run it on a PC running
    > lv 5.0
    >
    > It uses facilities common to both so it should open on the PC with
    > 5.0, yet there is an error message
    > when I pull up the 5.01 vi with 5.0
    >
    > Is there a way I can go back to the 5.01 and save it as a version
    > 5.0 file?
    >
    > (yes, much easier to: load 5.01 on the PC, but that would involve,
    > warlocks, spells, and the power of conflicting system admin. people;
    > short of a kludge, I may have to re-write teh VI)
    >
    > Tom
    Nevermind!
    Figured it out.
    Sorry to post pre-maturely
    Tom

  • Joiner and Set Operations

    I have a situation where source table A contains 3 code columns. The descriptions for the codes are contained in 3 different reference (lookup) tables. I want to denormalize target table B to include the descriptions for the 3 codes (as well as all columns from source table A).
    How do I design the mapping to include reference (lookup) tables code descriptions?

    You can use the key lookup mapping operator to get the values from the lookup tables on the fly. I.e. draw a connection from the source 'code' column to the key lookup operator, configure the key lookup operator to point to the appropriate lookup table with the correct lookup condition and connect the output of the key lookup to the name/description target column. The same 'code' column that you connected to the key lookup, you can now also directly connect to the code column in the target table.
    Regards:
    Igor

  • Is it possible through labview to set and read window¿s based file properties​?

    Any file in XP operating system has file properties associated with it, such as, size, location, when the file was created, modified and last accessed. I know that Labview has the ability to access the size and modified property. Other file types such as image format types jpg, bmp and tif have additional associated properties such as: title, subject, author, and comments. Is it possible through labview to read and set these properties programmatically?

    Hpopenoe wrote:
    > Any file in XP operating system has file properties associated with
    > it, such as, size, location, when the file was created, modified and
    > last accessed. I know that Labview has the ability to access the size
    > and modified property. Other file types such as image format types
    > jpg, bmp and tif have additional associated properties such as: title,
    > subject, author, and comments. Is it possible through labview to read
    > and set these properties programmatically?
    Well, you can most probably do that by calling Windows API functions.
    Note however that the properties you mention are not generic Windows
    file properties but file specific internal attributes. Explorer does at
    least in XP handle some of those properties and shows them to the user
    but does so with internal file type handlers to extract the properties
    from the file.
    I'm not sure those file type handlers are actually available for other
    applications than Explorer without quite some work. If they are
    available they are certainly not part of the standard Win32 API but most
    probably part of the Windows shell component and I would guess not just
    through normal API function calls, but through the shell namespace
    enumeration, which is built on COM interfaces, something you only can
    call from standard programming languages, most of them are done in C++
    (and if you are a little more persistant in standard C).
    So you are likely to need to either write your own DLL doing the nitty
    gritty work of calling the shell interface and using that DLL in LabVIEW
    or find an Active X component which does the work for you. No doubt
    there is such an Active X component somewhere but how good and expensive
    is always a big question.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Out of scope error while attaching the attribute set and the operating unit

    Hi,
    Am getting the out of scope error when am trying to attach the attribute set "/oracle/apps/fnd/attributesets/HrOperatingUnits/OperatingUnitName_Transient"
    and the operating unit lov "/oracle/apps/fnd/multiorg/lov/webui/OperatingUnitsLovRN" from my page in JDeveloper.
    Can anyone help?
    Thanks

    Mostly
    It would just be a warning message you can proceed with it there are no issues.But if its an error please do as mentioned by Reetesh.
    Thanks
    AJ

  • Plot different data set depending of some conditions using labview and veristand

    Hi Community,
    i have a couple of points saved as XY data points on my desktop.  The files are save as csv.  the idea is to read the file utilizing the Read From Spreadsheet File vi when some conditions are met and then plot the XY data wiht XY Graph Addon of the veristand workspace.
    for instance:
    if case 1 is true read the corresponding file and then plot the first set of data
    if case 2 is true read the corresponding file and then plot the second set of data
    if case n is true read the corresponding file and then plot the n set of data.
    Could you give some advices how to implement it (Labview and Veristand)?
    I'm using LV and NIVS 2012
    Thx
    Mich
    Attachments:
    vide.vi ‏35 KB

    Hi Michel,
    I believe the easiest method will be to use the VeriStand .NET API to call into VeriStand and utilize LabVIEW for creating the decision making cases that you have.  I have attached some examples of using the VeriStand API in LabVIEW.
    Using the NI VeriStand .NET API in LabVIEW to Control a VeriStand System
    https://decibel.ni.com/content/docs/DOC-32268
    Where Can I Find LabVIEW Examples Using the NI VeriStand API?
    http://digital.ni.com/public.nsf/allkb/E1066949FA67B6CE862578A7005988D5?OpenDocument
    Please let me know if this helps.
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • How to sample an analog signal, simulated on labview and get the sample values.

    My project involves this particular detail where i have to sample a simulated sine wave and get the samples and compare them so as to select a particular length for hanning window.Then it also requires me to experiment with the window size so as to get more efficient data out of the sampled signals. please help me with the sampling part and guide me as to how to perform a hanning window operation on the sampled signal. I have directly used the spectral analysis tool which involves getting a FFT spectrum by a default hanning window setting. But since i have to experiment with the window size and variations, guide me with the sampling part and applying a separate hanning window. Thank you.

    bhardoo wrote:
    My project involves this particular detail where i have to sample a simulated sine wave and get the samples and compare them so as to select a particular length for hanning window.Then it also requires me to experiment with the window size so as to get more efficient data out of the sampled signals. please help me with the sampling part and guide me as to how to perform a hanning window operation on the sampled signal. I have directly used the spectral analysis tool which involves getting a FFT spectrum by a default hanning window setting. But since i have to experiment with the window size and variations, guide me with the sampling part and applying a separate hanning window. Thank you.
    What do you mean by i have to sample a simulated sine wave?
    the sine generator will provide you with a waveform (or an array of values you can use), there are basic  vis to do all this, rigth click on the vi and select help to get detailed information.
    Post your vi if you have trouble with details.
    How much do you know about LabVIEW and signal theorie?
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • How to detect a lost TCPIP SOCKET using LabVIEW and NI VISA

    I am using VISA functions in LabVIEW to remotely communicate with instruments over TCPIP SOCKET visa resources.   In general this all works well by simply creating a resource name, passing it to VISA Open and then setting a couple of session attributes.   Occasionally an instrument will be reset or power cycled and what I have noticed is that I need to call a VISA Close and then reopen the resource in order to get it to communicate again or close LabVIEW and run again.   If you just use VISA Open without calling a VISA Close first you cannot communicate with the target.   The problem is that I have no way of detecting this condition.   I have tried always calling a VISA Close before VISA Open and this seems to work for this condition but it seems odd to always close a session before opening it.   Why does VISA OPEN not work under this condition and is there any way to detect this situation?
    Solved!
    Go to Solution.

    It works that way because that is how TCP works. A TCP connection is a dedicated connection between two endpoints. Unfortunately other than getting an error from a read or write operation there is no way to determine if the othe rside of teh connection is still there. You need to close the connection because otherwise VISA will continue to use th eold connection which is no longer valid. Closing it allows the system to cleanup the dead connection.
    If you are communicating fairly infrequently you could simply open the connection, do you stuff and close it. The overhead for establishing the new connection is not that much. If you are using steady streams of data then you will need to watch for the errors and then reestablish the connection by closing the old one and opening a new connection as you have observed.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Problem in Adhoc Query's set operation functionality.

    Hi Experts,
    I am facing problem executing Adhoc Query's set operation functionality.
    In Selection Tab, following operations are performed :-
    Execute a query and mark it as 'Set A'.(Say Hit list = X)
    Execute another query and mark it as 'Set B'.(Say Hit list = Y)
    In Set operation Tab, following operations are performed :-:-
    Carry out an Operations 'Set A minus Set B'.
    which results in Resulting Set = Z.
    Transfer the resulting set 'in hit list' and press the copy resulting set button.
    In Selection Tab, Hit list is populated with Z.
    And when output button is pressed, I get to see 'Y' list and not 'Z' list.
    Kindly help.
    Thanks.
    Yogesh

    Hi Experts,
    I am facing problem executing Adhoc Query's set operation functionality.
    In Selection Tab, following operations are performed :-
    Execute a query and mark it as 'Set A'.(Say Hit list = X)
    Execute another query and mark it as 'Set B'.(Say Hit list = Y)
    In Set operation Tab, following operations are performed :-:-
    Carry out an Operations 'Set A minus Set B'.
    which results in Resulting Set = Z.
    Transfer the resulting set 'in hit list' and press the copy resulting set button.
    In Selection Tab, Hit list is populated with Z.
    And when output button is pressed, I get to see 'Y' list and not 'Z' list.
    Kindly help.
    Thanks.
    Yogesh

  • Set operations in AdHoc Query - user settings

    Hi
    I am checking out the Set operations in AdHoc Query.  The documentation says you should save the setting "Set operations shown" as a user setting.  Could anyone advise me where this is set?  I can't find a parameter for it, and can't find it in the regular settings.
    Any help appreciated.
    Kirsten

    The save is automatic upon exiting Ad Hoc query.  Once you do "Show Set Operations", work on a query, save and exit, the next time you open Ad Hoc query, Set Operations tab is displayed by default.
    Regards,
    RN.

  • Please Help!!! VIPM won't connect to labview and I need to figure out why

    I am trying to download the Arduino package from the VIPM and they won't seem to connect. I have included a picture of the error and two more of my settings. I am using the student evaluation of the Labview software, but I'm not sure that it is what's causing the problems. Any help would be appreciated, as I would like to set up a nice GUI using labview and an arduino as my DAQ device. I need this for a project for my professors so I am rather desperate to get it up and running.
    Attachments:
    Labview Error.jpg ‏352 KB
    Labview Error II.jpg ‏141 KB
    Labview Error III.jpg ‏108 KB

    No, i tried using you settings and stil not working. i went through every combination of the four items I have on the machine and export list. Still nothing, do you think that its that i am using the student version?
    Attachments:
    New Labview settings, not working.jpg ‏123 KB
    New Labview settings, not working.png ‏267 KB

  • Find text from a file and set it as a variable in applescript?

    I am trying to build a script that sends me updates and notifications from cex.io. Please keep on reading below, so I may guide you until the point I have trouble with.
    The first simple script in this operation goes to cex.io's trading page for BTC/GHS. It records ands saves the text to a file every 4 seconds. It works great. It doesn't need to have safari refresh because the site pushes info to the browser live.
      repeat
              set the webpage_content to ""
              tell application "Safari" to set the webpage_content to the text of document 1
              set theText to webpage_content
              set a to "Macintosh HD:Users:PRIVATE:Desktop:CEX:"
              set theFile to (open for access file ((a) & "CEXRaw") with write permission)
              write theText to theFile
              close access theFile
              delay 4
      end repeat
    And it returns this from the site to this main file every 4 seconds: (note I cut off a chunk from the bottom and the top of the file, because they are unimportant)
        GHS:
        0.05233439
        BTC:
        0.00000223
        NMC:
        0.00002939
        LTC:
        0.00000000
        GHS/BTC
        0.02362958 LTC/BTC
        0.02438131 NMC/BTC
        0.00597565 GHS/NMC
        3.96951800 BF1/BTC
        1.67000000 Fund Account
        GHS/BTC
        Last price:
        0.02362958
        Daily change:
        -0.00018042
        Today's open:
        0.02381000
        24h volume:
        73812.35539255
    I now need an applescript to read that file, and return wanted values. But I'm lost on how to write it.
    It needs to find the number under BTC, and set it as a variable.
    It needs to find the number under GHS, and set it as a variable.
    It needs to find the number under Last Price, and set it as a variable.
    If anyone could script that really quick for me, or tell me how to do it, that would be amazing. Thank you so much!

    Couldn't tell if you had any whitespace in the lines (i.e. is there a space before or after GHS:), so I used contains, not is.  Also, if you have a line such as GHS/BTC with a colon GHS/BTC:  then it will also fail (as contains "BTC:" would be true for BTC: and GHS/BTC:)
    However, this will give you some guidance:
    set a to "Macintosh HD:Users:PRIVATE:Desktop:CEX:CEXRaw"
    set x to 0
    set Names to paragraphs of (read file a)
    repeat with nextLine in Names
              set x to x + 1
              if nextLine contains "BTC:" then
                        set BTC to item (x + 1) of Names
              else if nextLine contains "GHS:" then
                        set GHS to item (x + 1) of Names
              else if nextLine contains "Last Price:" then
                        set lastPrice to item (x + 1) of Names
              end if
    end repeat

  • Set operations & tables with different columns

    I have a problem. I have 3 tables - Countries, Locations & Departments. I want to output the country_id and country_name from the countries tables for countries that have no departments. Locations has country_id and location_id columns and departments has location_id and department_id columns. All is in Database 11g. I can produce a table which gives me the locations with departments or without departments as follows:
    select location_id from locations intersect select location_id from departments;
    This gives me a list of locations with departments. Conversely I can get a list of locations without departments as follows:
    select location_id from locations minus select location_id from departments;
    However, to combine this output with the countries table I need to produce country_id in the output. However, when I try to add country_id to my code from above as follows:
    select country_id, location_id from locations intersect select to_char(null), location_id from departments;
    I get no rows found. I understand why. There is no intersection between country_id in locations and the null output from departments (where there is no country_id column). Alternatively, if I try as follow:
    select country_id, location_id from locations minus select to_char(null), location_id from departments;
    I get rows with every country_id whether they have departments or not. Again, I understand why. I am essentially subtracting nothing (the to_char(null) from departments) from the country_id column in locations and getting the entire country_id column as output.
    How can I use set operations to produce the country_id column? I also do not want to show the location_id problem.
    This problem is repeated when I try for the final country_id, country_name final output. The countries table has these columns. However, the locations table does not have the country_name column. It only has the country_id column. So a query such as this one:
    select country_id, country_name from countries intersect country_id, to_char(null) from locations;
    presents me with the same problem as above. The country_id column intersects nicely, but the country_name file does not intersect as it does not exist in the locations table. Again, how can I use set operations to produce the country_id and country_name columns.

    Hi,
    the method I outlined for you above should be fine. It doesn't matter that there are one-to-many relationships which may cause repeated output rows; set operations (except for UNION ALL ) always return distinct rows.
    Can you do a query on the countries table, that shows all countries?
    Can you do a query involving all 3 tables inner-joined, that shows the countries that are related to locations and departments? (Repeated rows are okay.)
    Then you can do a MINUS, to get only the countries that are not related to departments.
    If you get stuck, post a little sample data (CREATE TABLE and INSERT statements), the results you want from tha data, your best attemptat a query, and a description of the problem (including the full error message, if any).

  • AdHoc Set Query - set operations - practical use

    Hi
    I am writing a user manual about AdHoc Query - including Set operations. I am looking for good examples when to use the different operations.  A-B is easy.  Example - 'give me all employees that are not on maternity leave'.  But I am struggling with good practical examples on when to use Union and Intersection.  It needs to be examples that cannot be covered by selection criteria in one single query.
    Does anyone have any good practical examples?  Any help appreciated.
    Kirsten

    Hi Kirsten,
    I use Set Operations many times to find individuals who do not have a certain infotype or plan.  Example:  Find all retirees who are not enrolled in a medical plan.  Group A = All retirees;
    Group B = All retirees in a medical plan.  A - B = Retirees with no medical plan coverage. 
    Ad Hoc Query does not allow you to use "Or" logic in selection with different criteria.  A Union could be used for this.  An example would be employees who are in pay Grade 1 - 5 (Group A) or earn less than $50,000 per year (Group B).  Intersection would be those in Grades 1 - 5 and earn less than $50,000 per year. 
    Paul

  • How to activate Show Set Operations in Ad Hoc query

    When I go into ad hoc query using an infoset I created the Extras > Show Set Operations and Switch off object selection functions are greyed out and I cannot select them.  On another infoset these functions are available for selection.
    Is there some setting in the info set creation that allows these function to be available for selection?

    closing question

Maybe you are looking for

  • Overdue amount in Customer Receivable Aging report

    Hi all! Got a question. In customer receivable aging report SAP Business One displays the relevant open receivables in columns representing the specifications you made in the Interval field in the selection criteria window. But how does it counts the

  • Problem with TREX 7.0 : HTTP Server is not working

    Hi all, I have installed TREX 7.0 recently(Windows XP Pro, with IIS 5.1). I'm having portal installed in the same system(NW04s). After this installation I found that status of httpserver is red, rest all servers are having green status. I checked it

  • JDBC-Adapter-Receiver Calling Stored Procedure with Input-Typ Record

    Hallo, I´ m trying calling a stored-procedure with two input-parameter; one of typ record (oracle) and one of type tabel of records. Is this possible (I think there are only types like string, integer etc. possible)? When not is there another possibi

  • Got subscription to make unlimited calls to USA ke...

    Keeps saying I need credit, but  I have subscription for unlimited calls to Usa.If phone I want to call is registered in UK, but is being used in USA, what do I register it as and what is the code?

  • CD Stuck in iMac Disc Drive, Mechanical Problem

    I, surprisingly, could not find a good solution for this on Google because of the vast number of people with software-related disc jams and bad tutorials. I put a Windows 2000 recovery disc in my Mac so I could test to see if I could make a disk imag