Probleme Ecriture port serie, quel code envoyer

Bonjour,
Actuellement en école d'ingénieur, dans un projet pour une entreprise, je dois réaliser un VI permettant la lecture de données d'un capteur (thermocouple) sur lequel un microcontroleur a été gréffé, puis par la suite on souhaite envoyer des informations au capteur pour pouvoir modifier son gain, son offset.
Mon problème se situe au niveau de l'envoie d'information.
L'entreprise travaillait sous hyperterminal. Lorsque que le capteur envoyait les informations, il suffisait d'appuyer sur la touche "a" du clavier pour selectionner le paramêtre à modifier, appuyer ensuite sur "p" pour augmenter ce paramêtre et enfin appuyer sur "echap" pour valider cette modification et sortir du paramétrage.
Ma question est donc, comment dois envoyer l'information sous labview afin de simuler l'appui sur les touches "a" puis "p" puis "echap".
Dans un premier temps j'ai pensé a utilisé le code ASCII des touches du clavier, mais cela ne marche toujours pas
note; le paramêtre associé à la touche "a" est l'offset du capteur.
Je vous laisse en pièce jointe mon VI.
Merci de votre aide !
Résolu !
Accéder à la solution.
Pièces jointes :
port serie ecriture(modif11).vi ‏85 KB

Je ne peux pas ouvrir ton code, pas ta version de LabVIEW sur mon PC.
Je te propose quelques pistes :
> hyperterminal configure le port série (parité, vitesse, ….) tu fais de même, via VISA Open ?
> il y a peut-être un caractère de fin de commande (CR, LF, …) à ajouter,
> tu utilises la fonction VISA Write, un des paramètres d’entrée est une chaîne de caractère, ton idée de câbler une constante string « a » ou « p » me semble correcte.
Je pense donc que ton problème provient de la configuration du port ou d’un caractère de fin de commande ou réception.
Luc Desruelle | Voir mon profil | LabVIEW Code & blog
Co-auteur livre LabVIEW : Programmation et applications
CLA : Certified LabVIEW Architect / Certifié Architecte LabVIEW
CLD : Certified LabVIEW Developer / Certifié Développeur LabVIEW

Similar Messages

  • Gestion de l'envoi octet par octet par le port serie RS232

    Bonjour,
    Voila je suis dans le cadre de mes etudes en stage en angleterre. Et je dois realiser une communication utilisant le port serie entre un FPGA sur lequel je suis en train de creer l'UART, et une interface Labview que je veux maintenant creer. Le probleme est que je voudrais n'envoyer que deux octets a chaque fois preceder d'un champ sur aussi un octet pour specifier le type de donnees. Je souhaiterais donc pouvoir n'envoyer qu'un seul octet a la fois, et de meme pour la reception, il me faut etre en mesure de recevoir les octets un par un... Je veux donc etre en mesure de n'envoyer que 3 octets lors d'une communication dont je decide du contenu..
    Je viens de passer toute mon apres-midi a chercher, mais je ne rien trouve... Est ce que quelau'un sait si cela est possible? Et si oui comment, parce que je n'ai trouve que la possibilite que d'envoyer des caracteres ou des nombres decimaux par leurs codes ASCII.
    Merci d'avance.

    Bonjour Adrien,
    Afin de t'aider au mieux peux-tu nous décrire quel matériel utilises-tu ? Est-ce un cRIO ?
    Et quelle version de LabVIEW également ?
    As-tu regarder les exemples LabVIEW de communication série utilisant l'API VISA ?
    Si j'ai bien compris, tu souhaites transmettre des informations du FPGA à un périphérique externe via le port série d'un cRIO j'imagine. Pour cela tu envoie ces données-là au controleur temps réel qui lui dialogue vraiment avec le port série.
    Ce que tu veux envoyer étant une trame de 3 octets c'est-à-dire un en-tête puis 2 octets de données. Est-ce bien cela ?
    Enfin, pour information tu es sur une section anglaise du forum. Je te conseille pour maximiser tes chances d'avoir une réponse de la part de la communauté de poser ta question ici en anglais ou alors directement dans la section française -> ici.
    Cordialement,
    Jean-Philippe C.
    National Instruments France

  • [CS4-Win] Thread problem while porting

    I'm porting my plugin from CS3 to CS4 and I get following error while trying to open document:
    Thread local data subsystem not initialized for this thread.
    BeginPublicThreadBottleneck has not been called. (known leopard nav services problem here)
    In CS3 this code works.
    I use Windows native threads in my plugin.
    Also I've got several warnings with following text:
    CTUnicodeTranslator - Calling into single threaded CoolType from a thread - not safe
    Can anybody help?

    I'm not too familiar with Windows threads, but you need to initialize the TLS, see http://msdn.microsoft.com/en-us/library/ms686991(VS.85).aspx
    If you look in the source/public/includes/CTUnicodeTranslator.h, you can see that there are methods for getting an instance of the converter. This may give you problems when using multiple threads, i.e. several threads may access a the same state-based converter simultaneously resulting in in-correct conversions. Strange though, since Adobe is preparing to make InDesign multithreaded. 

  • Ouvrir un fichier .va et envoiyer sa contenue via un port serie rs232

    Salut, comment parcourir un fichier .var (ou .txt) (ensemble des données séparées par un ' ] ') et envoyer ses données (donnée du position 34) via un port serie RS232 ? merci

    Hello, this question covers 2 different arguments for which I can give some hint. I'm afraid I'm not able to answer in french.
    Step 1: read a text file and parse element by element. This can be done by using either standsrd C commands (fopen, frad, fclose) or by using CVI Formatting and I/O Library commands (OpenFile, ReadFile, CloseFile). In either case, unless the file is huge you can probably read int entirely in memory and proceed next to parsing the resulting string
    Step 2: parsing the file and sending through serial. You can proceed by steps using strtok command. After each token is found you can transmit it over the RS232 with ComWrt command (prerequisite is to open the port with OpenComConfig at the beginning of the process and close it at the end with CloseCom)
    All functions used are well documented and there are several examples that show how they can be used. I suggest you read the online help for each of then: inside the help you will find links to sample programs that demonstrate each command usage.
    Last hint: if you are not familiar with the English language you can repost this question in the french board.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Labview sur ubuntu, utilisation port serie

    Bonjour,
    J'ai installe LabView 2009 sur ubuntu et je voudrais pouvoir communiqueravec le port serie de mon pc.
    J'utilise donc les VI visa serial, mais j'obtiens ce genre de message d'erreur !! 
    "Possible reason(s):
    LabVIEW:  (Hex 0xBFFF009E) VISA or a code library required by VISA could not be located or loaded.  This is usually due to a required driver not being installed on the system. "
    Je suppose que les drivers ne sont pas installés, mais je ne trouve pas comment les installer ???
    Si qq'un peut m'aider SVP
    RP 

    Maxime MULLER a écrit:
    Bonjour,
    Effectivement après une installation il faut toujours redémarrer afin que LabVIEW puisse prendre en compte les nouveaux drivers.
    Pareil...!! 
    Ci cela ne fonctionne toujours pas, alors c'est que les drivers ne fonctionne pas pour Ubuntu en effet, ceux-ci n'ont pas été testés et validés pour cette distribution de Linux comme vous avez pu le voir sur la page de téléchargement des drivers ou sur la page de LabVIEW pour Linux.
    Cordialement,
    pfff, vous me conseilleriez quoi comme distrib a la place d'ubuntu ??

  • Cisco iron port feature activation code error how to resolve that?

    cisco iron port feature activation code error  how to resolve that?

    I have fixed this problem successfully.
    The problem was with the referral attribute of the cfldap tag.
    After adding this (referral="yes") attribute to my code I am able to login into my website.
    <cfldap action="QUERY" server="#application.LDAPServer#" port="#application.LDAPPort#" start="#application.LDAPBase#" name="search" attributes="alias, dn, uid, technicalCareerLevel, locationorgunit, givenName, sn" filter="#filter#" scope="SUBTREE" maxRows="2" referral="yes">
    Any way thanks for your assistance!!!!!

  • HELP!! asa 5505 8.4(5) problem with port forwarding-smtp

    Hi I am having a big problem with port forwarding on my asa. I am trying to forward smtp through the asa  to my mail server.
    my mail server ip is 10.0.0.2 and my outside interface is 80.80.80.80 , the ASA is setup with pppoe (I get internet access no problem and that seems fine)
    When I run a trace i get "(ACL-Drop) - flow is deied by configured rule"
    below is my config file , any help would be appreciated
    Result of the command: "show running-config"
    : Saved
    ASA Version 8.4(5)
    hostname ciscoasa
    domain-name domain.local
    enable password mXa5sNUu4rCZ.t5y encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    names
    interface Ethernet0/0
    switchport access vlan 2
    interface Ethernet0/1
    interface Ethernet0/2
    interface Ethernet0/3
    interface Ethernet0/4
    interface Ethernet0/5
    interface Ethernet0/6
    interface Ethernet0/7
    interface Vlan1
    nameif inside
    security-level 100
    ip address 10.0.0.1 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    pppoe client vpdn group ISPDsl
    ip address 80.80.80.80 255.255.255.255 pppoe setroute
    ftp mode passive
    dns server-group DefaultDNS
    domain-name domain.local
    same-security-traffic permit intra-interface
    object network obj_any
    subnet 0.0.0.0 0.0.0.0
    object network Server_SMTP
    host 10.0.0.2
    access-list outside_access_in extended permit tcp any object server_SMTP eq smtp
    pager lines 24
    logging asdm informational
    mtu inside 1500
    mtu outside 1500
    icmp unreachable rate-limit 1 burst-size 1
    no asdm history enable
    arp timeout 14400
    no arp permit-nonconnected
    object network obj_any
    nat (inside,outside) dynamic interface
    object network server_SMTP
    nat (inside,outside) static interface service tcp smtp smtp
    nat (inside,outside) after-auto source dynamic any interface
    access-group outside_access_in in interface outside
    timeout xlate 3:00:00
    timeout pat-xlate 0:00:30
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    timeout tcp-proxy-reassembly 0:01:00
    timeout floating-conn 0:00:00
    dynamic-access-policy-record DfltAccessPolicy
    user-identity default-domain LOCAL
    http server enable
    http 10.0.0.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
    telnet timeout 5
    ssh timeout 5
    ssh key-exchange group dh-group1-sha1
    console timeout 0
    vpdn group ISP request dialout pppoe
    vpdn group ISP localname [email protected]
    vpdn group ISP ppp authentication chap
    vpdn username [email protected] password *****
    dhcpd auto_config outside
    threat-detection basic-threat
    threat-detection statistics access-list
    no threat-detection statistics tcp-intercept
    webvpn
    class-map inspection_default
    match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum client auto
      message-length maximum 512
    policy-map global_policy
    class inspection_default
      inspect dns preset_dns_map
      inspect ftp
      inspect h323 h225
      inspect h323 ras
      inspect rsh
      inspect rtsp
      inspect sqlnet
      inspect skinny 
      inspect sunrpc
      inspect xdmcp
      inspect sip 
      inspect netbios
      inspect tftp
      inspect ip-options
    service-policy global_policy global
    prompt hostname context
    no call-home reporting anonymous
    Cryptochecksum:c5570d7ddffd46c528a76e515e65f366
    : end

    Hi Jennifer
    I have removed that nat line as suggested but still no joy.
    here is my current config
    Result of the command: "show running-config"
    : Saved
    ASA Version 8.4(5)
    hostname ciscoasa
    domain-name domain.local
    enable password mXa5sNUu4rCZ.t5y encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    names
    interface Ethernet0/0
    switchport access vlan 2
    interface Ethernet0/1
    interface Ethernet0/2
    interface Ethernet0/3
    interface Ethernet0/4
    interface Ethernet0/5
    interface Ethernet0/6
    interface Ethernet0/7
    interface Vlan1
    nameif inside
    security-level 100
    ip address 10.0.0.1 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    pppoe client vpdn group ISP
    ip address 80.80.80.80 255.255.255.255 pppoe setroute
    ftp mode passive
    dns server-group DefaultDNS
    domain-name domain.local
    same-security-traffic permit intra-interface
    object network obj_any
    subnet 0.0.0.0 0.0.0.0
    object network Server_Mail
    host 10.0.0.2
    access-list outside_access_in extended permit tcp any object Server_Mail eq smtp
    pager lines 24
    logging asdm informational
    mtu inside 1500
    mtu outside 1500
    icmp unreachable rate-limit 1 burst-size 1
    no asdm history enable
    arp timeout 14400
    no arp permit-nonconnected
    object network obj_any
    nat (inside,outside) dynamic interface
    object network Server_Mail
    nat (inside,outside) static interface service tcp smtp smtp
    access-group outside_access_in in interface outside
    timeout xlate 3:00:00
    timeout pat-xlate 0:00:30
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    timeout tcp-proxy-reassembly 0:01:00
    timeout floating-conn 0:00:00
    dynamic-access-policy-record DfltAccessPolicy
    user-identity default-domain LOCAL
    http server enable
    http 10.0.0.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
    telnet timeout 5
    ssh timeout 5
    ssh key-exchange group dh-group1-sha1
    console timeout 0
    vpdn group ISP request dialout pppoe
    vpdn group ISP localname [email protected]
    vpdn group ISP ppp authentication chap
    vpdn username [email protected] password *****
    dhcpd auto_config outside
    threat-detection basic-threat
    threat-detection statistics access-list
    no threat-detection statistics tcp-intercept
    webvpn
    class-map inspection_default
    match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum client auto
      message-length maximum 512
    policy-map global_policy
    class inspection_default
      inspect dns preset_dns_map
      inspect ftp
      inspect h323 h225
      inspect h323 ras
      inspect rsh
      inspect rtsp
      inspect esmtp
      inspect sqlnet
      inspect skinny 
      inspect sunrpc
      inspect xdmcp
      inspect sip 
      inspect netbios
      inspect tftp
      inspect ip-options
    service-policy global_policy global
    prompt hostname context
    no call-home reporting anonymous
    Cryptochecksum:f3bd954d1f9499595aab4f9da8c15795
    : end
    also here is the packet trace
    and my acl
    Thanks

  • I've been having a problem forwarding ports in my router...

    I've been having a problem forwarding ports in my router WRT160N I enable the ports I want to use for my applications, just after clicking save settings I go back to my port's forwarding section and I don't see any application I add being saved. Please help, thanks.
    Message Edited by AudioSoft on 04-09-2008 05:31 PM

    Might be possible that it will take time to save the settings ... so once you click save settings wait for few seconds ...
    Also if it not working ... disable all firewall on the computer & then try to configure the router ...

  • Unable to update itunes. help. error message when trying to update to latest version of itunes. "the installer has encountered an unexpected error installing this package. this may indicate a problem with this package. error code 2721"

    unable to update itunes. help. error message when trying to update to latest version of itunes. "the installer has encountered an unexpected error installing this package. this may indicate a problem with this package. error code 2721"

    Hello chae84swangin,
    I recommend following the steps in the article below when getting an error message trying to install iTunes:
    Trouble installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/HT1926
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Link Problem with port 2 in WLC 4402

    Hi,
    I have a problem with port 2 in Wireless Lan Controler 4402. The problem is that the distribution port 2 of the WLC not link with the switch (3750). We receive the WLC and we follow the autostart wizard and we enable LAG. The wizard finish, I restart the system and all works fine. The two distribution ports of WLC, 1 and 2 appears UP and the LAG works correctly. After this we upgrade the firmware of the WLC to the version AIR-WLC4400-k9-6-0-182-0.aes and we restart the system again but at this time port 2 does not link and port 1 link OK. We do not know the reason why port 2 doesn´t link? Could you help me ?
    Thank in advance.
    Regards.

    Does it properly refuse authentication ? Or does the login page stop appearing or something ?
    There was a bug with the webauth dying under heavy load, regardless of number of identical accounts used.
    One good way for you to check would be, when problem occurs, to create a second backup guest user and see if that would start working. If it doesn't, the account is not the problem.
    I'm not aware of any maximum of usage of the same account.
    Which 4.2 exactly are you running ?

  • Candlestick chart problem with multiple series

    Hello,
    I added one mx:CandlestickSeries object and couple additional
    mx:LineSeries objects to the chart. All series are represented but
    still I have one problem. More series I add - less candles are
    becoming of CandlestickSeries data. It seems that there should be
    any scaling option for all series in the chart or something like
    this, but I cannot find it. I'm still new in Flex Can anyone halp
    me with this?
    Thanx in advance
    marukas

    I've added screenshots to get better view of the problem.
    Here is chart with addtional series:
    Chart
    with multiple series
    And here nothing is changed except that additional line
    series were removed:
    Chart
    with only one CandlestickSeries
    Is it possible to get the same candles as in 2nd view with
    addiotnal series added?

  • I have problem in this unzip java codes

    hi all,I have problem in this unzip java codes,I think either the pathway that i put C:.......is wrong or the codes are wrong because when i run it, the zipped folder is not unzipped. So anyone has another set of example or know how to correct it? Thanks!Please post the solution here!
    This is the set of codes that i have:
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    public class Unzip {
    public static final void copyInputStream(InputStream in, OutputStream out)
    throws IOException
    byte[] buffer = new byte[1024];
    int len;
    while((len = in.read(buffer)) >= 0)
    out.write(buffer, 0, len);
    in.close();
    out.close();
    public static final void main(String[] args) {
    Enumeration entries;
    ZipFile zipFile;
    if(args.length != 1) {
    System.err.println("Usage: Unzip zipfile");
    return;
    try {
    zipFile = new ZipFile("C:\\Temp\\FolderZiper.zip");
    entries = zipFile.entries();
    while(entries.hasMoreElements()) {
    ZipEntry entry = (ZipEntry)entries.nextElement();
    if(entry.isDirectory()) {
    // Assume directories are stored parents first then children.
    System.err.println("Extracting directory: " + entry.getName());
    // This is not robust, just for demonstration purposes.
    (new File(entry.getName())).mkdir();
    continue;
    System.err.println("Extracting file: " + entry.getName());
    copyInputStream(zipFile.getInputStream(entry),
    new BufferedOutputStream(new FileOutputStream(entry.getName())));
    zipFile.close();
    } catch (IOException ioe) {
    System.err.println("Unhandled exception:");
    ioe.printStackTrace();
    return;
    }

    What does the program output when it's executed? Can you copy the screen and post it here? More info can help solve the problem.
    What exactly is the program supposed to do?
    Add some more println() to show the program flow and what the values of key variables are. For example what is in entries after the entries() method is executed?
    Some prep work on your part would make it easier for us to help.

  • Problem with Port Forwarding in WRT320N

    Good day.
    I have a web-server and Internet-radio translator to local network of my provider. And I found a problem with Port Forwarding. I'm trying to setup 80 & 8000 ports to forward. And it's working but only for Internet, without provider's local network. My web-server isn't accessible in local network and radio-translator too. 
    So is it possible to forward ports absolutely - for any type of connections? 
    P.S. DMZ is working like Port Forwarding.

    If you ask questions you have to mention that you have an PPTP connection to the internet and another network directly on the internet port. Otherwise noone will really understand your question as it is a very unusual setup.
    Your setup is not one really supported by the router. You are lucky that it works but don't expect too much. Port forwarding only the internet connection. If you use PPTP the network on the internet port is basically hidden. Using that local network on the internet port is not supported.
    The DMZ host is the IP address to which all ports are forwarded to which are not forwarded otherwise. The same restriction applies here.
    I would recommend to ask your ISP which router they recommend for their internet connection. I think most/all Linksys routers and many other brand's consumer routers won't really support a setup like yours...

  • Problems of Port Configuration while upgrading from 4.0B to ERP 6

    Hi all,
        We are upgrading a system from 4.0B to ERP 6. Will there will be any problems from port configuration side? If any please tell what they might be.
    thankyou.

    Hello,
    We have upgraded from 4.6C to ECC6.0 and did not have any port config issues.
    Things to look for:
      - RFC destinations, do they still work
      - directories used in File type ports, are they still there (they should be)
    Hope this helps a bit
    Regards
    Greg Kern

  • I am trying to get the free trial to cc but it said there seems to be a problem with the files (Error code: 205)

    I am trying to get the free trial to cc but it said there seems to be a problem with the files (Error code: 205) please help

    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

Maybe you are looking for

  • Printing Error without message

    In trying to print a basic document, I'm getting an error message without any message: InDesign 5, OSX 10.6.x. Since there's no message, I'm not sure where to start thanks A

  • App World error id 40850, bb 9860

    Hello There I've recently upgraded my device to bb 9860 monza and i keep getting me an error id 40850 when i try to use the app world, "Blackberry app world is having trouble connecting to the blackberry app world server.verify your network connectio

  • Transaction Failure Exception

    Hi All, When a transaction (notification creation) is being posted, we are receiving a Transaction Failure. I have still not been able to recreate the scenario, so cannot provide the exact scenario in which it is happening. This issue is happening on

  • "Opt in"

    Does anyone know how to "Opt in" for discounts that Verizon recently announced?

  • Extraction from APO to BI

    Hi All, I ned to add some fields to APO cube. I need to change Data source to. My doubt is, How is the extraction procedure in APO mean is there any extractor like R/3. Please let me know. Thanks, KN