Incrementing 'index array' row input according to bytes received

I am receiving binary data through a UDP port. I'm reading a column of a spreadsheet and I want to extract the consecutive row everytime a further 4 bytes of data is received. I will use the contents of the spreadhseet cell as a condition to format the binary data. I guess i need to count the bytes of data passed then reset the counter every time it reaches 4. Every time the counter resets the index array contant need to increment by 1...but i don't know how to do this. Can anyone help?  
Thanks

I tried as you said, it seems to be partially working but there seems to be a problem with the timing. The index increments in steps of one but not quickly enough. The data type sent to the selector terminal does not seem to be in sync with the binary data as my data does not update as i expect. Any ideas how to fix this problem?
vi attached...
Attachments:
UDP_Case_Struct.vi ‏35 KB

Similar Messages

  • Create sub-arrays based on the positions of indicies in a separate index array?

     I have a 1D array of index values and a 1D array of measured values. As an example:
    Index array: 1, 2, 4, 7, 126, 127,129, 214, 215
    Measurement array: 5, 6, 8, 4, 4, 9, 8, 7, 5 
    I want to get sub-arrays of measurement array (three for this example):
    [5,6,8,4], [4,9,8],[7,5]
    A sub-array is generated when there is a big gap (this value is known) between consecutive elements of Index array (126-7, 214-129, this value is known, say 80).
    How to do this in labview.
    Thanks
    Solved!
    Go to Solution.

    Alice12 wrote:
    I tried to generate your program but there is some problem (I dont know the false case).
    And I want to find the maxima of each sub-array and then find their average (this should be the final output).
    You have it mostly right.  I explained in my post what's in the false case: an increment (+1) for the top shift register.  The other wires pass straight through.  The image I posted is a "snippet" - it's actual code.  You can drag it into a block diagram (with some web browsers, you will need to drag to your desktop first, and from there to the block diagram).  There is a bug in the snippet creation where it does not always show cluster contents properly, and that's what happened here.  The array constant wired to the left side of the lower shift register contains a cluster containing an array of numeric values.  You will see this if you load the snippet.  I hope that you were able to understand the logic of this code as you were constructing it, but if not, please ask for an explanation.
    From there it is trivial to find the max and averages.  Connect the output of my code to a for loop.  Inside the for loop, unbundle the array, and compute the maximum and average.  Functions to do these operations on any numeric array already exist (look for Array Max & Min, and Mean).

  • How to index array in a for loop

    i'm connecting from variant-to-data function to an index array function inside a for_loop (refer to attachment).  the data-type wire got converted from Table(2-D array) to Table(1-D array).  How do I keep it from converting to 1-D array?
    Attachments:
    arrayI.doc ‏146 KB

    Of course it seems you want to run the loop once for each row in the 2D array, so many times autoindexing is the better solution!
    You are using an "index array" inside the loop. If you are planning to wire the index to the iteration [i] terminal (who knows? ), you might as well use autoindexing. This way you don't need to wire N (the loop will know how many rows there are) and you don't need to use index array inside the loop.
    The image shows two functionally equivalent code fragments. Autoindexing (bottom) is much simpler than explicit indexing (top). See if autoindexing can work in your case.
    Since you are a LabVIEW beginner, you should try to stay way from stacked sequences and local variables. They are rarely needed and can ofter cause problems such as race conditions and unreadable code.
    Message Edited by altenbach on 03-31-2008 04:17 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    autoindexing.png ‏8 KB

  • Monitoring Index without rows in v$object_usage !!!

    Hello Gurus,
    OS - Solaris
    Oracle - 92
    I was generating a ddlscript to start monitoring index usage,
    I've run the sql below :
    @db92 > alter index INTRANET.PK_OWPDO MONITORING USAGE
    2 ;
    Index altered.
    When I query the table V$OBJECT_USAGE i don't see anything when I should see
    the
    INDEX_NAME
    TABLE_NAME
    MONITORING YES
    USED
    START_MONITORING
    END_MONITORING
    @db92 > select * from V$OBJECT_USAGE ;
    no rows selected
    @db92 >
    Does someone already got this issue before?
    Thxs in advance

    You should first use index:
    SQL> CREATE INDEX job_idx ON emp(job);
    Indeks zosta│ utworzony.
    SQL> ALTER INDEX job_idx MONITORING USAGE;
    Indeks zosta│ zmieniony.
    SQL> SET AUTOTRACE ON;
    SQL> SELECT ename, job FROM emp WHERE job = 'SALESMAN';
    ENAME      JOB
    ALLEN      SALESMAN
    WARD       SALESMAN
    MARTIN     SALESMAN
    TURNER     SALESMAN
    Plan wykonywania
    Plan hash value: 3343541934
    | Id  | Operation                   | Name    | Rows  | Bytes | Cost (%CPU)| Tim
    e     |
    |   0 | SELECT STATEMENT            |         |     3 |    42 |     2   (0)| 00:
    00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| EMP     |     3 |    42 |     2   (0)| 00:
    00:01 |
    |*  2 |   INDEX RANGE SCAN          | JOB_IDX |     3 |       |     1   (0)| 00:
    00:01 |
    Predicate Information (identified by operation id):
       2 - access("JOB"='SALESMAN')
    Statystyki
            241  recursive calls
              3  db block gets
             51  consistent gets
              0  physical reads
            536  redo size
            546  bytes sent via SQL*Net to client
            400  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              6  sorts (memory)
              0  sorts (disk)
              4  rows processed
    SQL> SELECT index_name, monitoring, used, start_monitoring  FROM v$object_usage;
    INDEX_NAME                     MON USE START_MONITORING
    JOB_IDX                        YES YES 01/27/2009 10:07:25
    SQL>

  • 1D Index Array Extraction

    Hey all,
    I'm relatively new to using LabView and cannot figure out how to get this done.
    I have 2 arrays, aray A and array B. I want to look up the specific values from Array B by analyzing Array A first and noting what locations, indexes, they are. 
    From Array A I am able to locate the locations, but it is in the form of a 1-D array of double. Now that I know the indexes of locations in interest,how do I extract the data from Array B? 
    When I try to use Index Array LabView gives the following error, 'source is 1-D array and sink is long'. Any help would be greately appreciated on how I can extract the data points from Array B by having an array of indexes of interest.
    Example of what I'm trying to do
    Input:
    Locations / Indexes: 1  3  4
    Waveform Array: 0  2   4  6  8  10
    Output:
    0  4  6 
    Thank you for your time
    Solved!
    Go to Solution.
    Attachments:
    progress.vi ‏28 KB

    Arrays are 0 indexed so locations 1,3, & 4 should be 0, 2 & 3 if you want those output values.  Attached is a pic of the code to do this. Be sure to disbale indexing on the data set and allow indexing on the 'location/indices' array. 
    Attachments:
    ex code.png ‏17 KB
    ex code.jpg ‏41 KB

  • Indexing array without a loop

    I would like to make and insert elements to each index on an 1D array. but, I don't want to use loop. How can I input my data into 1D array increasing and indexing array? whenever We want to make a new array, Do We have to use a loop control?

    To create an array, all you have to use is the Initialize Array function or just drop an array constant onto the diagram. You can then use either Replace Array Subset or Insert Into Array.

  • Index array is not getting new values from DAQ

    I am measuring force values with my DAQ card and these values are always changing.  However, in my programming something is not working right with the way I have things set up.  After my DAQ I have a "Convert to Dynamic Data" and after that I have an "Index Array".  When the program is executing and I turn on the highlight option I do not get changing force values after the "Convert to Dynamic Data" and therefore no changing force values enter my "Index Array".  Whaterever the first value is that gets passed to the "Convert to Dynamic Data" is the only value that I get for the remainder of the program.  I tried plugging in an indicator between the DAQ and the "Convert to Dynamic Data" and it did show varying values.  Please help with my program.  I have tried messing with the properties of the "Convert to Dynamic Data" and nothing has worked.  I am stuck and cannot see how to fix this problem.  I have attached my program as it is currently put together.
    Thank You In Advance,
    Gabe.
    Attachments:
    Actuator_Gabe_Oct27_Flat_Sequence_XY_+Measurement_File.vi ‏131 KB

    Please know that the best option is to review the concepts discussed to further understand programming in LabVIEW.  Perhaps you could take a look through ni.com/gettingstarted and ni.com/lv101 to have a look at some of the online help materials.  I have included a VI snippet of the while loop containing the changes.  Further, the code you attached contains a lot of customer controls and VIs, which are not common to all LabVIEW users.  It is a best practice to only attach the code of value to the question/post, and to have the most simplified version of the problem.
    Best,
    Adam
    Academic Product Manager
    National Intruments

  • How do I correct a build error while saving "Calculate Color Index Array.vi"?

    I have an application that takes some data and then periodically generates a nifty 3d graph.  When trying to compile this application to run on a stand-alone machine, i get an error message that crashes the build.  This is the information that is generated for the error:
    An error occurred while saving the following file:
    C:\National Instruments\LabVIEW 2009\vi.lib\Math Plots\3D Math Plots\3D Surface\3D Surface Datatype\Protected\Create Plot Data\Calculate Color Index Array.vi
    Invoke Node in AB_Source_VI.lvclass:Close_Reference.vi->AB_Build.lvclass:Copy_Files.vi->AB_Application.lvclass:Copy_Files.vi->AB_EXE.lvclass:Copy_Files.vi->AB_Build.lvclass:Build.vi->AB_Application.lvclass:Build.vi->AB_EXE.lvclass:Build.vi->AB_Build.lvclass:Build_from_Wizard.vi->AB_UI_Frmwk_Build.lvclass:Build.vi->AB_UI_FRAMEWORK.vi->AB_Item_OnDoProperties.vi->AB_Item_OnDoProperties.vi.ProxyCaller
    <APPEND>
    Method Name: <b>Save:Target Instrument</b>
    Details: 
    Error 6 occurred at AB_Source_VI.lvclass:Close_Reference.vi -> AB_Build.lvclass:Copy_Files.vi -> AB_Application.lvclass:Copy_Files.vi -> AB_EXE.lvclass:Copy_Files.vi -> AB_Build.lvclass:Build.vi -> AB_Application.lvclass:Build.vi -> AB_EXE.lvclass:Build.vi -> AB_Build.lvclass:Build_from_Wizard.vi -> AB_UI_Frmwk_Build.lvclass:Build.vi -> AB_UI_FRAMEWORK.vi -> AB_Item_OnDoProperties.vi -> AB_Item_OnDoProperties.vi.ProxyCaller
    Can anyone help me understand why the 3D Surface Datatype.lvclass keeps booching on my compile?
    Thanks!

    Check this

  • How can i validate current row input text field like required.

    Hi All,
    jdev 11.1.2.1.0
    in my use case i have drag drop one viewobject as a adf table. and in table i have also add one extra input text field which is not based on
    vo.
    now i want to validate current row input text field not null when i commit row.
    but when i using required property true. it worked for all row in table. problem is that i want only current row input text field validate not all
    thanks,
    Manish

    When the user tries commit the data by clicking on the button -- For that button, have the logic in the actionlistener method to check if the additional input field is NULL or NOT.
    If it is NULL, show an error message using FacesContext.addMessage() API.
    Thanks,
    Navaneeth

  • How can I create sub-arrays based on the positions of indicies in a separate index array?

    Please forgive me if this question is basic or obvious. I am fairly new to LabVIEW and I'm trying to learn as I go along.
    I have a 1D array of index values (the number of possible index values is not fixed, but can vary between uses of the application; it could be just {0, 1} on one day and {1, 5, 11, 678} on another) and a 1D array of measurement values (doubles). I'd like to parse the measurement values into sub-arrays for each index, so that if my index array was:
    [0 1 1 1 1 5 5 0 5 5 1 0 1 1 5]
    and my measurement array was:
    [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.10 0.11 0.12 0.13 0.14 0.15]
    I would get back 3 sub-arrays:
    [0.1 0.8 0.12]
    [0.2 0.3 0.4 0.5 0.11 0.13 0.14]
    [0.6 0.7 0.9 0.10 0.15]
    I know there must be a simple way to do this, I guess I'm just stuck too much in matlab-array thinking to figure it out... please help!
    -- jph
    Solved!
    Go to Solution.

    jamespherman wrote:
    Thus, I figured it might be possible to generalize this idea and send multiple sets of XY values to an XY graph.
    OK, all we need is a trivial modification of what we already have. XY graph data is easiest handled using complex data. Here's a quick rewrite. See if this works for you.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    SplitInGroupsGraph.vi ‏14 KB

  • Incremental index for UME ADS LDAP

    Hi,
    We are currently indexing the users in the "ume" repository in order to use a "Who Is Who" type search and using Active Directory as the data source.
    The problem is that when we change an attribute in Active Directory, TREX doesn't pick up the modification when running an incremental index, only after a full reindex. This causes the attributes displayed in the search results to be not up to date. This is a problem if we want to schedule an incremental index every night, for example.
    For user resources coming from an LDAP, the property modified is missing. Therefore you have to provide an appropriate mapping from LDAP property to User property in UME configuration xml file (see note 1239132). Otherwise changes of user data won't be recognized and updated in the index.
    In order to find changes in the resources the crawler is using several properties. The default value contains "Date" which means that "Modified" property of the resource is checked.
    This property for the user recource is retrieved from the UME IUser attribute
    {com.sap.security.core.usermanagement} LAST_MODIFIED_BY
    we set this LAST_MODIFIED_BY in our xml file (dataSourceConfiguration_ads_readonly_db_mailbox_flat_with_krb5v4.xml)
    to <attribute name="LAST_MODIFIED_BY"> <physicalAttribute name="whenchanged"/></attribute>
    but the incremental index crawler still doesn't notice that a user attribute has been changed in the LDAP.
    are we missing something??

    HI,
    Is there any api to access the ldap attributes.  Can any one provide the code to access the MS ADS?
    with regards,
    srinivas

  • How to implement index array inside case structure for searching a 3D array?

    Well I have a 3D array and I want to index certain elements from that array. And I have thought of one way of doing this is to have multiple index array functions on the block diagram to search the array simultaneously, but that would be messy. Or I could setup some kind of case structure and place each index array function into individual cases. I've tried the latter, but when I connect the 3D array to the case structure at the"?" it doesn't give me permission because it says I'm hooking up two different types of data. Case Structure is for T or F and 3D array is not a boolean.
    So how can I setup the Case Structure to work for a 3D array?

    A case structure's selection tunnel cannot accept an array.  What exactly are your search criteria?  It sounds like a few FOR loops will be needed.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • I want to measure rpm using 100 ppr incremental encoder via digital input

    i want to measure rpm using 100 ppr incremental encoder  via digital input max speed (4000 rpm)
    am using 9178 c-DAQ chassis and 9426 digital input module
    pl provide me example code for this

    Hi asaccullo.
    The recommended settings for encoders are using the counters in the daq cards. Using digital I/O’s is not recommended, the encoders send digital signals but one of the main differences between using digital IO vs counters is that counters are designed to handle these type of events.
    Here I found several examples in ni.com/code that you might check:
    Imitation Quadrature Encoder with DAQmx Counter Tasks
    Use Counter Frequency to obtain an Encoder Rotational Speed
    An Elvis is a daq device, so this should work for you.
    I also found an example for myDAQ, it uses the DIO but with a counter task in the set up.
    Regards,
    steve.bm
    AE | NI

  • Method to Get the INPUT parameter CONTENT byte length

    method to get the INPUT parameter CONTENT byte length

    Dear "clown of forums",
    Please read the forum rules and ask understandable questions -> one thread per properly formulated question after having searched.
    Thread locked.

  • How get column index and row index in gridpane of javafx

    how get column index and row index in gridpane of javafx. see the code below
    Text text1 = new Text("Text 1");
    Text text2 = new Text("Text 2");
    StackPane root = new StackPane();
    GridPane gridPane = new GridPane();
    gridPane.add(text1, 0, 0);
    gridPane.add(text2, 1, 0);
    When Mouse Entered On text1 i want to get the column index and row index of GridPane
    text1.setOnMouseEntered(new EventHandler<MouseEvent>() {
                @Override
                public void handle(MouseEvent e) {
                    //want to get column index =0 and row index=0
    Please let me know.

    Hi,
    If I remember well:
    [code]
    text1.setOnMouseEntered(new EventHandler<MouseEvent>() {
                @Override
                public void handle(MouseEvent e) {
                    //want to get column index =0 and row index=0
                    System.out.println("Column: " + GridPane.getColumnIndex(text1));
    [/code]
    -- daniel

Maybe you are looking for

  • Unable to check in or out as someone is editing (but they aren't!)

    Hi, Bit of a weird one here, I'm working on some corporate documents that require linking content, I've done this by exporting incopy ICML's then placing them, assign them and then create a ICMA this allows the team to make edits in Incopy that carry

  • How to acquire image from S-video camera

    Hi, I have a camera with S-video interface. I use a S-video to USB adaptor to acquire the images from my camera. Popular video editor/maker softwares, for example Windows Movie Maker, ULead VideoStudio, etc.. are able to display the video capture fro

  • Error when calibrate my display via display calibrator, please help me

    Hi all, I work as a photographer. I usually print my photo to the digital photo lab, but they have a different monitor calibration. when I used the display calibrator, they just showed me the same error that the app quit unexpectedly. this is happene

  • Where are my audiobooks on ios7?

    I had several audiobooks on my iPad with ios6. After upgrading to ios7 I no longer can find them. Anyone know?

  • Currency Translation Indicator

    Hi What is the system indicator 3 in currency translation indicator. 0,1,2 'S help.sap.com explanation is mataching with system entries.But not the 'Currency translation Indicator' 3. How this specific indicator is calculated. We are getting this ent