Convertir des caractere ASCII provenant d'un RS232 en Hexadecima​l

Bonjour à tous
je recois via du RS232 des données en ASCII sur 27 octets
comment puis je convertir cette chaine ASCII en chaine hexa
exemple pour les caracteres ASCII suivant :       (01//      conversion hexa ==>      28 30 31 2F 2F
merci beaucoup, je galere vraiment (un .vi serait le bienvenu !  ;-)

Voila ton VI !
C'est du quasi ce que tu veux, sauf que je présente le code des caractères ASCII dans un tableau... 
La fonction TypeCast te permet de passer d'un visualisation de donnée à une autre...
Attachments:
Example.vi ‏12 KB

Similar Messages

  • Lire des donées provenant d'un pic via une liaison RS232 et écrire dans un fichier xls

    Bonjour à tous,
    Le but de mon projet est de lire et d'enregistrer des données provenant d'un microcontroleur pic. En fait le pic enregistre des données et les stocke dans une mémoire flash. Ce que j'aimerais faire c'est récupérer les données stockées dans la mémoire, les afficher sur un graphe sous Labview et les enregistrer dans un fichier excel. La communication entre le pic et le pc se faisant par RS232.
    Merci par avance pour vos suggestions.
    Bien cordialement.
    Philippe

    Bonjour Philippe,
    Ici tu es sur le  forum en anglais. Essaie de poster en anglais
    Sinon voici le forum francais où tu auras plus de chance que l'on te réponde.
    Pour ce qui est de ton projet, je te conseille de regarder vers les fonctions VISA pour ce qui  est de la communication RS232.
    Il faut récuperer les données pour les mettres sous forme de tableau par exemple.
    Pour l'affichage des valeurs et l'enregistrement en tableau se fait assez simplement. Il y a une fonction Write to a spreadsheet file (dans files I/O) qui permet d'écrire directement une tableau 1D ou 2D.
    Cordialement,
    Simon D.
    CLA | Certified LabVIEW Architect
    CTA | Certified TestStand Architect

  • Instrument I/O Assistant:Convertir les commandes ASCII en numérique?

    Bonjour à Tous,
    Je suis à la recherche des exemples d'applications et des liens sur les assistants E/S d'instruments dans le but de développer un driver pour power supply Haut Voltage.
    En effet ,dans le cadre de mon projet j'ai utilisé ces Assistants E/S directes pour communiquer (Commandes en ASCII ,Reponses en ASCII) avec des alimentations Haut Voltage de type MPS Spellman et le programme fonctionne très bien.
    Pour la suite de mon travail je voudrai utilier des commandes Numériques (Décimal) sur la face avant du CODE VI standard obtenu après conversion et avoir des réponses en numérique pour l'exploitation (Ci joint le Code VI Réalisé)
    EXP de commandes:  stx 12 EN1 Y lf = ON ( Enable )
                                        stx 12 EN0 z lf  = oFF (Disable)
                                        stx 12 V1=5 d lf : Pour appliquer 5Volt
    ,,,                               stx 12 V1=1000 X z lf : pour appliquer 1000 Volt
    Je sais pas si des fonctions existent sous Labview ou il faut écrire un autre de programme de calcul?  si quelqu'un a des remarques ou des suggestions à faire,,elles seront les bienvenues  Merci à bientot.
    Pièces jointes :
    TEST22 MPS.vi ‏15 KB

    Bonjour,
    Si je comprends bien, vous souhaitez convertir un valeur ASCII en valeur numérique. Vous pouvez utilisez la structure suivante:
    Cordialement
    Mathieu B
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Forum Aéronautique, Spatial et Défense. Avec la participation exceptionnelle de Bernard DUPRIEU, Res...

  • Convert char to ascii code and vice versa

    HI
    Is there any function module to convert char to ascii code and vice versa.
    Thanks in advance

    Hi,
    be careful if you have unicode running in your system. URL_ASCII_CODE_GET is platform-dependent so it will return the internal HERX representation of the character in your system - which is hopefully and in most cases ASCII.
    Under unicode, we use double-byte characters here. I tried this function and the result CHAR_CODE is '00' regardless what character I specify for TRANS_CHAR. But the coding is so simple I corrected resultig in this sample code:
    [P]
    convert p_form to ASCII (internal) representation
      DATA:
        l_ofs TYPE syfdpos,
        l_len TYPE sy-linsz,
        l_ascii TYPE i.
      FIELD-SYMBOLS:
        <x> TYPE x.
      l_len = STRLEN( p_ascii ).
      DO l_len TIMES.
        l_ofs = sy-index - 1.
        ASSIGN p_ascii+l_ofs(1) TO <x> CASTING.
        l_ascii = <x>.
        WRITE: l_ascii.
      ENDDO.
    [/P]
    Here, for each character of string p_ascii, the internal (ASCII) representation is determined and written to the output list.
    Regards,
    Clemens

  • Problem convertting certain extended ascii characters

    I'm having problems with the extended ascii characters in the range 128-159. I'm working with SQL server environment using java. I originally had problems with characters in the range 128-159 when I did a 'select char_col from my_table' I always get junk when I try to retreive it from the ResultSet using the code 'String str = rs.getString(1)'. For example char_col would have the ascii character (in hex) '0x83' but when I retrieved it from the database, my str equaled '0x192'. I'm aware there is a gap in the range 128-159 in ISO-8859-1 charset. I've tracked the problem to be a charset issue converting the extended ascii characters in ISO-8859-1 into java's unicode charset.
    I looked on the forum and it said to try to specify the charset when I retreived it from the resultset so I did 'String str = new String(rs.getBytes(), "ISO-8859-1")' and it was able to read the characters 128-159 correctly except for five characters (129, 141, 143, 144, 157). These characters always returned the character 63 or 0x3f. Does anyone who what's happening here? How come these characters didn't work? Is there a workaround this? I need to use only use java and its default charsets and I don't want to switch to the windows Cp1252 charset cuz I'm using the java code in a unix environment as well.
    thanks.
    -B

    Normally your JDBC driver should understand the charset used in the database, and it should use that charset to produce a correct value for the result of getString(). However it does sometimes happen that the database is created by programs in some other language that ignore the database's charset and do their own encoding, bypassing the database's facilities. It is often difficult to deal with that problem, because the custodians of those other programs don't have a problem, everything is consistent for them, and they will not allow you to "repair" the database.
    I don't mean to say that really is your problem, it is a possibility though. You are using an SQL Server JDBC driver, aren't you? Does its connection URL allow you to specify the charset? If so, try specifying that SQL-Latin1 thing and see if it works.

  • Two Spaces being converted to from ascii 32,32 to ascii 160,32

    Two Spaces being converted to from ascii 32,32 to ascii 160,32 when the page is
    loaded by the browser.
    This problem is exhibited when viewing an address page in personal data that contains
    two spaces in the address field. i.e.. APT102- 102 Elm St.
    We put debug traces in to display the ascii character values of the spaces before
    and after the record is brought up. This debug showed that the two spaces change
    from
    Before:      space,space or ASCII(32),ASCII(32)
    After:      ASCII(160) ASCII(32)
    This is causing the application to display a record change warning. This occurs
    on IE 5.5, 6.0, Netscape 6, but DOES NOT occur using the Opera 6 browser. For
    what it's worth, the database is Non-unicode.

    Forgot to add:
    This is WEBLOGIC SERVER 5.1 sp 9 running on Win2k

  • How can i convert some caracteres of a String in bold characteres?? hELPME

    How can i convert some caracteres of a String in bold caracteres?? hELPME
    I have a JList and a DefaultListModel of Strings. So, i have many key words like "proccess", "if", "fi" that i want these characteres in bold.

    How i can use HTML in java to change a String to bold?
    example
    String str = "channel ";
    str = <b>str</b>;
    like this? syntax error =/

  • How to convert tdms to ascii files?

    Hello,
    I need to convert *.tdms files to an ascii file.  I have 16 channels and scalling coefficient information in the tdms file, With the TDMS-Image Viewer i can see the 1-D array waveform perfectly, but I cant write it to an ascii file. When I use a signalexpress.vi or the spreetsheat.vi for writing an LVM/ascii file,  information gets lost. (Red symbol at INPUT!!!!)
    Please answer me, because I dont have lots of experience with labview and an ascii file is more easier to handle for me! I found only export to matlab and exel, but i just want it in an ascii file.  Reading the tdms and opening it is no problem, but connecting the right blocks to the 1D array waveform without dataloss doesnt work.
    thank you for reading
    danny

    Thank you for reply,
    i have the new version 8.5.   With signalexpress.vis  i can do asciis but the red symbol (at input) is there so i dont want to get information lost.
    The tdms file has header information for scalling factors and unscalled data for 16 channels.
    so because tdms files are faster for writing i want to convert them to ascii with a Convertion Vi, but it seems that with an express vi he stops because it cant handle handle with the headerinformation.
    now i use the signalexess vi to write tdms data, before i did it manully by setting channel and group information.
    Please tell me if the red symbol AT input of a Signalexpress VI does matter?   its a 1D array wavefrom that goes in to the input.
    thank you for this discussion, i hope that i dont need to use the matlab import option for tdms!!
    greetings danny

  • Importing COBOL copybook into OSB & converting it to ASCII

    Hi,
    I want to import a COBOL copybook(.cpy/.copy file) into OSB.
    Based on that copybook, there is an EBCDIC file which I want to convert into an ASCII file.
    I used Format Builder to import the copybook, but it does not show any indication whether the copybook got imported or not.
    Please help... this is urgent..

    There was a problem with the copybook... so it was not imported.
    The corrected copybook got imported perfectly.

  • Convert String from ASCII to ANSI

    Hi,
    a command line instruction via LabVIEW function "System Exec.vi" retrieves me a string in ASCII format. Is there a function to convert string from ASCII to ANSII format? I use LabVIEW 8.5 German Installation.
    Kind Regards
    Christian
    Test Engineering
    digades GmbH
    www.digades.com

    Hallo Christian,
    AFAIK there is no such in function in LabView...
    But you can:
    - use "Search and replace string" to search for ASCII chars and replace them by their corresponding ANSI char, do this in a loop for all chars to be replaced (acceptable speed for small strings...)
    - convert the string to an U8 array and use a lookup table to convert all bytes from ASCII to ANSI, convert back to string (may be faster for long strings...)
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Comment convertir des fichiers Flash écrit en AS2 en html 5 avec Flash CC ?

    Bonjour,
    j'ai créé des présentations multimédias il y a quelques années en Flash en utilisant l'AS2 ces présentations sont constitués d'une multitude de fihiers swf qui se supperpose (loadmovie). Je dois aujourd'hui en faire une version html 5. J'utilise adobe CC et l'extension de Google Swiffy ne fonctionne pas sur cette version. Existe-t-il un moyen simple de convertir ces fichier écrits en AS2 en html5 ?
    Merci d'avance de vos réponses.

    I'm basically trying to do the same thing.
    I have two swf files and I need these as flv files.
    I looked for some freeware to convert swf files to flv.  The only ones I've found so far leave a watermark on the flash video file.  As I only have two files to convert (and this is probably a one-off occasion), I am loathe to spend a fortune to do this....
    We have a graphic designer here at our company with Flash CS3.  Is it possible to do it within Flash?... or is anyone happy to convert them for me if they have the tools and if I email them to you?
    (Pour Isabelle en français):  J'essaye fondamentalement de faire la même chose.
    J'ai deux dossiers de swf et j'ai besoin de ces derniers comme dossiers de flv.
    J'ai recherché du freeware pour convertir des dossiers de swf en flv. Les seuls j'ai trouvé jusqu'ici le congé un filigrane sur le dossier visuel instantané. Car j'ai seulement deux dossiers à convertir (et ceci est probablement une occasion unique), je suis déteste pour dépenser une fortune pour faire ceci….
    Nous avons un concepteur ici à notre compagnie avec le flash CS3. Est-il possible de le faire dans le flash ? est-ce que… ou n'importe qui est heureux de les convertir pour moi s'ils ont les outils et si je te les envoie ?

  • Je viens de m'abonner à ExportPDF pour convertir des pdf en word le 05/03/2015 13:41 paiement par CB 24 € et je n'ai pas d'acces à cette fonction je n'ai jamais demandé de cloud

    philippeb80925925je viens de m'abonner à ExportPDF pour convertir des pdf en word le 05/03/2015 13:41 paiement par CB 24 € et je n'ai pas d'acces à cette fonction je n'ai jamais demandé de cloud.
    2 choses : soit vous m'orientez utilement soit vous remboursez.
    cordialement

    Hi courtneyb,
    Please clear the browser cache and then log back in to https://cloud.acrobat.com with your Adobe ID and password.
    Best,
    Sara

  • Convert EBCDIC to ASCII

    Hi all,
    We are using XI 3.0 SP 10 and I have a scenario where I only need to retrieve a file (via FTP) and deliver it to a file share inhouse. There is no need for any mappings etc. But the file Iam retrieving is in EBCDIC and I would need to convert this into ASCII when delivering to fileshare. I have set up the communication channels and this works fine. But what would be the easiest way to convert the EBCDIC file to ASCII?
    Regards,
    Fredrik

    Hi Fredrik,
      There is an alternate way of acehiving the same using a java program in the operatingsystem command option  of File adapter.
    Steps:
    1. Write a java program to read EBCDIC file and convert into ASCII file(Using codepages).
    2.Create a jar for the above program and store it in a server directory.
    3.Write one shell script/batch file call the java program and send command line parameters as filenames.
    4.In XI File adapter -Operating system command use the Shellscript/Batch file name (Complete path)and give %F for filenames
      Eg. /usr/sap/serverdir/convert.sh %F %F
    For more details refer the following link:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm">XI File adapter</a>
    Regards,
    Ananth

  • Convert unicode to ascii

    I have a unicode like "100", which represents ASCII code: "d"
    I can simply convert unicode to ascii code if using Visual Basic function: chr(); but how can I do the same job under cocoa ?
    thank you.
    G5   Mac OS X (10.4)  

    Well, if you wanted to create a single-character NSString from an integer value, you could do something like:
    unichar oneChar = 100;
    NSString *oneCharStr = [NSString stringWithCharacters:&oneChar length:1];
    What are you trying to accomplish?

  • Convert char to ascii

    Hello,
    How can i convert a char to ascii, and ascii to char??
    thanks,
    Riss

    its quite simle really.
    // 199 is the ascii value for 'w';
    char doubleU = 119;
    System.out.println(doubleU);
    //or
    String doubleUString = "119";
    doubleU = (char) Integer.valueOf(doubleUString).intValue();
    System.out.println(doubleU);
    //to get the ascii value of a letter
    System.out.println(doubleU);
    doubleUString = "w";
    doubleU = doubleUString.charAt(0);
    System.out.println(doubleU);
    System.out.println((int) doubleU);

Maybe you are looking for

  • InDesign CS2 - don't want to ignore Whitespace elements

    Hi, I am working of InDesign CS2 on XP-SP2, while doing manual XML import i can successfully uncheck "Do not import contents of whitespace-only elements" but i can't do the same using script.... I am using following chunk of script in CS2 which doesn

  • How do I get my iTunes to work after following the instructions?

    I followed the instructions that are written on this site (the Apple Support titled Moving iTunes to External Drive) and iTunes is still not finding the media? I did the consolidating library and then did the Pref>Advanced and told it to go to my Ext

  • Trigger a workflow from ABAP Webdynpro

    My Scenario: Step 1: When a user hits the SAVE button on the webdynpro form, check if that data is consistent only and trigger a message(I have a BAPI to handle this check). Step 2: If the data is consistent, then trigger a workflow to send an alert

  • Annotating a PDF--My First Attempt

    I have a pdf that consists of specs on a digital camera. I pulled it down from the mfger'w web site. I want to send it to someone with what I think is an annotation to draw their attention to the note. I did that in the pdf, and sent it to him, and a

  • How or why would Lightroom replace my jpeg files with duplicate raw (.ORF)?

    Greetings All, I'm new to Lightroom but I'm trying to dive in head first and learn as much as I can in a short period.  I historically shoot RAW + jpeg with an Olympus PEN EPL3.  In an effort to keep the files separated I created a RAW subfolder in t