Allow boolean arrays as input for "Array Min & Max"

The Array Max & Min function is quite versatile, but for some reason it does not accept boolean arrays. This restriction make no sense at all. Since we can easily sort boolean arrays, this function should work too! It would come in handy for example if looking for the position of a single TRUE in a 2D array (search only works for 1D arrays!). Array min & max would simply return the index pair of the first TRUE found. As a workaround, we currently need to insert a "boolean to 0,1" to get the same effect. This seems unecessary.

> I have to disagree with the need to do this LabVIEW prides itself of function polymorphism, but there are these nagging little holes that give you a broken wire for no obvious reason at all. Sure there are workarounds, but the beginner programmer might construct a horrible Rube Goldberg style workaround, full of duct tape and bailing wire. We can sort boolean arrays so there is a clear order between TRUE and FALSE ---> there is a MAX and a MIN and the function should return it. Note that Array Min&Max even works for string arrays, where it outputs the lexically sorted first and last array element. (Hey, I did not know that, could be useful sometimes!). Not allowing boolean array inputs is an unnatural exception and should be fixed.  A similar case is described in this suggestion (which did not get much attention either)

Similar Messages

  • Vendor details for a Min Max requisitions

    Hi All
    When Min Max trigger some requisition interface lines, we need to get the vendor details also be populated,
    What set up it need to get these. Because when I run a Min-Max planning report, I am not getting the vendor details.
    What we have is we will be having a single item be with a single vendor and vendor site
    Please help.

    In the General planning tab for Sourcing type is it mentioned as Supplier?
    Is the use ASL flag in the Purchasing tab for the item enabled?
    The supplier and site details are active?
    The ASL for this item is still active ? (Check in the supplier line details in the ASL form)
    My funtional guy says yes to all the above quries.
    And also says All ASL have the sourcing rules assigned to the assignment set that is setup on the MRP: Default Sourcing Assignment Set profile, but this scenario is only for minmax
    So this issues is only for MIN-MAX.Please let me know if any thing to be done in setup to automatically get the
    vendor details into requistions lines of interface table based on items.
    Edited by: 834095 on Mar 14, 2011 2:59 AM

  • Audio input for mac mini

    Well thats it i have made the move and i am now a proud owner of a new mac mini but i have a problem i cant to connect my four track recorder to my mac so as i can record all my music to disk, is there a way around this maybe somekind of usb conector, grrr i'd hate to get rid of my mac just for that reason but its really important to me.
    Oh and are there any good free anti virus programs out there for mac.

    ...connect my four track recorder to my mac so
    as i can record all my music to disk, is there a way
    around this maybe somekind of usb conector
    Yes, there are many products you would buy. Some connect
    to the USB others to the Firewire ports. the low end starts at $30 for an "iMic" but if you want professional quality
    audio and it sound like yu might if you own a four track mixer then you'd be looking at spending about what you'd expect to spend for another piece of professional audio gear. Actually it's not that bad. $170 will get you a quality audio device with XLR inputs and all that conects the firewire. There guys have a good selection of gear www.m-audio.com
    As for anti-virus software. First you need to find a virus. So for there ain't none. So while there are a lot of companies trying to take your money and will sell you software the stack of virus profiles that the software uses is pretty thin. The trick with Mac OS X is to make a logon account for yourself that is NOT an administraitor account and use that account for day to day use. The normal protection offered by non-admin acount will keep you pretty safe
    grrr i'd
    hate to get rid of my mac just for that reason but
    its really important to me.
    Oh and are there any good free anti virus programs
    out there for mac.

  • Min/Max never-ending loop

    I am trying to stream data off a real time module and then perform some calculations on it. I am reading the data through a front panel on my PC. I want to find a way to measure the max and the min of each data stream. I constructed the attached VI to do that. Since the loop does not end, the data gets stuck in the loop and no more data is read from the real time module. I cannot end the loop because then the max/min calculations will end. I have thought about storing all of the information in an array and then using the array min/max VI to do my calculations, but this would be extremely inefficient because I need my model to run for hours on end. Is there a way to calculate minimums and maximums without a loop or storing everything in an array? Sorry for the newbie question.
    Attachments:
    max test.vi ‏27 KB

    You are close to your solution. You need to wrap you data acquisition code with something similar to this loop. The way it is now the data is only read in once, then as you note it is stuck in the array. Another thing is the initializing values. If you make both of them 0, and use the same type as the input data, they will immediately show the min and maxes. Additionally, you can make your comparisons G.T or L.T rather than G.E. or L.E. Another method, if you can't put the data acquisition in this loop would be to make it a "LabVIEW2 style global", consisting of three states, initialize, write, read. The vi is called, with the initialize method before the DAQ loop, the write is called right after your DAQ, and in another loop the read is called.
    Putnam Monroe
    Senior Engineer - North Shore Technology, Inc.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion
    Attachments:
    MinMax.vi ‏45 KB

  • Min/Max  Internal Orders 1 Requisition

    We are running Min/Max planning to replenish stock in an "Emergency Warehouse" organization. The requisition import kicks off internal orders to a replenishment organization. The planner in the replenishment organization would like one order for each Min/Max run. The requisition group-by default in Purchasing parameters is vendor yet we are still seeing one unique requisition for each item thus creating one unique internal sales order per item. Thoughts?

    Stick wrote:
    The requisition group-by default in Purchasing parameters is vendor yet we are still seeing one unique requisition for each item thus creating one unique internal sales order per item. Thoughts?In this case the requisitions will not be grouped by Vendor because the supply source is Inventoy which is creating internal requisitions and not purchasing requisition (source is Supplier/ Vendor).
    It is important to know how you are importing requisitions and what value is specified for Group By parameter during import. The value you setup in Purchasing Options defaults in the Requisition Import request parameter screen, but this can be changed before submission. So it is possible in your case that requisitions are imported using a different group by than what is specified in Purchasing Options.
    From the list of different group by options available (All, Buyer, Category, Item, Supplier) you can probably use 'Location' during requisition import.
    Location: Group requisition lines for each delivery location on a separate requisition.
    But this will not guarantee 100% success because:
    - If you import requisitions with source as INV then those can include requisitions from different INV sources generated from Reorder, Kanban etc having same delivery location. In that case all those requisitions will be grouped under a single header having same location.
    - there may be different users running requisition import manually and some may forget to change this group by parameter (defaulted from purchasing options) while importing Min-Max planned requisitions (again they cannot segregate Min-Max, they can just specify INV as source)
    A better solution would be to use the oracle provided custom hook (po_reqimp_pkg.post_validate_user_extensions) for requisition import to populate the GROUP_CODE column in PO_REQUISITIONS_INTERFACE table. The logic inside the hook should identify the rows in the interface table generated from each run of Min-Max and populate a unique value for all those rows in the GROUP_CODE column. You need a small piece of code to be added inside the hook.
    You can also use REQ_NUMBER_SEGMENT1 column in the interface table to populate an unique value for all rows you want to group together. But in this case the value you specify will become the requisition number if there are no conflicts with the requisition number rule. Both these column, when populated, have precedence over Group by parameter. 1st priority GROUP_CODE (if populated). If GROUP_CODE is not populated then it checks REQ_NUMBER_SEGMENT1. If this is also blank then it uses Group By parameter.
    Thanks
    Supro

  • Min & Max level

    Hi
    My client insist on the maintenance Min & Max level at storage location, however i can not maitain in standard MM.
    If i develop a separate application for maintaing Min & Max level what will be the effects on MIGO when i do Issue or Receipts.
    In this senario i will have to develop an additional check on every Movement of Materials (Issue & Receipts).
    Kindly help me out.
    Regards
    Muhammad Tahir

    Hi Tahir ,
    As said by you . the requirement cannot be fulfilled in MM.
    You may try at BIN level provided WM is implemented in your Org.
    As a storage location may consists of different materials with different stock units ( Min and Max levels will again differ ) , i doubt your req may not be fulfilled .
    Regards
    Ramesh Ch

  • Find MIN, MAX of multiple rows from multiple columns

    Hello,
    I need to figure out how to pull the MIN/MAX of multiple rows from multiple columns into one column. Even if some are NULL/blank.
    For Example: (C: Column, R: Row, N - NULL/Blank)
    C:____1____2____3____ 4____Max
    R:____20___22___13____4____*22*
    R:____N____N____32____14___*32*
    R:____N____12____N____N____*12*
    That is, it always gives a value for MIN/MAX unless there are NO values in all the rows of the columns.
    So if there is one value, it will select that for the MIN/MAX, as it's the smallest/biggest since there is nothing to compare it to.
    Here is my current code:
    CASE WHEN COLUMN 1 < COLUMN 2 THEN COLUMN 2 ELSE COLUMN 1 END

    Hi Thank you for your feedback, unfortunately, I just found out that EVALUATE Function is disabled in our environment for security reasons, so the only other way I've discovered is this:
    The problem is that none of the conditions in the case statement are met--so the column is set to null. You can add a WHEN statement (section 2 below) to catch the nulls. There are five cases to consider:
    Case 1: begin insp > bad order
    Case 2: begin insp < bad order
    Case 3: bad order only (begin insp is NULL)
    Case 4: begin insp only (bad order is NULL)
    Case 5: both begin insp is NULL and bad order is NULL
    1) If bgn-crm-insp-ob > report-bo-ob then bgn-crm-insp-ob
    (Case 1)
    CASE WHEN filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'bgn-crm-insp-ob') > filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'report-bo-ob') THEN filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'bgn-crm-insp-ob')
    2) If report-bo-ob is NULL then bgn-crm-insp-ob
    (Case 4, 5) for case 5, you will get NULL
    WHEN filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'report-bo-ob') IS NULL THEN filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'bgn-crm-insp-ob')
    3) Else report-bo-ob
    (Cases 2, 3)
    ELSE filter ("- Terminal Task Measures"."Task Reported DateTime (Local)" using "Task Detail"."Task Code" = 'report-bo-ob') END
    Hopefully this works, I'll give feedback if it does, or if you have any further suggestions please submit, again, THANK YOU SO MUCH ANYWAYS!

  • 1D Boolean Array to 1D Integer Array conversion for FPGA FIFO

    Hello, I am using a PXI7813R card. I would like to pass some data between the target (FPGA) vi and the host vi using the FIFO. I have a FIFO setup to 1023 "32 bit integer" samples. I have a boolean array of 32000 samples which would be the same as 1000 32 bit integers, that I acquired using the PXI7813R card.  I would like to convert the 1D boolean array to a 1D "32 bit intger" array. This seems like a more a difficult problem than I first thought as the labview functions are reduced when targetting a FPGA device. I have attached a jpg of how I would like to do it. I am getting a "Arrays must be fixed size in current target" error for the output from the array subset function. I know this is because one of the inputs is not exactly a constant, i.e. the index input  for array subset, but regardless of the index, I will only ever be taking 32 bits from the boolean array at any time to convert to a 32 bit integer to then place in the FIFO. Any suggestions of how I may get around this problem would be gratefully recieved. Regards, Michael.
    Message Edited by Michael_Limerick on 02-08-2008 04:54 AM
    Attachments:
    fifo_out1.JPG ‏52 KB

    Hi Daniel,
    Thanks for your reply.
    I had a look at the thread that you suggested and I'm not sure if that would solve the problem I was having, the option box was checked as default. I think my issue has to do with the limitations of the different LV functions when targeting a FPGA device.
    I have decided to take another route anyway, it seems that trying to compile a large array (even a 1D boolean array) for a FPGA target both takes a long time and also a lot of FPGA resources.
    Thanks again for your reply,
    Regards,
    Michael.

  • How to assign values for boolean array in LabVIEW?

    I want assign values for boolean array.Iam not able to do that.For each boolen i want to assign each value.Plz help me......
    Please Mark the solution as accepted if your problem is solved and donate kudoes
    Solved!
    Go to Solution.

    Hi agar,
    values in an array are "assigned" by building an array (using BuildArray) or by replacing values in an existing array (ReplaceArraySubset)!
    Good starting point could be this...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Control caption names for elements of a boolean array

    Howdy, folks
    I'm trying to control the caption names for each element of a boolean array. Can't seem to find the appropriate property node which will index each element to each element in the FOR loop. Please see the attached.
    Sure appreciate the help,
    Hunter

    Creating a text array lined up next to it is of course the simplest solution. If the labels are always fixed, you could just use plain label test on the front panel.
    Here's an example how you can change the labels inside an array of cluster as I mentioned above. (LabVIEW 7.1).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Selector.vi ‏34 KB

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

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

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

  • NSArray for boolean array, define size...

    Hi!
    I have a Class that I'm trying to create...
    The class have a boolean array that I define the size when the class initialize...
    I put an NSArray in the .h file and I try to define the size of the array on initialisation based on a formula with the parameters for the init method.
    I'm so new to Objective-C, I try to do that the same way I did it in C#..:S
    What should I do?
    Where Can I find information about class definition and sample with int or bool array?
    Thanks!
    Fred

    ShrimpBoyTheQuick wrote:
    Hi!
    I think I understand something here..
    In C, I cannot put an unsized array in the .H file and set the size in the init method in the .m file...
    Kinda true, but you can dynamically allocate memory at runtime to hold an array of whatever size you want.
    What I can do is....
    Define a pointer and a size in the .h file...
    Create an array of the good size in the .m file and put the memory address of the array in the pointer and use this array with the pointer and the size value...
    I don't think the code you posted will work right. I believe the "roomArray" that you're creating inside "initWithWidth" is a local variable that will go away once you exit the "initWithWidth" method. So even though you've stored a pointer to it in "arrayPtr" ultimately you'll be pointing at garbage once that memory gets reclaimed and reused by the runtime system.
    What's my problem after this is how do I tell the object to not used the memory of this array after the method is finished?
    Take a look at this discussion of dynamically allocated arrays in C. Basically you'll use malloc() to allocate memory for your array and then later use free() when you no longer need the array. And since you're dealing with width and height you're needing a two dimensional array which becomes somewhat messier.
    Steve

  • How to change the elements number in Number To Boolean Array Function VI

    Hi, I'm working on using the DAQ digital output to control the digital input of a DAC, and I used the Number To Boolean Array Function. VI to convert the number to a Boolean array. The maximum number should be 4096, therefore it should consist of 12 elements.
    For the description of the VI, it says Boolean array returns an array of 8, 16, 32, or 64 elements, depending on the number of bits in the integer. Therefore, I change the number of the channels in task to 16, but it still doesn't work. Any suggesitions are greatly appreciated.
    Thanks!
    Possible reason(s):
    Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.
    When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.
    Number of Channels in Task: 12
    Number of Channels in Data&colon; 32
    Task Name: _unnamedTask<1B>
    Solved!
    Go to Solution.
    Attachments:
    DAC test.vi ‏47 KB

    Once you have the boolean array, you can resize it using array tools. For example you can use "reshape array" with a lenght of 12 to trim the array to 12 booleans elements (you can also use array subset).
    LabVIEW Champion . Do more with less code and in less time .

  • Use boolean array to perform set operations

    I am currently taking a computer science class that uses Java as the language of choice. I have no prior experience with Java. We have a homework assignment in which we are supposed to use a boolean array to implement set operations. We have to create a method that inserts an integer into the array, another that deletes an integer element, and several others. I am confused as how to do this with integers, as it is a boolean array. The datr for this class is:
    private boolean base[];The constructor is:
    public largeset(int size){ }We then have to create a method that inserts an integer into the array:
    public void insert(int i){ }And one that deletes the element:
    public void delete(int i) { }I am unsure how to do this using a boolean array. If it were an integer array I would not have any trouble, but I get an error when trying to insert/delete an integer from the boolean array. Can anyone help point me in the right direction? I would prefer advice only, not the actual code, as this is a homework assignment, and I would like to create the code myself so I actually know what I am doing. Thanks.

    This is the assignment exactly as posted on the course website:
    In this homework, we will use a boolean array to implement various set operations. Please create a class called largeset that supports set operations of any number of elements. The data of this class is
    private boolean[] base;The constructor of the class is
    public largeset(int size);  // create a boolean array of size "size" and store it in "base"The methods of the class are:
    public void insert(int i);  // insert number i into the current set, where 0 <= i < base.length
    public void delete(int i);  // delete number i from the current set, where 0 <= i < base.length
    public boolean member(int i); // test if i is in the set
    public largeset union(largeset B); // return the union of two sets
    public largeset interset(largeset B); // return the intersection of two sets
    public largeset subtract(largeset B); // return the subtraction of two sets
    public largeset complement(); // return the complement of the current set
    public boolean subset(largeset B); // test if the current set is a subset of set B
    public int cardinality();  // return the number of elements in the current set
    public String toString();  // return a string which is a printing of the current setThen create another class called testset that uses the largeset class. At first, please create the following two sets:
    X = { 1, 3, 5, 7, ..., 999 };
    Y = { 9, 18, 27, 36, ..., 999 };
    Please perform the following tests:
    1. display the cardinalities of X and Y, respectively.
    2. display the content of substraction of Y by X.
    3. display the square root of the sum of all the elements of X (Math.sqrt(x) will return the square root of x in double type).
    4. For every pair of distinct elements x and y in Y, compute the sum of (Math.max(x, y) - Math.min(x, y)) (or equivalently, Math.abs(x - y)), and report this sum.

  • Connecting boolean array to case structure

    I would like to connect a boolean array to a case stucture without having to create a seperate control.  I'm sure that this can be done but I'm not sure how.  Thank you for your time.
    Ron Deavers, CLD

    OK, with this information we can probably assume that exactly one of the arry elements is true and you want to know which one. Feed it to "search array" and hook a boolean true diagram constant to the "element" input. You'll get a number between 0 and 3. WIre that number to your case structure and add two more cases so you have one for each condition.
    Also add a case for -1 in the event that none of the elements is true. Make it the default case, just to be sure.
    Let me know how far you get
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • Display thumbnail view of user profile photo in UIview

    I am developing an application where i have to access user profile data from server in XML format, which contains user profile image url also. My problem is that i have to display the photos in a grid like format on the view controller (eg 4 images i

  • Can't export short avi film.

    I can't export even a small clip of finished film. It crashes towards the end of the export. I have a 40 minute film and even to export 4 minutes it crashes. 2 or 3 seconds works OK though. Also it won't update the program on the Cloud.

  • How to implement the security in web service with Weblogic 9.2

    I've generated web service by Web Logic 9.2 using existing WSDL (as per client requirement) and want to add security policy for authentications. I have used following annotation in service class. @Policies({ @Policy(uri="policy:Auth.xml" , direction=

  • I have to activate my apps everyday

    I noticed I have to activate my apps every time I want to use them. How do I fix this? It's SUPER annoying. I have uVerse as my cable provider.

  • Simultaneous wireless ad hoc and infrastructure mode

    Hi When I set up an ad-hoc wireless connection on my Macbook Air, this has the effect of disconnecting from my wifi connection to my router. Is it possible to set this up in a way where I can have both an ad-hoc connection AND remain connected via th