Gestion multi fifo (multi DAQ) non synchronis​és

Bonjour à tous !
Mise en situation :
- 3 DAQ Ethernet
- Acquisition en continue pour un programme de monitoring  (Producteur)
- Le traitement des données consistent à:  (Consommateur)
 * Mise à l'échelle
 * Recherche de seuil
 * Enregistrement en fichier
Le problème :
Si j'ai un problème de synchronisation sur un DAQ comment faire pour traiter les données de façon correcte.
Pour l'exemple chaque waveforms du
DAQ A serons appelé aX
DAQ B serons appelé bX
DAQ C serons appelé cX
Le temps sera communément appelé tX
Exemple
t0   a0 b0 c0
t1   a1 b1 c1
t2   a2 b2
t3   a3 b3 c3
t4   a4     c4
Dans cet exemple j'ai perdu pour je ne sais quelle raison les valeur c2 et de b3.
Mais alors comment réagir dans le VI de traitement.
Je rappelle que les DAQ ethernet ne sont pas synchronisé par une ligne de triger. Donc impossible de savoir que les donnée ne correspondent pas dans le temps.
Ma solutions :
On dépile quand on à un élément dans chaque fifo. (Problème : On va donc dépiler les donnée de a2 b2 et c3. )
Si on a une fifo qui dépasse les 3 éléments (est d'autre qui reste en retard) -> On dépile un élément dans toutes les fifos qui on produit. (Problème : Quand le DAQ en HS revient on à 2 éléments dans les fifos de celle qui fonctionnaient. On vas donc dépiller par exemple a5 b5 c8 puis a6 b6 c9.)
C'est difficile à expliquer comme problème. J'espère avoir été le plus clair possible.
Dites moi si vous avez une idée pour gérer les fifos.
Merci !
Advitam

Bonjour Arnoldo,
Ceci est la partie internationale du forum, merci d'y poster en anglais à l'avenir.
Voici le lien de la section française traitant des questions sur une utilisation de LabVIEW : Discussions au sujet de NI LabVIEW
Pourriez-vous également envoyer votre code, de manière a ce que nous puissions voir ce que vous avez programmé ?
Cordialement,
Vincent.O
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;}
Été de LabVIEW 2014
12 présentations en ligne, du 30 juin au 18 juillet

Similar Messages

  • Multi-State Non-Resident Tax

    Hello,
    In the case where you have employees who live in one state but who may work in multiple states during a pay period (i.e. traveling sales employees, or consultants) how are you handling the collection of time spent in each state for payroll tax purposes?  We have considered using the percentage on the IT208 to prorate the time, and have also discussed using the CAT2 time sheet.  I'm looking for how others are handling this.  Is anyone willing to share how their company handles captures time for multi-state non-resident taxation?
    We can talk off-line if you prefer.
    Thank you,
    Cheryl

    Hi Cheryl,
    There is an SAP functionality of Work Tax Area Override which can used from combination of IT2010 (maintaining tax area under Tax area record type field) and processing class 67.
    This will charge time entered on IT2010 only to tax on work tax area entered in IT2010 against it and that wage type should be marked for PCL 67 too.
    There are changes required to sub-schema UT00 for this to work properly.
    Hope this helps.
    Thanks,
    Ameet

  • [svn:bz-trunk] 12951: Changed synchronized PropertyProxyRegistry#getRegistry method to non-synchronized to avoid threads blocking in message push .

    Revision: 12951
    Revision: 12951
    Author:   [email protected]
    Date:     2009-12-15 02:17:31 -0800 (Tue, 15 Dec 2009)
    Log Message:
    Changed synchronized PropertyProxyRegistry#getRegistry method to non-synchronized to avoid threads blocking in message push.
    Checkintests: Pass with the usual 3-4 tests that time out with and without this change.
    QA: Yes
    Doc: No
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/io/PropertyProxyRegistry.java

    Revision: 12951
    Revision: 12951
    Author:   [email protected]
    Date:     2009-12-15 02:17:31 -0800 (Tue, 15 Dec 2009)
    Log Message:
    Changed synchronized PropertyProxyRegistry#getRegistry method to non-synchronized to avoid threads blocking in message push.
    Checkintests: Pass with the usual 3-4 tests that time out with and without this change.
    QA: Yes
    Doc: No
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/io/PropertyProxyRegistry.java

  • Multi mapping for Synchronous Interface (RFC)

    Is it posssible to define synch multimapping (RFC)?
    For exmaple my structure is
    request
    <items>
    <item>
    </item>
    <item>
    </item>
    </items>
    I want  to invoke RFC for each <item> and to get response like
    <responseitems>
    <item>
    </item>
    <item>
    </item>
    </responseitems>
    Do I need synch BPM or it is possible without?

    Hi,
    u can do these buy settin the rfc to rfc to unbounded and map the items with the rfc so for every item u will get a rfc.
    u can use <b>packaging</b> to perform the multimapping where u can avoid bpm.just create a external defnition for ur rfc and change the occurance of the rfc to 0..unbounded and use the external definition for mapping.
    so for each <b>item tag a rfc will be generated</b>.
    To get the response give ur inbound interface as synchronous.
    regards
    jithesh
    Message was edited by: jithesh balakrishnan

  • IPhone Gen 1 - Bottom Multi-Touch non-responsive

    My phone is out of warranty as of July 2nd, 2008. Google this issue about the bottom half of the iHone not working and this is a KNOWN MANUFACTURE defect but Apple wants $199 to replace with like model of Gen 1 iPhone.
    If I want to spend the same money I can get the 3G but I have to extend my contract for a KNOWN MANUFACTURE defect.
    Does anyone work at apple that could please help me replace my first gen iphone with another first gen. iphone.
    - Life long Apple User

    I just had the same problem with a non-responsive bootom portion of the screen on my 1st generation. Apple knows that it is a screen defect yet to all of us first buyers and believers in Aplle service, they just want to sell us a new iphone. I had gone into the store after being told tha it was a know defect to Apple the day before to purchase a new 3G iphone for my girlfriend and replace my 1st generation phone...but am told that to since my phone was purchased in July of 2007, known defect or not, it will not be replaced and to repair it is the same price as the new 3G!!! so much for believing in Apple service, especailly when I see that others below have had their phone replaced "no questions asked"!!! If anyone hears of replacement or Apple standing up to the service standards, please let me know.

  • Multi-Record (NON-DB) block - duplicate records

    I have a non-db block called 'EDITOR_INFO' that captures all the editor's information. The block has the following fields in it: editor_name,editor_type,address_lines1 thru4, city, state, zip, taxid_ssn_type,taxid_ssn.
    I need to check to make sure that the user is not entering the duplicate editors. How can I adapt the infamous Kevin Clarke's solution to this (if at all)? What would be my datablock, control block etc?
    Can any one pls. provide any guidance.
    Thanks,
    Chiru
    Edited by: Megastar_Chiru on Nov 8, 2010 3:55 PM
    Edited by: Megastar_Chiru on Nov 8, 2010 3:56 PM

    Chiru, if all you need is to add/query records in a block, you should consider making a data-block instead of control-block. And use POST to post the data into table which will let you check against the table if a record exists or not.
    But if you want to have it done using a control-block then follow below sample steps.
    In WHEN-VALIDATE-RECORD of your control block, you can check if entered record is already in the table or not.
    If it exists, then raise error message and stop until user corrects the data... if it does not exist, then INSERT into the table.
    For this scenario, I created a small table with two columns.
    CREATE TABLE TABLE_A (Col1 NUMBER, Col2 VARCHAR2(30));Now I created a form with a control block (BLOCK2). It has 10 records with vertical layout and two control-items on it (TEXT_ITEM4 and TEXT_ITEM5). And below is code used on WHEN-VALIDATE-RECORD.
    -- WHEN-VALIDATE-RECORD
    DECLARE
      temp VARCHAR2(1);
      CURSOR c_check_existance IS
      SELECT 'X'
        FROM table_a
       WHERE col1 = :BLOCK2.text_item4;
    BEGIN
        :GLOBAL.Valid_Records := 'N';
         IF :block2.text_item4 IS NOT NULL THEN          
              OPEN c_check_existance;
              FETCH c_check_existance INTO temp;
              IF c_check_existance%FOUND THEN
                   CLOSE c_check_existance;
                                                    :GLOBAL.Valid_Records := 'N';
                   MESSAGE('Record already exists in table');
                   RAISE FORM_TRIGGER_FAILURE;
              ELSE
                   INSERT INTO table_a (col1, col2)
                                VALUES (:block2.text_item4, :block2.text_item5);
                                                    :GLOBAL.Valid_Records := 'Y';
              END IF;
              CLOSE c_check_existance;
         END IF;
    END;Remember, when making a control block like a data block, you have to code everything yourself.

  • Concurrent, non-synchronized, lazy initialization: is this correct?

    Guys, I would appreciate a sanity check on some code of mine.
    I have a class, call it State. Every instance is associated with a key of some type. Each user will know the key it wants to use. It will present that key to State to request the corresponding State instance. They must always receive back that sole instance that corresponds to key. The keys are unknown until runtime, so you must lazy initialize a State instance when first presented with a given key.
    If concurrency was not an issue, then State could have lazy initialization code like this:
         /** Contract: never contains null values. */
         private static final Map<Object,State> map = new HashMap<Object,State>();
         public static State get(Object key) {
              State state = map.get(key);
              if (state == null) {
                   state = new State();
                   map.put(key, state);
              return state;
         private State() {}     // CRITICAL: private to ensure that get is the only place instances createdBut heavy concurrency on get is present in my application. While I could trivially make the above code safe by synchronizing get, that would cause it bottleneck the entire application. Vastly superior would be the use of some sort of concurrent data structure that would only bottleneck during the relatively rare times when new State instances must be created, but would allow fast concurrent retrievals when the State instance has already been created, which is the vast majority of the time.
    I think that the unsynchronized code below does the trick:
         /** Contract: never contains null values. */
         private static final ConcurrentMap<Object,State> map = new ConcurrentHashMap<Object,State>();
         public static State get(Object key) {
              State current = map.get(key);
              if (current != null) return current;
              State candidate = new State();
              current = map.putIfAbsent(key, candidate);
              return (current == null) ? candidate : current;
         }Here is how it works: most of the time, just the first two lines
         /** (ignore this) */
         State current = map.get(key);
         if (current != null) return current;will be executed because the mapping will exist. This will be really fast, because ConcurrentHashMap is really fast (its always slower than HashMap, but maybe only 2X slower for the scenario that I will use it in; see [https://www.ibm.com/developerworks/java/library/j-benchmark2/#dsat] ).
    If the relevant State instance is not present in map, then we speculatively create it. Because get is unsynchronized, this may/may not be the one actully put on map and returned by the subsequent lines of code because another thread supplying the same key may be concurrently executing the same lines of code. That's why its named candidate.
    Next--and this is the real critical step--use ConcurrentMap's atomic putIfAbsent method to ensure that just the first thread to call the method for a given key is the one who suceeds in putting it's candidate in map. We reassign current to the result of putIfAbsent. Its value will be null only if there was no previous mapping for key but this call to putIfAbsent suceeded in putting candidate on map; thus, candidate needs to be returned in this case. But if current is not null, then some other thread with the same key must have been concurrently calling this code and was the thread which suceeded in putting its State on map; thus in this case current will have that other thread's value and so return it (with this thread's candidate being a waste; oh well).
    Note that this problem is similar in spirit to the infamous double checked locking idiom. Since that is such a treacherous minefield
    [http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html].
    I would really appreciate another set of eyes looking over my code.

    Hi Bbatman,
    Thank you so much for your answer.
    Pietblock: I believe that your double checked locking proposal is still wrong.OK, I do believe you.
    Did you read the link that I provided in my initial post?
    It discusses some known solutions,
    the best of which for singletons is a value helper class,
    followed by making the reference to your singleton be volatile
    (assuming that you are using jdk 1.5+).Yes, I did read that article some time ago, when I first got warned for double checking. I never quite understood the keyword "volatile". Now, when reading it again, I see some light glimmering.
    But your proposal has some strange elements.
    First, both the singleton field as well as accessor method are always static
    --why did you make them instance based in your code?
    In order to call them, you already need an instance which defeats the purpose!
    Are you sure about that choice?Yes, that is deliberately. The intended use is to define a static instance of SingletonReference in a class that needs to be instantiated as a singleton. That reference is then used to obtain the singleton.
    Assuming that leaving out static on those was a typo,
    the only innovation in your proposal is the claim that
    "Executing an instance method on the new singleton prevents inlining".
    Where did you get that idea from?
    Its news to me. Instance methods often get inlined, not just static methods.The non static field is not a typo, but intentional. What you call a "innovation", my assumption that I prevented inlining, is exactly what I was not very sure about. I can't imagine how an interpreter or JIT compiler would navigate around that construct, but nevertheless, I am not sure. Your remark suggests that it is unsafe and I will reconsider my code (change it).
    The reason why most double checked locking solutions fail,
    including I believe yours,
    is due to completely unintuitive behavior of optimizing java runtime compilers;
    things can happen in different time order than you expect if you do not use some sort of locking.
    Specifically, typical double checked locking fails because there is no lock on the singleton,
    which means that writes to it can occur in strange order,
    which means that your null-check on it may not prevent multiple instances from being created. Yes, you convinced me.
    Thank you so much for looking into it
    Piet

  • I wish:  Sequential (non-synchronous) loading of tabs . . .

    What I would like as an option in Preferences ( Safari ), is the ability to select "one tab at a time" tab loading when doing a multiple tab selection in any particular window. In other words, load one tab at a time successfully, and then load the next tab successfully, and so on.
    I have found that Safari can spend a lot of time attempting a multiple tabbed load, and then succeed to load no tabs or just a few, because of timeouts.
    While SeaMonkey and Firefox do not offer this as an option, they will successfully load all tabs synchronously, a bit of a tab at a time.
    So there may be a requirement that Safari not " time-out " on multiple tab loads, or to give the option for which I am wishing.
    silky_smooth

    Hi
    Welcome to Apple Discussions
    Regarding your "wish", best place to post it is via Safari Menu>Report Bugs to Apple. While Apple doesn't usually respond to these types of queries, it's a good idea to let Apple know from a User perspective what your needs are.
    Regarding the HTTP timeout, 3rd party shareware SAFT has a number of very useful additional features, including one that extends the time interval for page loading (variable - up to the user as to the length of time (in seconds)).

  • Non-synchronized client method calls

    hi there,
    i am having following scenario:
    methods provided in the remote interface of a stateful session bean are called by a remote client.. client is using multithreading. now these methods in stateful session forward method calls to a stateless session and then an entity using local interfaces. the point here is that the client only has one object of the stateful session ( obviously an object per user session)
    the problem is that when i call the methods on this object one by one it goes fine. but when in multithreaded client application one method is called by first thread and another by second at the same time, application crashes. and the server tells that client has tried to enter stateful session with different transaction context. does anybody have some idea to solve this problem without having the client to make synchronized calls.
    thanx in advance,
    ra4a

    Hi,
    The Container serializes calls to stateful session beans.And hence your application calling in a multithreaded environment will surely fail.This is because the state of the bean might be corrupt when calls are concurrent.And different applications servers might provide some way of overriding this behaviour..Surely weblogic has got one way..
    Sathya

  • How to find non synchronized song in iTunes?

    I have about 5,000 songs in iTunes and the same minus 7 in the iPod.
    How do I find the songs that were not synchronized?
    Thanks,
    Message was edited by: Girshon Rutstein

    I don't know for certain, but I'd hazard a guess that you've randomly unchecked 7 songs and have the "sync only checked songs option ticked". You could fix this by going to the main music folder, selecting all tracks, and then right/option click and select Check selected. Might also be worth looking at the "Kind" field. iTunes can play MIDI tracks, but won't sync them to the iPod. You should get a warning that it can't sync certain types of tracks but this warning can be disabled.
    tt2

  • Multi-threaded server with independent IO

    I have designed a multi-threaded server which handles XML via sockets. I am running into the issue that when I try to send data to all of the clients, I have having to iterate through a shared resource where the sockets are stored at. I do not have this problem with reading because it is done in the thread created for this client (I pass the socket into the thread). If one computer freezes, then the iteration (writeToAll) through the client sockets also freeze. I would like to send XML to all clients and have everything fully independent so if it has a problem writing to a client, then it wouldn't halt the server. I would spawn a new thread for each write but that wouldn't be practical and I worry about threads live-locked.
    I have looked into JCSP and it looks promising for the common issues associated with thread programming, but this is more of a design issue.
    Any robust multi-threaded servers out there for enterprise use and scalability?

    A basic server which provides an example of what I mean:
    http://www.wellho.net/solutions/java-a-multithreaded-server-in-java.html
    connectiontable is a non-synchronized static method; I use a synchronized non-static method. I do not know which one I need to use.
    The problem: If a socket "lingers" on sending output* (ex if the client is frozen but the socket is still bounded), then it never throws an exception!
    *Sending from a shared resource (hashtable) on the parent thread (where the serversocket resides).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Synchronizing analog input and output

    I am in the middle of converting some Traditional NI-DAQ code to the
    DAQmx API (I am using C++).  Most of it is going quite well: my
    code complexity has been greatly reduced and (since upgrading to 7.4)
    my CPU usage has plummeted.  However, in one particular case I
    need my input and output buffers to be synchronized.  I.e. sample
    0 of my input buffer should be read at the same instant sample 0 of my
    output buffer went out on the line.  In Traditional NI-DAQ, I
    synchronized my input and output start triggers using the following
    method (which I believe I found in an example somewhere):
    error = Select_Signal(addr, ND_PFI_6, ND_OUT_START_TRIGGER, ND_LOW_TO_HIGH);
    error = Select_Signal(addr, ND_IN_START_TRIGGER, ND_PFI_6, ND_LOW_TO_HIGH);
    This then allowed me to setup my input thread, then initialize
    everything in my output thread and when my output got the start
    command, so did my input.  The result was that I could perfectly
    match buffers of output data to buffers of input data (after taking all
    the appropriate buffering into account).
    When I try the same method with the DAQmxConnectTerms function, my
    buffers don't line up.  They are off by 15-20 ms out of a 400ms
    buffer (sampling at 10kHz).  I tried cutting out the middle man of
    PFI6 with similar results.  So my current "synchronize" block
    looks like this:
    error = m_fnConnectTerms("/Dev1/ao/StartTrigger", "/Dev1/ai/StartTrigger", 0);
    I get no error.  This also seems to cause my output loop to hang
    after a few seconds, although that could be a side effect of something
    else that I haven't tracked down yet.  Is there a better way to do
    what I'm trying to do here?  Perhaps it is a misunderstanding of
    the way buffering works on the M series cards (I am currently using a
    6221).

    Don't use Connect Terminals. Use the technique shown in this example program
    C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Synchronization\Multi-Function\ContAI-Read Dig Chan
    which is the sharing of sample clocks via the DAQmxCfqSampClkTiming function where the sample clock source of one task is set to the clock of the other task.  This example slaves a digital input task to an analog input task but the idea is the same for your application.

  • Non PO Invoice Workflow - Error while Posting Document

    Hi Experts
    Hope I am posting this in the right forum as I am new to SDN!
    We have customized a multi-level non PO invoice workflow which triggers at the time of clicking 'Save as Completed' in tcode FV60.
    It has been configured to automatically post the document once it is approved at all the required levels. However, the document cannot be posted even after it receives all levels of approval. The status shows as 'Complete' but the error message shown is 'No Amount Authorization for Customer/Vendor in Company Code' in the workflow screen (MSGID F5, MSGNO 155).
    Now as I understand, this is the error for maintenance of user ID in tolerance groups. However, all user IDs have already been maintained and no matter who parks the document, the same error appears in the workflow screen.
    We have no idea whether this is happening due to some missing config from FI side or WF side.
    Regards

    Hi
    Go to Tcode: OBA3 Assign tolerance group under your company code and give all limits for each group. If you done this one your properly your problem should solve.

  • Multimapping for Synchronous interfaces.

    Hi,
    Is it possible to do multi mapping for synchronous interfaces.
    I have observed that when the cardinality of the target service  interface is changed to 0:unbounded , the response message mapping  tab disappears from operation mapping.
    Can anyone please suggest how it can be handled?
    I have a requirement to call a webservice and then write multiple files from the webservice response.

    Hi Soumya,
    i dont think so ...if you think theroitically. you are doing multimapping   where u  have a N:M relation... so it will be difficult match the respose directly.
    Since your scenario is syncrhronous, u have to rember the identity of source messgaes and then u need to reply back to those same identitiies. That means u have to use correlations  and that can be achived by BPM.

  • Http-xi-RFC synchronous call - multiple records ?

    Hi Gurus,
    Can we have multiple records processing in RFC synchronous call ? for ex, BAPI_COMPANY_GET_DETAIL. I want to feed multiple company ids and get the responses in browser.
    I have changed cardinality in message mapping and interface mapping as <b>o to unbounded.</b> Tested the same which works fine.
    But, <b>when I activated the interface mapping, I get an error</b> which says I can not use multi mapping in synchronous RFC call.
    what is the alternative ? please help.

    HI,
    It is better to use the RFC lookup in mapping and get the multiple records , i men each one for one lookup , so that in your mapping use UDF for RFC lookup.
    see the below link
    Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Also read thru this to get more idea on lookups - http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0
    Lookup’s in XI made simpler - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    /people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
    Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    Lookups - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
    Regards
    Chilla

Maybe you are looking for