Dividir datos hexadecimales

Buen día, hice una pregunta parecida a esta en otro foro, pero al final el tema se salio de rumbo.
Estoy recibiendo datos hexadecimales por el puerto ethernet de mi instrumento de forma correcta y sin errores. Configuré mi instrumento en el MAX con la opción Manual Entry Raw Socket, debido a que las primeras dos opciones no me detectaba el instrumento de forma automática. 
Los datos que recibo siempre será un numero del 1 al 4, luegoun delimitador (coma) y luego el valor hexadecimal.
Quiero separar estos dos datos. El primer numero del 1 al 4 me indicará de cual instrumento proviene el dato, y el otro dato despues del delimitador me indicará el numero de serie. 
Tengo este codigo, y me funciona solo cuando recibo un solo dato:
Sin embargo, cuando recibo mas de dos datos, solamente me separa la primera trama, y el resto me lo mantiene con todo y delimitador, como se ve en la imagen:
El resultado que quiero obtener sería algo como esto:
He intentando con varias de las funciones para Strings y no logro dar con lo que quiero. No sé si deba realizar algun tratamiento previo del dato antes de realizar la operación de "separación".
Tengo mi instrumento configurado "LF" como line ending, con la opcion de configurarlo como None o CRLF.
Como delimitador utilizo la coma, con opcion de utilizar espacio o Tab.
Gracias de antemano por la respuesta.
Un saludo,
Norberto G.
 

Estimado Roberto, en efecto me refiero a ese foro. En aquel foro te respondí los resultados de la modificación que me recomendaste. Subí la imagen del codigo original porque era el que tenía a mano, pero sí hice las modificaciones.
Abrí este nuevo foro con otro titulo para ver si encontraba alguna diferencia.
Gracias por el soporte.
Norberto G.

Similar Messages

  • Dividir tramas serial

    Hola a todos!
    Me encuentro realizando un proyecto en el cual tengo una trama de datos que referencia la lectura de dos sensores, se tienen 8 bytes simbolizados por 8 caracteres en hexadecimal, los cuatro primero corresponden a un sensor y los cuatro ultimos a otro, hasta el momento consegui dividir la trama pero se presenta el siguiente problema:
    Al enviar una trama fija para testear, en este caso 12345678, siempre se debe leer 1234 para el primer sensor y 5678 para el segundo sensor, sin embargo ocurre que aunque  inicialmente es asi,  posteriormente se presentan desajustes y la señal no es separada como se debiera.Arroja resultados como 2345, 6781...
    Que puedo hacer para solucionar esto? Debo cambiar la forma como divido la trama o en definitiva es problema de sincronizacion.
    Requiero ayuda urgente!!. Gracias
    Pd: Adjunto el VI con el que estoy trabajando
    Attachments:
    VisaTest.vi ‏173 KB

    Buen día,
    Para el envió de tramas considera enviar/leer más datos en lugar de limitar el buffer a 8 bytes (esto puede generar perdida de datos u overflow). Una forma de atacar este problema es agregando una cabecera a la información de los sensores por ejemplo: A1234B5678 (otra opción: A1234CB5678C).  Una solución similar se describe en este foro.
    El problema que experimentas con los resultados (2345, 6781...) es debido a que la comunicación no es síncrona, por lo tanto, no es posible leer los datos de la manera en que lo anticipas.
    Espero esto responda a tu pregunta.
    Saludos,
    Alejandro | Academic Program Engineer | National Instruments

  • Can no longer attach files to email or type in top of write screen. My Write Screen is divided in middle can write at bottom.

    This problem developed two weeks ago. I can still use Google Chrome for email OK but have used Firefox since your first release and want to continue to use the best browser. I removed Firefox, downloaded a new copy today, and re-installed. Same results. When I try to write an email message I get a divided screen and cannot write in the top half. There is no active button for browse to add an attachment. I use Firefox at home on several machines with no problems. This machine is still using Windows XP Pro, but has been very reliable until now. I suspect a corrupt version of the write page is hidden somewhere in my system and removing the install did not remove it.
    Any help would be greatly appreciated.
    Dave Harris

    Please create a screenshot of the problem you're seeing by following the guide mentioned at [[How do I create a screenshot of my problem?]].
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    '''Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Don't select anything right now, just use "'Start in Safe Mode"''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.''
    '''''If it is good in the Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • Divide licences to use cloud discount?

    Now we own two Design Premium CS5 (with same serial number) and one Web Premium CS5 licence, all under one Adobe ID. If we go and buy three Cloud subscriptions, we'd have to register two new Adobe IDs.
    1. Is it possible to divide existing licences between all three accounts, so each one could use discounted price for Cloud (for owners of previous versions)?
    2. And if I use this offer, do I keep licence for CS5 Suite? Could I still use it for an upgrade to 'classic' CS6 Suite?
    Benjamin

    Hi Benjamin,
    Not sure if the prior products are registered to a business or individual but from the terms and conditions of the promo offer
    https://creativecloud-specialoffer.adobe.com/special-offer/?loc=en_US
    This offer is limited to one (1) purchase of one (1) Creative Cloud annual membership per customer
    You might need to contact our customer service for assistance if your existing product registrations were done incorrectly.
    -Dave

  • K8N Neo2 problems running 300MHz HTT and higher than "100MHz" RAM divider

    Hi!
    Got some problems with my K8N Neo2 when running the HTT much above 300MHz, only RAM divider that's stable is "100MHz" which means the RAM runs at the half speed of HTT. That's not good since my RAM does 270MHz with "200MHz"/1:1 divider.
    This is not a problem when I run my FX-55, but when I was going to overclock my 3000+ Winchester where the highest MP is 9 this is a big problem. It does 3004MHz (9x334MHz) stable with Prime95 and runs Super Pi at 3135MHz (9x348MHz), but with only 174MHz (348MHz/2) on my RAM the performance is bad. CPU is cooled by Prometeia Mach II.
    I'm running HT Frequency/LDT of 3x, any of the settings under 3x doesn't work right (looks like 2,5x equals 3x and 2x, 1,5x and 1x equals 4x). Any BIOSes where the HT Frequency settings below 3x works right?
    Thanks for any inputs on this subject.

    Why are you insistent on running your frequency at 300Mhz and higher?  Why not lower the frequency and increase the multiplier?  For example, you could run 275Mhz x 11 for a CPU frequency of 3025Mhz.  Then you could still run your RAM at the 1:1 ratio.....
    Just a thought -- curious why you haven't tried that...

  • I need to divide a large 111MB PDF

    I need to divide a large 111MB PDF into several smaller more manageable pieces. I have CS5 but it won't open it. I just bought PDF Extractor so I could convert it to a Microsoft Word File and edit from there. Message says, file too big, over 100MB. How can I do this?

    You need Acrobat if you want to split the file.
    On Mon, Apr 20, 2015 at 7:13 PM, garys99515329 <[email protected]>

  • Swing JEditorPane how to divide a html text in equals pages

    Hi,
    I want to load a html text from a file into a JEditorPane and divide its content in pages with the same number of lines. I want to create a look like in pdf or microsoft word. I found somewhere an example wich create the editor as I want but it is made using shapes and draw them.
    The look is that that I want, but being shapes they aren't editable or selectable.
    Can you give me any ideea how can I make this?
    Thanks in advance!

    You can use this
    http://java-sl.com/Pagination_In_JEditorPane.html
    And this
    http://java-sl.com/JEditorPanePrinter.html
    To see my attempts to achieve the behaviour
    Regards,
    Stas

  • How to use the divide() function in bpel

    Hi All,
    How to use the divide() function in bpel.
    pls can u give the one sample example

    2 div 4
    Eg;
    <assign name="Assign_1">
    <copy>
    <from expression="2 div 4"/>
    <to variable="outputVariable" part="payload"
    query="/client:testProcessResponse/client:result"/>
    </copy>
    </assign>
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How do I add a divider on my menu?

    I've created a menu for my website, but I can't seem to find the option to add dividers between menu items.
    I would like to do something like this: http://www.googleventures.com/

    If you'd like to have a pipe as a divider (straight up and down), you can add a stroke to the right side of the menu boxes. Then, unselect the "edit together" option and remove the stroke for the last menu on the right.
    If you'd like the slash in the example you provided, which is text (the forward slash key), then your menu would have to be all text. You'd have to manually type in the names of your pages, then manually add their hyperlinks. It's pretty simple but you just lose the automation of the menu widget. Additionally, if the pages of your site change or increase, you'll have to change the menu om each site page, one by one. That would be not be a great option for a non-static site, but it is possible.
    These are the only two options that I am aware of; there may be others. Good luck!

  • How to divide all textFrames in one-character-per-textFrame?

    Hello:
    How to divide all textFrames in one-character-per-textFrame?
    Example: the textFrame "Letters" will be divided in 7 textFrames: "L", "e", "t", "t", "e", "r", "s".
    Help, please.

    Hi Paul, try this one
    #target Illustrator
    //  script.name = splitSelectedFramesIntoWords2.0.jsx;
    //  script.description = splits selected texFrames into separate words;
    //  script.required = select point text textFrames before running;
    //  script.parent = CarlosCanto;  // 10/14/11
    //  script.elegant = false;
    var idoc = app.activeDocument;
    var sel = idoc.selection; // get selection
    var selCount = sel.length; // count items
    var tFrames = []; // to hold the textFrames
    for (j=selCount ; j>0 ; j--) // loop thru selection & get textFrames backwards
                        tFrames[j-1] = sel[j-1];
    for (k = 0 ; k<tFrames.length ; k++) // loop thru textFrames
                        var xpos = tFrames[k].position[0]; // get x
                        var ypos = tFrames[k].position[1]; // get y
                        var words = tFrames[k].contents.split(/\s/g); // get all words into an array
                        //$.writeln(words);
                        var space = tFrames[k].duplicate(); // dup to get width of a space
                        space.contents = " ";
                        var sw = space.width;
                        space.contents = words[0]; // replace space with first word
                        var w = space.width;
                        var wordCount = words.length; // count words
                        for (i=1; i<wordCount ; i++) // loop thru words
                                            xpos2 = xpos+w+sw; // next words position = previous word pos+width+space
                                            var iword = space.duplicate(); // duplicate previous word
                                            iword.contents = words[i]; // add next word
                                            iword.position = [xpos2,ypos]; // position the character = original position + new width
                                            w = iword.width; // get words width
                                            xpos = iword.position[0]; // get words position
                        tFrames[k].remove(); // remove textFrame

  • I need help dividing an image into two equal parts in Adobe Illustrator CC--ASAP!!!

    I need help dividing a single, already created image into 2 equal parts...Am getting nowhere so far

    Hi Willi, thanks so much for responding! Below is the image I need to divide in half. The left half where it says "Click here for the definition" links to a landing page where people can read the definition of the Hebrew Word. The right half links to an audio recording of the Hebrew word being spoken aloud. I am trying to figure out how to use the scissors or knife tool in Adobe Illustrator and am having no luck. Plus I believe there's a way to include URLs on each separated part, but I can't get past figuring out how to cut it. My background is not graphic design

  • Using iCal on iPhone in Day view - How can I move divider to give more space to all-day events?

    I am using iCal on an iPhone
    I would like to move the divider that seperates all-day events from the timed events. I would like to view with more room for all-day events and less room for timed events. How can I do this?

    If you change anything in a repeating calendar entry it will give you the option of disconnecting it from the series. So may any random change, choose to not change the series.

  • Getting counts and divide by sum in a single Pivot query

    Hi,
    I have a pivot query which gives the counts of all codes. I also have to divide the count with the total in the same query.
    e.g
      col1          col2                   col3
    error_1       05-Jun-2012       parts
    error_1      05_june_2012     parts
    error_1      04_june_2012     consumables
    error_2      04_june_2012     consumables
    error_3      03_june_2012     parts
    .Now the output should have the counts/divided by sum multiplied by 100. Basically, the percentage.
    output will be something like
    error                     June-2012                                 May-2012                              Feb-2012 ....      headers
    error_1                    60%                                          0 %                                         0%
    error_2                    20%                                          0                                             0%
    error_3                    20%                                           0%                                         0%Any suggestions please?
    Thanks,
    Sun

    with
    t1 as
    (select 'error_1' col1,trunc(sysdate) - 1 col2 from dual union all
    select 'error_1',trunc(sysdate) - 1 from dual union all
    select 'error_1',trunc(sysdate) + 30 from dual union all
    select 'error_2',trunc(sysdate) + 31 from dual union all
    select 'error_3',trunc(sysdate) - 2 from dual union all
    select 'error_3',trunc(sysdate) + 30 from dual union all
    select 'error_1',trunc(sysdate) - 3 from dual union all
    select 'error_2',trunc(sysdate) - 2 from dual union all
    select 'error_3',trunc(sysdate) + 30 from dual union all
    select 'error_4',trunc(sysdate) - 6 from dual
    select col1,
           count(case to_char(col2,'mon') when 'jul' then 1 end) one,
           100 * ratio_to_report(count(case to_char(col2,'mon') when 'jul' then 1 end)) over () x,
           count(case to_char(col2,'mon') when 'jun' then 1 end) two,    
           100 * ratio_to_report(count(case to_char(col2,'mon') when 'jun' then 1 end)) over () y
      from t1
    group by col1
    order by col1Regards
    Etbin
    Edited by: Etbin on 8.6.2012 14:15
    used next month to keep english and slovenian 'mon' the same ;)

  • How to get rid of internal divider in track list?

    I had a couple of tracks where in the track list there is a vertical divider that can be dragged left and right within the track name area - to the right of the divider is instr number audio track number etc.
    Now I've clicked on it the divider has appeared on all tracks.
    How do you turn it off?
    Message was edited by: Safetytrousers

    You have configured your track header and it´s showing two names. Right click on any track->configure track header->Names->untag the little box labeled "automatic names"->OK

  • Finder in column view has no expander divider on the last column

    I deal with a lot of graphics on my computer and I have a lot of subfolders. While in finder in column view there is no expanding divider for the last column when it is showing a graphic. When I first open a photo or graphic in finder the last column shows the graphic smaller than regular size. In SL there was a column divider to expand only that last column so I could make the graphic larger to see it better. Now in Lion there is no divider on the right side of that last column to expand the last column where the grahic is showing. In order for it to finally expand I have to drag the right side of the Finder window all the way across my display until the bottom slider bar disappears and then that last column will expand. This is frustrating having to have my Finder all across my display just to get the graphic larger.
    Is there a way to get an expander divider to show up for the last column when viewing a graphic in column view? I know I can click on the "eye" icon to see it, but the column view will expand the graphic larger than 100% so I can see more details.
    Thanks for any and all help.
    Connie

    Yes, that is how my whole finder window expands across my display until the bottom slider bar disappears....then and only then does the last column expand. I have to have open as many as 8 columns to get to my graphic. Keeping the Finder window to a smaller size and using the bottom slide bar to navigate to the far right column is nice, but all I want is that far right column where my graphic is showing to expand so I can see it better.
    Thanks but what you suggest only resizes the whole Finder window until it can expand no further, then the last column expands the graphic. But then my whole display is a huge Finder window.

Maybe you are looking for