Variable local buffer ecriture

Bonjour,
Mon probleme ce situe au niveau de l'utilisation des variables locales !
je vous poste un Vi simplifié de mon projet afin de mieux comprendre le probleme!
en effet je crée des variables locales (des buffers d'ecritures des instruments que je veut commander afin d'envoyé des commandes plus loin dans le diagramme, en voulant qu'à chaque fois q'une commande est mis dans la variable locales "Ecrire IHM" par ex, le Vi ecrive sur le buffer et lise la reponse !
pour cela j'ai testé avec une boucle while (sans conviction et sans résultat)
Merci ! Cordialement !
Ps : j'utilise Labview 2009 mais enregister pour Labview 8.6
Pièces jointes :
pour forum pb variable local buffer ecriture.zip ‏32 KB

Bonjour, ramses64
  Comme tu a pu le remarquer je suis débutant et voici mon problème, je suis en stage de fin d'étude et je dois faire une application sous Labview 2009 où j'inter agie avec un appareil en Bluetooth (clé BT sur pc portable) et avec un appareil de mesure en RS232 via (usb/comm DB9)
  Donc voila mon problème je dois tantôt envoyer des commandes particulières à l'appareil BT et recevoir un acquittement tantôt envoyer des commandes particulières via RS 232 et recevoir un acquittement. Mes commandes fonctionnent bien en direct Q/R.
  je ne sait pas comment m'y prendre pour séquencer les commandes sur les 2 ports com . (une centaines de commandes pour chaque appareil ! couper en plusieur fonction Init ; Check ; Test ; Etc) . Mon post précedent etait juste une idée !
En effet mon probleme et un probleme de compréhension de Labview :-/ ( 1 er prog et seul ) , j'ai pensé que les variables locales me renvoyées les données à mon buffer d'ecriture de base (afin de refaire la sequence 1 (comme un sous programme) ! Or ce n'est apparement pas le cas . Je reposte MON VI plus complet afin de bien comprendre mon probleme !
  N'hésiter pas je suis ouvert à toute remarques sur ce que j’ai fait de maladroit ou de faux et aux idées de développements etc..
  Merci
  par ex : BT comm 5 et RS232 comm 6
  ex Commandes a envoyé :
   =>BAT+CG=6 (comm 5)
<=Timeout 20Sec pour réponse CT+CG=2 (comm 5)
=>CL :LU (comm 6)
=> BAT+CP= ? (comm 5)
<= Timeout 20Sec pour réponse (comm 5)
=>CL :MSN :RL ? comm 6<=-28 ;23 ;98 comm 6
Pièces jointes :
forum_buffer variable locale.vi ‏1069 KB

Similar Messages

  • Lire variable locals de teststand dans labview par activeX

    Bonjour,
    Dans le cadre d'un projet interne, je crée une application sous labview qui servira d'interface utilisateur et autres choses.
    Le problème est que j'ai besoin de lire les variables locals de teststand avec labview sans que le programmeur teststand se soucie de faire appel à une fonction spécifique.
    Pour faire simple l'idée est d'utiliser l'activeX sur labview pour lancer les fichiers séquences etc. ça ne me posse pas se soucie à ce niveau-là.
    Mon problème est que j'aimerais lire les variables locals de teststand dans labview, j'avais l'habitude de lire les variables StationGlobals par cette méthode mais pas moyens de faire la même chose pour les locals.
    En gros, il faudrait que j'ai accès à sequenceContext par activeX mais sans faire un appel d'un VI dans teststand comme dans l'exemple proposé dans teststand.
    Cordialement.

    Bonjour Steve,
    En effet, ceci n'était pas aussi simple qu'il n'y paraissait...
    Voici un exemple:
    L'astuce étant de récupérer le Sequence Context depuis l'Executionview manager, on notera qu'il faut passer par l'exécution puis le thread car la propriété qui devrait renvoyer le SequenceContext directement ne fonctionne pas et renvoie une erreur... 
    Rodéric L
    Certified LabVIEW Architect
    Pièces jointes :
    récuperer locales depuis IHM.png ‏14 KB

  • Noeud de propriété OU variable locale (?)

    Pour modifier un booléen (ou un numérique) sur le FP ... noeud de propriété ou variable locale ?
    Je peux faire ce dont j'ai besoin avec l'un ou l'autre ... Comment choisir ?
    Il me semble qu'une variable locale, dans son principe, n'est pas faite pour modifier un objet du FP
    mais je n'ai pas assez d'expérience pour apporter une vraie réponse.
    merci,
    Résolu !
    Accéder à la solution.

    Salut à vous trois! Content de vous lire ! 
    Je suis Ok avecSimon et J’aurai  écrit : Pour modifier juste la donnée value dans un même diagramme (dans l’ordre) : terminal / variable locale / nœud de propriété.
    Le nœud de propriété va engendrer des lenteurs : thread UI.
    Par contre le nœud de propriété peut effectivement permettre de faire un value signaling + chainage erreur.
    http://digital.ni.com/public.nsf/allkb/E62730A834D65638862575530050CC48
    D’un autre coté, parce qu’ils peuvent mettre à jour une sous-partie des données, les nœuds de propriété n’utilisent pas les même raccourcis que les variables locales ou les commandes. Quand vous mettez à jour une commande avec la même valeur plusieurs fois de suite, une variable locale ou un terminal de commande ne redessine pas la commande sur la face-avant à chaque fois (ce qui est le cas avec le noeud de propriété).
    local vs property node
    http://forums.ni.com/t5/LabVIEW/local-vs-property-node/td-p/321755
    diffrent of "property->Value" and "Local Variable"
    http://lavag.org/topic/11108-diffrent-of-property-value-and-local-variable/
    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

  • Variable locale

    Bonjour,
    j'aimerais savoir si c'est possible d'allouer dynamiquement une variable à une variable locale.
    Exemple: J'ai un VI qui va me créer un autre VI avec comme objet: une variable locale et un indicateur (booléen). J'aimerais associé dynamiqement ma variable locale à mon booléen.
    Merci d'avance de votre réponse.
    Cordialement,

    There you go.
    Choose one of the boolean, with the control, then run your VI. Your local variable will be linked to the selected boolean, and wired to it.
    Eric M. - Application Engineering Specialist
    Certified LabVIEW Architect
    Certified LabWindows™/CVI Developer
    Attachments:
    variable_locale_Good.vi ‏25 KB

  • Mapping instance variables to buffer in external format

    I was inspired by this OP http://forum.java.sun.com/thread.jspa?threadID=5211760 to develop my first annotation. Having no experience
    at all with annotations, I would like to ask you if it is something useful or
    an abuse of annotations. I have my code at work and It works, but now I am at home, so here is the idea.
    class TestByteMap
      @ByteMap.Offset(0) byte aByte;
      @ByteMap.Offset(1) int aInt;
      @ByteMap.Offset(5) short aShort;
      public static void main( String[] args )
        byte[] buffer = new byte[] {1, 2, 3, 4, 5, 6, 7};
        ByteMap bm = new ByteMap( new TestByteMap() );
        bm.fromBytes( buffer );  // Populate the annotated variables from byte array
        bm.toBytes( buffer ); // Dump annotated variables to byte array
    }ByteMap is a class that has an inner annotation Offset. The toBytes()
    and fromBytes() methods use reflection to move bytes between the
    buffer and the annotated variables.
    Thank you for any feedback!
    Message was edited by:
    baftos

    If you need to read/write a class to a byte array, using annotations to mark which fields correspond to which offsets is somewhat better than tracking this by hand in comments. Instead of using reflection, you could mark the fields as before and use an annotation processor at compile time to generate the read/write methods appropriate for the class. In any case, it would be recommended to check for overlaps and other semantic errors in the offset annotations.

  • Recording high quality video using a local buffer with FMS 3.5

    Hello, I'm currently working on a webcam recorder to record high quality video. I had the recorder working before, but the video quality was quite poor. Instead I'm trying to use a client side buffer and then upload the buffer after recording has stopped. I thought after I unattached the video and audio from the NetStream that either a NetStream.Buffer.Empty or NetStream.Record.Stop event would be sent when the buffer was finished uploading. What is actually happening after I start recording is two NetStream.Record.Stop events are being sent in a row, so recording never really happens. Also, on the server side I'm trying to save a user name and password into a variable, but I'm not sure how to go about doing that since the application script is just a bunch of callback functions. I hope someone has done something similar so they might be able to help...

    Here is the client application; it's quite messy because I'm just testing things at the moment, but the functions causing the problem are probably onNetStatus, recordButton_clickHandler, and stopRecButton_clickHandler.
    http://pastie.org/private/vpk6naojmvagikgxkaffha
    Here is the server-side application, as you can see I commented out the variables and the code using them.
    http://pastie.org/private/gp5loh1wowbzvtusspxg
    I hope my code isn't unreadable. Ask me to clarify anything if you don't understand the code. Thank you.

  • Clone Variables (Locals and FileGlobals)

    Hi !
    Is it possible to clone variables ? 
    I found the way to use the clone method with steps, but I can't find the way to do it with variables.
    What I did is get the reference onto the 'Locals' in sequence (the reference is a PropertyObject). Then cloned this PO using the Clone method, which returns a reference on the cloned Object.
    I have the reference of a sequence in another sequence file, in which I want to copy my variable. But I can't find any method from the Sequence class which would allow to add the cloned variables using the clone refrence.
    Any idea ?

    Hi,
    Clone is possible,
    Just see these threads, there were some examples
    http://forums.ni.com/t5/NI-TestStand/Repeating-a-Failed-Sequence-once-more/m-p/1042268/highlight/tru...
    http://forums.ni.com/t5/NI-TestStand/Copy-result-container-why-do-I-get-a-property-types-do-not-matc...
    Regards
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • Need to use variable Local Paths

    Hello,
    I have a the following snippit, how can I add a variable to the bolded UNC path C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\gpreport.xml
    Those paths will change a lot in my scenerio. Thank you.
    $file_server = Read-Host "Enter the file server IP address"
    (Get-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\gpreport.xml") | ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } | Set-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\gpreport.xml"
    (Get-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\Backup.xml") | ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } | Set-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\Backup.xml"
    (Get-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Documents & Settings\fdeploy1.ini") | ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } | Set-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Documents & Settings\fdeploy1.ini"
    (Get-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Preferences\Drives\drives.xml") | ForEach-Object { $_ -replace "\\99.999.999.999", "\\$file_server" } | Set-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Preferences\Drives\drives.xml"
    (Get-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Preferences\files\files.xml") | ForEach-Object { $_ -replace "\\99.999.999.999", "\\$file_server" } | Set-Content "C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\DomainSysvol\GPO\User\Preferences\files\files.xml"

    I'm not sure I understand the question. Are you saying you want the bold part of your path (currently hard-coded) to be in a variable instead? That would look something like this:
    $file_server = Read-Host "Enter the file server IP address"
    $guid = '{231A178D-DC6C-4186-9575-9C64F07DA5B5}'
    (Get-Content "C:\TEMP\GPO\source\5\$guid\gpreport.xml") |
    ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } |
    Set-Content "C:\TEMP\GPO\source\5\$guid\gpreport.xml"
    (Get-Content "C:\TEMP\GPO\source\5\$guid\Backup.xml") |
    ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } |
    Set-Content "C:\TEMP\GPO\source\5\$guid\Backup.xml"
    (Get-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Documents & Settings\fdeploy1.ini") |
    ForEach-Object { $_ -replace "99.999.999.999", "$file_server" } |
    Set-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Documents & Settings\fdeploy1.ini"
    (Get-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Preferences\Drives\drives.xml") |
    ForEach-Object { $_ -replace "\\99.999.999.999", "\\$file_server" } |
    Set-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Preferences\Drives\drives.xml"
    (Get-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Preferences\files\files.xml") |
    ForEach-Object { $_ -replace "\\99.999.999.999", "\\$file_server" } |
    Set-Content "C:\TEMP\GPO\source\5\$guid\DomainSysvol\GPO\User\Preferences\files\files.xml"

  • Effacer les variables, locales, globales, tableau.... à chaque lancement du programme

    Bonjour,
    Existe t'il une fonction ou commande permettant d'initialiser toutes les variables, tableau, variable globale, commandes diverses dans mes sous VI ? A la façon matlab "clc" ou "clear all".
    merci,
    sebastien

    En utilisant un noeud de méthode pointant sur ton VI : Méthodes VI->Valeurs par défaut-> rétablir les valeurs par défaut.
    Cdlt,
    Sébastien DURAND
    Pièces jointes :
    essai.vi ‏13 KB

  • ABAP Dump ASSIGN LENGTH 0 SAPLSNR3 LOCAL Buffer - BI content installation

    Hi all,
    I get the following ABAP dump while installing the BI content and choosing the grouping ' in dataflow before' in Bi 7.0 SP 13
    Short text                                                             
        Program error: ASSIGN with length 0 in program "SAPLSNR3".                                                                               
    Error analysis                                                                     
         In an ASSIGN statement in the program "SAPLSNR3" a field symbol with           
         length 0 should have been created. However, this is not possible.              
         length 0.  This is not possible     s                                                                               
    Trigger Location of Runtime Error                                                  
         Program                                 SAPLSNR3                               
         Include                                 LSNR3F01                               
         Row                                     178                                    
         Module type                             (FORM)                                 
         Module Name                             LOCAL_BUFFER                           
    How to correct the error                                                             
        If the error occurred in your own ABAP program or in an SAP                      
        program you modified, try to remove the error.                                                                               
    If the error occures in a non-modified SAP program, you may be able to           
        find an interim solution in an SAP Note.                                         
        If you have access to SAP Notes, carry out a search with the following           
        keywords:                                                                               
    "ASSIGN_LENGTH_0" " "                                                            
        "SAPLSNR3" or "LSNR3F01"                                                         
        "LOCAL_BUFFER"                                                                               
    I did search for the same error discussion in the forum. However most of them are dealing with "LOCAL_ENTRY_EXISTS" while this dump is related to "LOCAL_BUFFER".
    Kindly let me know if anyone has similar issue and got it resolved.
    Thanks in advance
    Kee

    For  anyone who come across the same error - here is the solution.
    Assign the number ranges for  objects
    BI_TS , BI_TSDTEL, BI_TSDOMA and BI_CS  in tcode SNUM as below
    No. From Number  To Number      Currenct Number
    01    0000000001    9999999999    1
    You can surpass this error.
    Thanks
    Kee

  • Using local variables

    trying to use a simple local buffer to get an interger value and use it some where else. any help?

    If you are using a state machine, here is another way to create local variables.  Create a cluster with all local variables that you need.  Wire into a shift register.  Use Unbundle to get the value and Bundle to change the value.  See code below:
    Message Edited by tbob on 05-09-2007 11:58 AM
    - tbob
    Inventor of the WORM Global
    Attachments:
    Local.png ‏4 KB

  • How many ways to read and write a local variable in a called VI?

    Ciao!
    I'm producing my first TestStand sequence. It is called "FirstAttempt" and it is made by a single step which calls a VI. One of the first dilemmas i encountered realizing this sequence is how to read and write a local variable (created going in Variables -> Locals ('FirstAttempt') -> <right click to insert local>) in the called VI.
    The first way (the only one i tried) is to create a control and an indicator on the VI front panel, connect them to their respective terminals in the connector pane and then specify (going in Step Settings -> Module) that these connectors (shown in the Parameter Name column) are linked to the local variable (selected in the Value column).
    The second way (not tried) consists in using TestStand API: create a Sequence Context reference on the VI front panel, link it to a property node in the block diagram, select the property "Locals" and extract from this the local variable name and value which, i think, can be readable and writable.
    So...
    Are the shown ways correct?
    Are there other ways?
    Knowing that a "local" variable can be considered "global" within the whole sequence, is there the possibility to simply create a reference to the local variable and use the reference in the called VI block diagram in order to save space in the connector pane (if using method 1) or in the block diagram (if using method 2)?
    Thanks!
    Message Edited by aRCo on 09-17-2009 05:09 AM

    Hi,
    Before TestStand 3 you would use the second way you quoted as its the only way.
    But now you would use the first way you quoted. You may still what to pass the SequenceContext if you were going to use the TestStand API. For TestStand 3.x and above you would use this way as the first chose. (Personnelly, I would not pass the SequenceContext into a VI if I know it was never going to be used in that VI.)
    Not sure I understand your final comment, maybe you are liking it to passing the reference of a control to a subVI so that the control can be updated from within the subVI.
    If this is the case and you had a situation where you had a step that was running in parallel with the rest of the steps in the sequence either as a separate thread or execution and were dependent on the contents of the  local variable changing from that parallel running step, then you would have to use the API SetVal method to change the local.
    Hope this is clear.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Cannot insert field or paste in existing Local Variable (container of booleans)

    Cannot insert field or paste in existing Local Variable (container of booleans)...  TestStand 4.1.
    This is very strange, especially since I have done it before. 
    The "paste" and "insert field" selections are greyed out and disabled from the right-click menu.  I have tried everything I could imagine, and searched various combinations of posts.  I am sure it is something redicoulously simple, bu I cannot find the redicule to solve this annoying issue.
    The local variable is a container of booleans.  It has 90 elements and I need to add one more.  I cannot edit / rename or do anything with this Local.  Must be karma (for thos who know me in the LabVIEW forum).  Usually, you right click, insert field and it's there..  Not this one..
    Has anyone seen this before?  Closing and re-opening TestStand did not change anything.  There is a matching cluster in LabVIEW which feeds the local in TestStand.
    It is a container of custm data type.  The Edit Flags are ok (edit is allowed).  Can't think of any other valuable info..
    Solved!
    Go to Solution.

    I should correct an erratum in my original post.. 
    Since I am not the original author of the code, I am not sure it is a custom container.  As a matter of fact, I don't think it is.
    It does not appear in the custom data types.  So it must be a Local.
    I will attempt to clarify what I am dealing with...  (TestStand 4.1)
    Maybe pictures are worth thousands of words.
    As with typical TestStand projects, there are various variables:  Locals, Parameters, FileGlobals, etc..  Nothing odd here.
    The one I am concerned about is the Options_Present which is a container of booleans.
    I am sure I have edited this one before.  Although I seem to recall that it was automatic after changing the cluster in LabVIEW.
    Within the Locals, the  2 that are underligned in red do not allow to edit anything (change name, add, delete, paste).
    Trying to Insert Field or paste are not possible.
    Attachments:
    Variables.PNG ‏8 KB
    Locals.PNG ‏28 KB
    cannotInsert.PNG ‏9 KB

  • Variable scope local, pattern match compactly

    Hi,
    I read lines from a file and would like do something different with the line depending on whether it contains a single word or two words.
    var rxA:RegExp = /^\s*(\S+)\s+(\S+)\s*$/;
    var rxB:RegExp = /^\s*(\S+)\s*$/;
    str is the line I read from a file
    if( rxA.test(str) ){
        var match:Object = rxA.exec(str);
        do something with match[1] and match[2];
    if( rxB.test(str) ){
        var match:Object = rxB.exec(str);
        do something with match[1];
    With this code I get an error message, the object name "match" is used twice. Is it possible to make this variable local such that no other routine outside the "if" block can see this object?
    Is it possible to do not only the test, but the exec also inside the if( ... ), like this (similar to Perl):
    if( var match:Object = rxA.exec(str) ){
        do something with match[1] and match[2];
    Thanks,
    Illes

    Hi,
    Regading the first question, unfortunatelly "match" is function bound.
    You can however define it only once outside the two ifs, as in:
    var match:Object;
    if( rxA.test(str) ){
        match = rxA.exec(str);
        do something with match[1] and match[2];
    if( rxB.test(str) ){
        match = rxB.exec(str);
        do something with match[1];

  • Passing local variable to subsequence

    I have a sequence that sets a local variable, Locals.LowPassFreqGhz = 1.800. 
    Then it runs 5 subsequences.
    The Local is set to a new value and then the same 5 subsequences are run again.
    Now I have new model numbers where the pair is different and soon will have models where there will be groups of 4 frequencies instead of two. Therefore I would like to put the 5 seqs into a subseq and pass the freq based on a select statement. In my limited understanding and knowledge of TestStand I think the subsequence would have its own Local.variables. How should I pass this local to a subsequence, convert to a File.global?
    thanx,
    jvh 
    Solved!
    Go to Solution.

    there is another way also to  
    Teststand give us an option of "Propagation" of a  variable to subseqeunce.
    we need to  create a local variable both in main and sub sequence with same name and use "Propogate to subsequence" in main seqeunce and " allowpropagation from caller" in sub seqeunce.
    This option of propagation one can see by right click of a variable in variables pane. This allows us to get the values of variables in main seqeuence to sub seqeunce.
    But need to remember that both variable names in main and sub sequence should be the same.
    Regards,
    Praveen.

Maybe you are looking for

  • Music app on Ipad not playing off Itunes match

    The music app for my Ipad2 worked perfectly playing songs off ICloud until today.  Suddenly, when I select a song to play, instead of downloading it runs through every song on the album without actually playing any music.  Any ideas what's wrong?

  • Error in Seeding Translation Text

    Has anybody ever seen the following error when seeding the translation text? ORA-20001: WWV_FLOW_SEED_TRANSLATIONS.SEED_UPDATE_ERROR Following the error above, updating the translate file produces the following error: ORA-00600: internal error code,

  • Auto Lock frequency is not long enough

    I need to be able to have more than 5 minutes before an auto-lock occurs. We are using iPads to connect to a patient's Electronic Medical Record via a Terminal Server. It usually takes more than 5 minutes to see a patient and when the Auto Lock activ

  • X-Fi Titanium Fatal1ty Pro on P7800 7.1 speakers.

    Hi Everyone. I just?get a X-Fi Titanium Fatalty Pro (It's better late than never, right? LOL). I found around that X-Fi Titanium Fatalty Pro will recognize?my oldie but goodie?analog P7800 speakers. My question is shoul I only?need to connect the eac

  • Can we change which apps we use?

    We had acquired a Creative Cloud for Teams subscription for a graphics employee (Temp) who no longer works for us. She used InDesign, Photoshop and Illustrator.  I would like to take over the subscription but I work primarily in video. I would like t