Transmissi​on fichier txt via RS232

Bonjour,
Mon application consiste a éditer un fichier au format txt et l'envoyer à une commande numérique via une liaison série RS232, ma question porte sur la transmission du fichier. Je voudrais savoir si il est possible d'envoyer le fichier txt directement sur le port série ou si un traitement est nécessaire en amont.
Cordialement
Nathan
Résolu !
Accéder à la solution.

Bonjour,
Pour la gestion d'un RS-232 série depuis LabVIEW, ce sera vraissemblablement au travers de la la palette E/S Instruments » NI-VISA. Dans la palette avancé, il existe une fonction VISA Write From File, qui pourrait convenir (lecture en mode binaire). Si ça ne convient pas, un petit traitement sera nécessaire. Tout dépend de la façon dont sera édité le fichier en question, i.e directement depuis l'application LabVIEW qui enverra le texte/le fichier, ou depuis votre éditeur texte favori (j'ai une préférence pour notepad++)
Cordialement,
.mrLeft{float:left} .mrInfo{border-left:solid 1px #989898;font-size:x-small;color:#989898}
Mathieu R.  
  CTD - Certified TestStand Developer / Développeur TestStand Certifié  
  CLAD - Certified LabVIEW Associate Developer  

Similar Messages

  • DMM MAS345 via RS232 serial comunication

    i have a problem almost like u,and i want to know if there is someone who can help me.I want to send data from a DMM MAS-345 via Rs232(my data settings in labview are baud rate=600,data bits=7,parity=none,stop bits=2,flow control=none,delay before read=10000ms) ,and i don't know why does it showes an error when i try to run the application(error -1073807202).I use like example VISA configure serial port,and i don't know if is wrong!!!I will appreciate if someone can help me.
    Attachments:
    Basic Serial Write and Read.vi ‏34 KB

    Here is some help for you 
    MAS345
    data format: 7n2 at 600 baud (7 bits, no parity, 2 stop bits).
    Control lines:
       DTR and RTS lines are used to power the TX line: RTS is clear
       for -12 supply; DTR is set for +12 supply. Data transmission is
       solicited sending whatever character to the RX line.
    Data string format:
       MAS-345 sends a 14 bytes string with:
             <mode>< ><sign><value>< ><units><return>
       <mode>:  two bytes with the oerating mode: DC, AC, OH, CA, TE ...
       <sign>:  one byte with - or space
       <value>: five bytes with four digits and one decimal dot.
       <units>: four bytes with the units: mV, A, kOhm, nF ...
       <return>: '\r'
       One space is inserted between <mode> and <sign>, one between
       <value> and <units>.
       The data string (without the '\r') is sent to the output device.
    The next question is of course How Can I Control the DTR and RTS Serial Lines in LabVIEW? It is easy take a look here
    http://digital.ni.com/public.nsf/allkb/1ECEFAA7AD52994986256966005356EA
    Good luck
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Comment obtenir la representation de points dessinés selon des coordonnées xy d'un fichier txt par dessus une video en live.

    comment dessiner des points en live selon des coordonnées xy d'un fichier TXT par dessus une video obtenue via une webcam ?
    na

    j ai trouvé
    na

  • Problème enregistrement fichier txt

    Bonjour à tous,
    J'ai réalisé un VI me permettant d'acquérir deux données (Température enceinte climatique, Température de consigne) et via un cadencement maître esclave, je peux traiter ces données.
    Parmis le traitement, je réalise un enregistrement. Néanmoins, je n'avais pas penser à insérer le "temps" (axe des X sur mon graphe), comment pourrait-on l'ajouter ?
    De plus, dans mon fichier txt, les données sont légèrement décalés sur la droite, j'ai suivi l'exemple de la formation Labview Basics II mais je rencontre un petit problème pour ça..
    Ci joint mon VI où j'initialise mes valeurs et mon MAIN, où la boucle maître du milieu et la boucle esclave en haut sont concernés.
    Merci pour toute aide.
    Cordialement
    Pièces jointes :
    Initialisation_Analyse.vi ‏24 KB
    Mode _Manuel_BIS.vi ‏103 KB

    est ce que ta fréquence d'acquitition est fixe?
    tu utilises un chart pour afficher tes courbes, le chart c'est pratique car tu lui donnes les nouveaux points à chaque tour de boucle et il gère l'historique tout seul, par contre le delta X entre deux point n'est pas géré, donc si ta fréquence de rafraîchissement du chart est fixe pas de soucis il faut simplement que tu dises à ton chart que est le facteur de multiplication pour l'échelle X, clic droit sur le chart >> propriétés >> échelles :
    pour ton enregistrement dans ton fichier je ne vois pas le problème... la seule chose que j'ai vu, c'est un tabulation en trop à la fin de la ligne d'entête.
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Sending binary file via RS232 connection

    Hi,
    I want to send a binary file via RS232 connection but I have troubles reading the .bin file and then converting the data to string in order to send it via RS232. Any ideas how i can deal with this?
    Thanks in advance,
    IG. 

    It is hard to help then you do not post any code. I suggest you go to the toolbar then help. Then you select Find Examples. Search for files. Also since you are new to Labview always have context help enabled. Both tools are important if you want to learn Labview. Feel free to post again if you are stuck.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Agilent 34401A multimeter to PC with Labview driver via RS232

    Hello!
    I am trying to measure a voltage with Agilent 34401A multimeter connected to PC via RS232 cable. I installed the driver. When I am starting Read Single Measurement.vi. It gives me an error:
    Error-1073807346 occured at Visa Open in Agilent 34401.lvlib: Initialize.vi->Agilent 34401 Read Single Measurement.vi
    Possible reason(s):
    Visa: (Hex 0xbFFF000E) The given session or object reference is invalid. 
    I would like to ask, how can I adjust my system to use RS23 with Agilent 34401A, if it is possible? If not, should I get GPIB card and cable?
    Thank you!
    Yulia.

    LabVIEW already comes with a driver for the 34401 pre-installed, so I'm not sure I understand what you installed. The pre-installed driver is in the Instrument I/O >> Instrument Drivers >> Agilent 34401 functions palette.
    As for the control that Dennis is referring to, it's the VISA control.
    As for the VISA version, you should have received a set of driver CDs along with LabVIEW. That will have the minimum VISA version required. Don't remember off the top of my head which version it is. Probably something like 4.1.
    Attachments:
    visa.png ‏42 KB

  • How to communicate via RS232?

    I am trying to program an sbRIO-9606 to communicate with a Matrix Orbital LCD display via RS232.  I have NI-VISA 5.4.1 and NI-VISA Server 5.4.1 software installed on the sbRIO.  But I am not seeing any COM ports to use to communicate.  Is there other software I need?  Or is there a resource where I can find some instructions about this?
    Solved!
    Go to Solution.

    Found it!  
    I also needed the NI-Serial RT 4.0.0 installed on the sbRIO.  

  • Affichage de temps erroné dans un fichier txt

    Bonjour,
    Voici mon souci, j'écris un tableau de données de mes différentes voies dans un fichier txt. Lors de la lecture de ce fichier avec un vi, l'affichage de l'echelle de temps est erronée, hors je ne vois pas d'info de temps dans mon fichier txt, cela doit venir de là. Mais comment mettre l'info de temps dans le fichier de txt pouvant permettre l'affichage identique à l'acquisition? A savoir que j'arrive à mettre une colonne de date et heure  mais cela ne fonctionne qu'a basse fréquence et comment traiter ces données lors de la relecture pour avoir le bon temps sur mon graphe déroulant?
    Merci pour les solutions et exemples

    L'exemple "Read from text file.vi" est fourni avec votre version de LabVIEW, par contre le lien que je vous ai mis propose un certain nombre d'exemple certain en LV 8, d'autre en LV 7 et certain en LV 6.
    N'hésitez pas à mettre à jour  votre version de LabVIEW, ou à indiquer sur le forum qu'elle exemple (avec le lien) souhaitez vous et pour qu'elle version.
    Cordialement,
    Christophe S.
    FSE East of France І Certified LabVIEW Associate Developer І National Instruments France

  • Envoi d'un fichier .txt sur contrôleur Stäubli CS8C avec les fonction FTP

    Bonjour,
    Voilà, pour mon travail de diplôme, je dois créer une interface sur LabVIEW pour communiquer avec un robot Stäubli TX60.
    Mon problème est que je dois envoyer un fichier .txt dans le contrôleur CS8C du robot. Pour le faire je pensais le faire avec un bloc "FTP put file". Mais lorsque je lance mon VI, j'ai un retour sur error out et error file qui sont OK. Mais quand je contrôle si le fichier à bien été copier dans le répertoire voulu avec la commande DOS de WINDOWS, il n'y a rien.
    Je pense que je dois avoir un problème avec le "remote path" du bloc "FTP put file" car en essayant avec la commande DOS de WINDOWS j'y arrive et le "remote path" est le suivant :    ftp>cd /usr/usrapp.  Puis je copie le fichier dedans.
    Moi j'ai essayer ces chaînes sur LabVIEW pour le remote path :  ftp://usr/usrapp
                                                                                                  //usr/usrapp
                                                                                                  usr/usrapp
                                                                                                  \usr\usrapp
    Merci de vos information
    Si autre solution pourquoi pas!!!
    Résolu !
    Accéder à la solution.

    Bonjour,
    Avez vous essayé avec  usr/usrapp/fichier.txt ?
    Cordialement,
    Aurélien J.
    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;}
    >> Du 30 juin au 25 août, embarquez pour 2 mois de vidéo-t'chat ! Prenez place pour un voyage au coe...

  • The sampling rate of Multimeter Protek 508 via RS232

    Hi everyone. I have the multimeter Protek 508. I want to take the data from it via RS232. The default detail of RS232 is:
                    Baud rate: 1200
                    Data bit: 7
                    Stop bit: 2
                    Flow control: None
    I write the code and get the data from it. But i only have the sampling rate is 2 data per second, that mean 500 ms per data. I want the sampling rate more than that. Can anyone help me to solve this problem. 
    Thank you.
    Attachments:
    186148720-Multimeter-Protek-506-pdf.pdf ‏553 KB
    Protek 508 RS232.vi ‏35 KB

    You are probably getting everything out of this device that you can. First, it is old, make that, very old. Back in the day, it might have been quick, but that was then. This is now.
    Second it's a multimeter. Very often meters like that would do running averages to make the reading appear more stable. That averaging slows down the rate at which you get new data.
    How fast are you needing to acquire data?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Lire un gros fichier .txt

    Bonjours,
    Je souhaite lire des points de mesures stockés dans un fichier.txt et ensuite les afficher sur un graph. Le nombre de mesure est trop grand pour etre lu d´une seule fois. Je pensais donc lire les 50000 premiers points et les afficher sur mon graph. Lorsque l´utilisateur presserait sur un bouton, le programme lirait les 50000 points suivants, etc..
    Le seul problème est que je ne trouve pas de fonction qui me permettent de lire des données des lignes X à Y ( par exemple les lignes 50000 à 100000). Je n´ai pas reussi à trouver cette fonction et je ne sais pas comment m' y prendre pour la créer.
    Est ce que quelqu' un à déjà rencontré ce problème et pourrait m´aider à créer ou trouver cette fonction?
    Ou alors peut-etre existe t' il un moyen plus simple pour afficher un grande quantité de points sur un graph. 
    Merci d´avance pour vos reponses
    Samuel

    Salut,
    La solution n’est peut-être pas élégante, cepandant elle donne une idée comment implementer une solution.
    J’utilise la function “Read From Spreadheet File” afin de convertir les données immédiatement en numeriques, et lis completement le fichier.  L’opérateur peut choisir combine de points apparaissent sur le graphe, et ce nombre sélectionne les points à partir du “array” (traduction??).
    J’espère que cela t’aide un peu.

  • Need to control waterbath temp using labview via RS232

    HI,
    I am new to labview. I have labview 6.1. I need to control a thermo RTE7 water bath temp.  controler using labview.
    The water bath has to be connected to computer via RS232 port and the commands have to be given via binary values.
    The users manual for the bath has "hex" bytes that are to be converted
    to binary values to be passed to bath. If anyone has done this before
    or anyone can help me on this please let me know. Thanks,

    Use simply the recommandations given in the RTE manual. You don't have to convert to binary : that's something done by the hardware.
    For instance, to send the temperature setpoint to the controler, you have to send a byte string such as
    CA 00 01 F0 02 01 2C DD, where CA 00 01 is a header specific to the type of serial link you are using,
    F0 is the set temperature command,
    02 is the number of bytes expressing the temperature that you are about to send
    01 0C is the temperature in tenths of degree (here : 30°C = 300 tenth = 010C$
    DD is a check sum byte.
    The corresponding labVIEW program is as follow :
    Of course, do not forget to initialize the serial port before writing the string !
    Message Edité par chilly charly le 10-21-2005 06:21 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Water bath.png ‏4 KB
    Water bath.vi ‏28 KB

  • Comment envoyé une donnée via rs232 avec labview

    Salut, comment envoyé une donnée via rs232 avec labview ?
    Hello, how given sent via rs232 with labview?
    Solved!
    Go to Solution.

    You can use the LabVIEW example for "Basic Serial Write and Read." In the English LabVIEW it is found here:
    Vous pouvez utiliser l'exemple LabVIEW pour "SerialBasic écrire et lire." Dans le LabVIEW anglais, il se trouve ici:
    Zach P.
    Product Support Engineer | LabVIEW R&D | National Instruments

  • Sélection d'une portion de texte dans un fichier .txt

    Bonjour à tous,
    Je travaille actuellement avec LabVIEW 2012, et j'aimerais si possible récupérer une portion de données dans un fichier .txt. Cette portion correspond aux fréquences que je souhaite traiter se situant entre les mots "begin" et "end". Donc ce que je veux faire, c'est récupérer uniquement ces nombres, j'ai commencer à effectuer une ébauche du code, et je pense être sur la bonne voie, c'est à dire que je stock les données dans un tableau, et ensuite je pense qu'il faut que j'utilise un registre à décalage dans une boucle for, et dès que je détecte le mot begin je commence à stocker les données après ce mot jusqu'à atteindre le mot end. Si vous avez une idée je suis preneur,
    Je vous remercie d'avance,
    Cordialement,
    Florian
    Résolu !
    Accéder à la solution.
    Pièces jointes :
    Fréquences de Test.txt ‏1 KB
    selection_des_donnees.PNG ‏14 KB

    Bonjour Florian,
    Voilà qui devrait résoudre ton problème... à insérer juste après lecture du fichier texte!
    EDIT - En version 2012 (oups):
    Francis M | Voir mon profil
    Certified LabVIEW Developer

  • Sauvegarde de données dans un fichier txt

    Bonjour,
    Je vous explique mon problème ... j'ai réalisé au cours d'un stage un vi qui me permet de récupérer plusieurs infos d'un four (2 températures, pression, ...). Je souhaite maintenant sauvegarder ces données dans un fichier txt. Seulement j'ai un petit soucis car je ne sais pas trop comment m'y prendre, j'ai plusieurs boucles cadencées (une pour chaque donnée récupérée). Est ce que je suis obligé d'avoir un fichier txt pour chaque boucle ou est ce qu'il est possible de stocker chaque donnée dans un tableau et les récupérer dans un seul fichier une fois les boucles stoppées (toutes mes boucles finissent au même moment et sont relancées toutes les 100 ms) ? Ou sinon est il possible de fusionner des fichier txt ?
    Je vous remercie
    Résolu !
    Accéder à la solution.

    Voici un petit exemple, juste pour illustrer mon propos et vérifier que j'ai bien compris le problème.
    Pour des questions ou envoie de programme, ma boite de message privé est toujours ouverte, sinon en postant sur le forum plus de gens pourront répondre.
    Rodéric L
    Certified LabVIEW Architect
    Pièces jointes :
    exemple enregistrement.JPG ‏16 KB

Maybe you are looking for

  • Problem with Java and Oracle Database -  help !

    i keep getting a NullPointerException when trying to update a resultSet in a servlet. i am bringing in the data just fine from an Oracle database. but it chokes when trying to update it. can anybody tell me what is happening? thanks for any help Owen

  • Simple XSLT mapping fails

    Dear, I'm busy creating XSLT mappings and all looks good, except for one. That one keeps failing and I just do not see why. I tried different things, but the target structure remains empty. Incoming message After the mapping XSLT mapping code <?xml v

  • Exporting Query Result to OpenOffice

    Hello, We would like to export Query Result from Web Application to a file which could be opened in OpenOffice. Exporting data in XLS format doesn't work because XLS file is created with MS VML Markup with couln't be read by OpenOffice. Does someone

  • I have a mac and i need to delete it but it won't delete because it won't go to the trash can anyone help me?

    i downloaded firefox to see if it would load a website i was trying to go on, but it didn't so now i want to delete it off my macbook, i have tried to drag it from the applications and drag it to the trash bin but i would not go. i'm desperate can an

  • BEX Formula with IF

    Hello BI experts, I try to calculate a formula using boolean operators (IF, AND). When I execute the query, I had a message like this but I only use amount in EUR  So I've added NODIM in my formula but the result is displayed without EUR If I don't u