Counters Synchronization

I would like to synchronize the clocks of two counters to figure out the offset between them. Th floowing worked in Traditional, but not sure how to so that in NIDAQmx.
  //Set Up Clock Counter
  int Status = pGPCTR_Control(m_NIDeviceNumber, ulGpctrNum, ND_RESET);
  if(Status){
   AfxMessageBox("Could not Reset Clock Control.",MB_OK);
   return FALSE;
  Status = pGPCTR_Set_Application(m_NIDeviceNumber, ulGpctrNum,ND_BUFFERED_EVENT_CNT);
  if(Status){
   AfxMessageBox("Could not Set up Clock Buffering Event.",MB_OK);
   return FALSE;
  unsigned long Resolution = ND_INTERNAL_100_KHZ;
  if(m_NIClockResolution==1)
   Resolution = ND_INTERNAL_20_MHZ;
  Status = pGPCTR_Change_Parameter(m_NIDeviceNumber, ulGpctrNum, ND_SOURCE,Resolution);
  if(Status){
   AfxMessageBox("Could not Set Counter to internal Clock.",MB_OK);
   return FALSE;
  Status = pGPCTR_Change_Parameter(m_NIDeviceNumber, ulGpctrNum,ND_GATE,Gate);//ND_PFI_7);
  if(Status){
   AfxMessageBox("Could not Set Counter SCANCLOCK/PFI7 Pin",MB_OK);
   return FALSE;
  unsigned long Polarity = ND_LOW_TO_HIGH;
  if(HighToLow)
   Polarity = ND_HIGH_TO_LOW;
  Status = pGPCTR_Change_Parameter(m_NIDeviceNumber, ulGpctrNum,ND_GATE_POLARITY,Polarity );//
  if(Status){
   AfxMessageBox("Could not Change Polarity",MB_OK);
   return FALSE;
  Status = pGPCTR_Change_Parameter(m_NIDeviceNumber, ulGpctrNum,ND_INITIAL_COUNT, 0);
  if(Status){
   AfxMessageBox("Could not Set Counter to Zero",MB_OK);
   return FALSE;
  Status = pGPCTR_Change_Parameter(m_NIDeviceNumber, ulGpctrNum,ND_BUFFER_MODE, ND_CONTINUOUS);
  if(Status){
   AfxMessageBox("Could not Set Counter Buffering Mode",MB_OK);
   return FALSE;
  Status = pGPCTR_Config_Buffer(m_NIDeviceNumber, ulGpctrNum, 0,BufferSize,Buffer);
  if(Status){
   AfxMessageBox("Could not Configure Buffering Mode",MB_OK);
   return FALSE;
  Status = pGPCTR_Control(m_NIDeviceNumber, ulGpctrNum, ND_PROGRAM);
  if(Status){
   AfxMessageBox("Could not Set Clock Control",MB_OK);
   return FALSE;
  if(SyncToGpctrNum>0 && pGPCTR_Watch!=NULL){              //How do I get this done in NIDAQmx ???  
   pGPCTR_Watch(m_NIDeviceNumber,SyncToGpctrNum,ND_COUNT,&watchValue);
   pGPCTR_Watch(m_NIDeviceNumber,ulGpctrNum,ND_COUNT,&watchValue1);
   m_NIClockOffset=(watchValue-watchValue1);

Hi SoftwareGuy2009,
Could you give me an idea of what you are trying to do?   You can find examples for DAQmx at Start>>Programs>>National Instruments>>NI DAQ>>Text Based Code Support.  These will give you a good idea of how to use your device with DAQmx. 
Regards,
Jim Schwartz

Similar Messages

  • Counters synchroniz​ation in daqmx

    Hello Everybody,
    I'm rewriting custom software in LabView from DAQ to DAQmx. I have the following problem:
    I need Ctr0 (at low frequency) to trigger "packets" of pulses on Ctr1 (that operates at high frequency). I'm using Pause,Trigerr option on Triggering node. Since pulse trains on the Ctr1 and Ctr0 "drift" with respect to each other that causes idle state of the Ctr1 oscillate between 0 & 1 - depends in what state it was left after Ctr0 pulse.
    Does anybody have any idea how to overcome this problem?
    I tried to synchronize start of both counters by triggering them from the pulse of the third counter but it does not help. Also, it is impossible to use Start.Trigger opting  with Pause.Trigger optin on the same counter.
    Here is a VI that demonstrates the problem.
    I'm using NI 6052 board with 2 counters. Ctr0 Out is wired to PFI4 (Ctr1 G)
    Thank you in advance.
    Pta.
    Attachments:
    IdleStateDrift.vi ‏37 KB

    Ok, it seems that I fixed the problem.
    In case it will be useful for the others, there is a solution:
    If you are trying to replicate Finite Pulse Train Int (DAQ-STC).vi in DAQ/Examples you need to use just one counter in DAQmx in Finite/Retriggerable mode. It eliminates necessity of 2nd counter and Pause Trigger option so there is no problem with counters drift.
    I have wasted several days of my time on this simple task.

  • FIM 2010 Management Agents usage

    Hi all,
    we have implemented some FIM management agent that read information from different AD forest and the write email contacts into a destination forest. I looking for a tool, or powershell cmdlets I can use to export management agents errors.
    I try to explain better, ope FIM Syncronization Service, click on operations button, select the row that reports errors and in pane below show erros details and informations. In my case DistinguishedName for the object that encountered errors. I would
    like to export this rows to have a list with all the Distinguishedname and the use that with a script to manage and resolve the issues. i hope to have explained my needed.
    Thanks in advance for your help.
    Regards

    Hi!
    You can get this info from FIM sync with WMI.
    $maName = "AD-MA"
    (Get-WmiObject -Namespace "root\MicrosoftIdentityIntegrationServer" -class "MIIS_ManagementAgent"| where {$_.name -eq $maName}).RunDetails().returnvalue
    You will have to pick what you want from the xml but this should get you started.
    /Robert
    Thanks Robert,
    well I try to ask again for more information: :)
    Running your script I retrieve:
    <?xml version="1.0" encoding="utf-16"?>
    <run-history>
     <run-details>
      <ma-id>{AFB1D87E-1580-488F-9F2A-8A382FF4B14A}</ma-id>
      <ma-name>MA_SI</ma-name>
      <run-number>282</run-number>
      <run-profile-name>Delta Sync</run-profile-name>
      <security-id>DOMAIN\user</security-id>
      <step-details step-number="1" step-id="{4550BF08-A3E1-40D4-854E-546C44FBE016}">
       <start-date>2014-04-16 05:10:26.320</start-date>
       <end-date>2014-04-16 05:10:43.310</end-date>
       <step-result>completed-sync-errors</step-result>
       <step-description>
        <step-type type="apply-rules">
     <apply-rules-subtype>apply-pending</apply-rules-subtype>
    </step-type>
    <partition>DC=fqdn,DC=fqdn,DC=fqdn</partition>
    <custom-data>
     <adma-step-data><batch-size>100</batch-size><page-size>500</page-size><time-limit>120</time-limit></adma-step-data>
    </custom-data>
       </step-description>
       <current-export-step-counter>0</current-export-step-counter>
       <last-successful-export-step-counter>0</last-successful-export-step-counter>
       <ma-connection>
       </ma-connection>
       <ma-discovery-errors>
       </ma-discovery-errors>
       <ma-discovery-counters>
       </ma-discovery-counters>
       <synchronization-errors><import-error cs-guid="{F56B20AE-8EA3-E311-A7B3-005056A80FB6}" dn="CN=NAME,OU=Contacts,OU=Resources,DC=fqdn,DC=fqdn,DC=fqdn">
     <first-occurred>2014-04-15 22:20:32.657</first-occurred>
     <retry-count>3</retry-count>
     <date-occurred>2014-04-16 05:10:38.847</date-occurred>
     <error-type>extension-dll-exception</error-type>
     <algorithm-step>provisioning</algorithm-step>
    <extension-error-info>
     <extension-name>MVExtension.dll</extension-name>
     <extension-callsite>provisioning</extension-callsite>
     <call-stack>Microsoft.MetadirectoryServices.ObjectAlreadyExistsException: An object with DN &quot;"CN=NAME,OU=Contacts,OU=Resources,DC=fqdn,DC=fqdn,DC=fqdn"&quot; already exists in management agent &quot;AD_CF&quot;. An object with
    targetAddress smtp:[email protected] already exists, Contact for ObjectName from CAN NOT BE CREATED
       at Mms_Metaverse.MVExtensionObject.Microsoft.MetadirectoryServices.IMVSynchronization.Provision(MVEntry mventry)
    </call-stack>
    </extension-error-info>
    </import-error>
    </synchronization-errors>
       <mv-retry-errors/>
       <outbound-flow-counters ma="AD_CF" ma-id="{58020956-DC2A-4C09-9DF1-296778D4788E}">
     <provisioned-add-flow detail="true">1</provisioned-add-flow>
    </outbound-flow-counters>
       <staging-counters>
        <stage-no-change detail="false">0</stage-no-change>
        <stage-add detail="true">0</stage-add>
        <stage-update detail="true">0</stage-update>
        <stage-rename detail="true">0</stage-rename>
        <stage-delete detail="true">0</stage-delete>
        <stage-delete-add detail="true">0</stage-delete-add>
        <stage-failure detail="true">0</stage-failure>
       </staging-counters>
       <inbound-flow-counters>
        <disconnector-filtered detail="true">2711</disconnector-filtered>
        <disconnector-joined-no-flow detail="true">0</disconnector-joined-no-flow>
        <disconnector-joined-flow detail="true">0</disconnector-joined-flow>
        <disconnector-joined-remove-mv detail="true">0</disconnector-joined-remove-mv>
        <disconnector-projected-no-flow detail="true">0</disconnector-projected-no-flow>
        <disconnector-projected-flow detail="true">1</disconnector-projected-flow>
        <disconnector-projected-remove-mv detail="true">0</disconnector-projected-remove-mv>
        <disconnector-remains detail="false">235</disconnector-remains>
        <connector-filtered-remove-mv detail="true">0</connector-filtered-remove-mv>
        <connector-filtered-leave-mv detail="true">0</connector-filtered-leave-mv>
        <connector-flow detail="true">0</connector-flow>
        <connector-flow-remove-mv detail="true">0</connector-flow-remove-mv>
        <connector-no-flow detail="true">0</connector-no-flow>
        <connector-delete-remove-mv detail="true">0</connector-delete-remove-mv>
        <connector-delete-leave-mv detail="true">0</connector-delete-leave-mv>
        <connector-delete-add-processed detail="true">0</connector-delete-add-processed>
        <flow-failure detail="true">2</flow-failure>
       </inbound-flow-counters>
       <export-counters>
        <export-add detail="true">0</export-add>
        <export-update detail="true">0</export-update>
        <export-rename detail="true">0</export-rename>
        <export-delete detail="true">0</export-delete>
        <export-delete-add detail="true">0</export-delete-add>
        <export-failure detail="true">0</export-failure>
       </export-counters>
      </step-details>
     </run-details>
    </run-history>
    If I want to retrieve information from field:
    <synchronization-errors> and <call-stack> how I can do this ?
    I'd like to have an output with few rows reporting something like:
    <synchronization-errors><import-error cs-guid="{F56B20AE-8EA3-E311-A7B3-005056A80FB6}" dn="CN=NAME,OU=Contacts,OU=Resources,DC=fqdn,DC=fqdn,DC=fqdn">
    <call-stack>Microsoft.MetadirectoryServices.ObjectAlreadyExistsException: An object with DN &quot;"CN=NAME,OU=Contacts,OU=Resources,DC=fqdn,DC=fqdn,DC=fqdn"&quot; already exists in management agent &quot;AD_CF&quot;. An object with targetAddress
    smtp:[email protected] already exists, Contact for ObjectName from CAN NOT BE CREATED
       at Mms_Metaverse.MVExtensionObject.Microsoft.MetadirectoryServices.IMVSynchronization.Provision(MVEntry mventry)
    </call-stack>
    Do you have any ideas on how to do that ?
    Thanks in advance!!!
    Regards

  • How do I synchronize two counters?

    Hi,
    I am using NI-PCI 6115 & BNC 2120. I want to generate two continuous pulse trains using the CTR-OUT0 and CTR-OUT1. I hope these two pulse trains have exact same rising edges, how can I synchronize these two counters? I attached my program here.
    Any suggestion will be greatly appreciated!
    Stephen
    Attachments:
    test.vi ‏33 KB

    Stephen,
    In order to generate two pulse trains on the two counters of your 6115, then you will need to provide a trigger to start both of these counters simultaneously. The counters on the 6115 are controlled via the DAQ-STC counter/timer chip.
    In order to perform these operations you will need to use the more advanced counter/timer VIs in the LabVIEW palettes. I would recommend taking a look at some of the shipping examples, such as Generate Pulse Train (DAQ-STC), in order to get a better understanding of how a single pulse generation works.
    Also, please take a look at the following websites to get a little more information as well:
    Triggering Multiple Counters with a Single Pulse
    http://exchange.ni.com/servlet/Redirect?id=10358279
    Using the Hardw
    are Start Trigger for Single Pulse Generation
    http://zone.ni.com/devzone/conceptd.nsf/webmain/7B2CAD8DD522049386256802007B8B51?opendocument
    If you have any other questions then please let us know.
    Regards,
    Michael H
    Applications Engineer
    National Instruments

  • Synchronize two counters two different cards DAQMX

    I've made a simple program to synchronize the generation of two pulse trains created on different cards (6110 and 6601). When I acquire the pulses they are in fact synchronized but one of the two pulse trains starts always before the other. Is it possible to make them start together? You find the vi attached.
    Thanks for any suggestion.
    -Claudio
    Attachments:
    SynchronizeTwoCountersDAQMX.vi ‏89 KB

    You should use a start trigger on your 6601 task. As the start trigger you should use the same signal that is being used as the start for the 6110 task.
    Hope this helps.
    gus....

  • How can I Synchronize two counters in CVI using NI-DAQmx

    Hi, I am new to NI-DAQmx, and I would like to program counting of random digital pulses using two counters in LabWindowsCVI and a PCI6229 multifunction card. I have the evaluation copy for CVI 7.1
    I would like to set counter0, to count pulses from the 10MHz clock, to generate a single pulse (duration in the few ms timescale), that will gate counter1 in the same card.
    When I try to route the output from counter0 to the gate of counter1 I get an error code
    (-89137, "The specified route can not be satisfied because it requires resources that are currently in use by another route").
    How can one do the equivalent of the "Select_Signal()" in the traditional NI-DAQ?"
    I have also a hard time seting the counter0 to actually count a number of clock cycles from the 10 MHz clock.
    What is the NI-DAQmx equivalent of the function "GPCTR_Change_Parameter()" to program a counter to count a predefined number of clock cycles?
    Any suggestions are welcome.
    Fundadero

    Hi Fundadero-
    It sounds like you're programming for an M Series card with counter operations and need a bit of help with DAQmx functions.
    In order to count edges of the 10MHz reference clock you will need to use a format similar to that found in the CVI shipping example "CntDigEv.prj." This is found in the NI Example Finder (Help>>Find Examples) under Hardware Input and Output>>DAQmx>>Counter Measurements>>Count Digital Events. In order to measure pulses from a source rather than the default input terminal (ctrXsource where X is the counter number), you will need to use the function DAQmxSetCICountEdgesTerm(taskhandle char[] counter, char source terminal) as follows:
    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
    DAQmxErrChk (DAQmxCreateCICountEdgesChan(taskHandle,chan,"",edge,initialCount,countDirection));
    DAQmxErrChk (DAQmxSetCICountEdgesTerm(taskHandle, "/Dev2/Ctr0", "/Dev2/10MHzRefClock"));
    What type of operation are you trying to perform on counter 1? The strategy for routing signals will change based on this. If you're trying to perform gated counting you can specify the the task similarly as above and use the terminal "/DevN/Ctr0InternalOutput" as before. If you are trying to perform frequency measurement you will need to use the DAQmxGetCIFreqTerm function.
    Other channel properties are listed conveniently in the NI-DAQmx C Reference Help found at Start>>Programs>>National Instruments>>NI-DAQ on your start menu. A search for "channel properties list" returns this list.
    Please let us know if you have any additional questions.
    Thanks-
    Tom W
    National Instruments

  • How do I use AI triggers and counters in DAQ6020-E using LabVIEW 6.0

    Hi:
    I am new to LabVIEW and sorry for newbie questions. My questions are:
    1. I want to use the 2 counters in DAQ6020-E to generate 2 continuous pulse trains(C1 and C2) at different frequencies(C1 @ 1k Hz and C2 @ 2k Hz)and I want to synchronize these 2(for example,they both start with positive edges), how can I accomplish that? should I use a software trigger or a hardware pulse trigger?
    2. Followed from 1),there will also be 4 analog inputs(a0,a1,a2,a3) in the same VI. I want them to be triggered by two non-overlapping clock sigals phiA and phiB. phiA and phiB are created by C1 and C2, they both will have 25% duty cycle(with 1k Hz frequency) and are out of phase by 180 degree(thus they wont be bo
    th high at the same time).I want a0 triggered by the postive edge of phiA, wait for 0.1 ms, take 1 sample,stop and wait for the next postive edge of phiA. Similarly, a1 will be triggered by negative edge of phiA(wait .1 ms and then sample), a2 by positive edge of phiB, and a3 by negative edge of phiB.
    I want to know what pins in the 68-pin connectors corresponding to counter0 and counter1 output, and where should I hook up the triggering phiA and phiB to. Should I initialize them first in Measurement & Automation Explorer?
    Thanks so much.
    Alan

    Hello Alan,
    Thank you for contacting National Instruments.
    Here are some answers to your questions:
    1. You will want to use a harware pulse trigger. This pulse will be connected to the gate of both counters. When a rising edge is detected, both pulse trains will be output on the output pins of the counters. See example attached below.
    2. It will not be possible for you to accomplish what you are asking with a DAQPad-6020E. E Series devices only have one analog-to-digital converter (ADC). This means that all 16 channels are multiplexed to a single ADC. This means that it will not be possible to sample(trigger) a0, a1, a2, and a3 simultaneously nor independently. Also, it is not possible to implement the 0.1ms delay from when the edg
    e of the sample clock is detected. Here what you can accomplish:
    1. You can use an external clock to sample(trigger)a single channel.
    2. You can select if you would like the sample your signal on the rising or falling edge of your external clock(phiX).
    3. You can use the output of one of the counters as your external sample clock.
    I have attached two examples below. One of them generates a pulse train from counter 0. The other acquires analog data from channel 0 by using an external clock.
    Here is a link to the DAQPad-6020E User Manual. The output pins for the counter can be found on pages 4-2 and 4-3: http://digital.ni.com/manuals.nsf/websearch/9B5442F668EB7C6B8625669F00743D24?OpenDocument&node=132100_US
    Regards,
    Bill B.
    Applications Engineer
    National Instruments
    Attachments:
    Generate_Pulse_Train_(DAQ-STC).vi ‏103 KB
    Cont_Acq&Graph_ExtScanClk.vi ‏108 KB

  • How do I implement a stop trigger for my 6602 counters?

    I currently have the start of data acquistion for two channels syncrhonized with a start trigger. I am doing simple event counting using two seperate counters.
    For my start trigger, I use a third counter to generate a single pulse and put the output on the trigger line that the two counters are watching.
    Works great! But, I also want to synchronize the stopping of data acquisition for the two channels. I thought this would be simple as configuring a ND_STOP_TRIGGER like I did a ND_START_TRIGGER. But, this is giving me errors.
    Does the 6602 not support stop triggering? Am I just out of luck?

    Hi there,
    this thread is quite old but I'm facing the same problems.
    I'm using a PXI-6602 and a PXI-6521 in a PXI-1033 chassis. On the 6521 I create a continuous sample pulse as a counter output. This I route to the PXI_Trig0.
    On the 6602 I have two counters set up to continuous edge counting with the external clock configured to PXI_Trig0.
    I start counting by setting a internal trigger channel to high which is routed to PXI_Trig1, and this is configured as the start trigger signal for both counters on the 6602 so that they count simultaneously based on their common sample clock.
    This works quite good...but I have some problems to stop the counting.
    I have to stop counting as soon as I have reached 1024 increments (one revolution of a wheel, signal duty cycle 50 %) on one counter and then I have to check if the other counter have reached at least 48 (duty cycle 50%) or 96 pulses (duty cycle 20% or 80%, depending on the revolution direction).
    So far I read the counter value of ctr1 in a loop and if the value is equal to or greater 1024 I stop. Sometimes I miss the value 1024 (how can this happen as I count buffered + continuously?) I make a retry. But I get the impression that even I configured both counters with the same start trigger and sample clock, the counting isn't synchronous. When I try it with two function generators, I works quite good but not perfect. If I connect real life signals, in the lower frequency range (up to 500 1/min of the wheel), I almost always have fewer pulses then necessary, e.g. 88-94 pulses instead of 96. In the upper frequency range (up to 3000 1/min of the wheel), I have way too much pulses, e.g. 122-125 pulses instead of 96.
    I use the digital filters of the counter board for both TTL signals.
    Does anybody have an idea what I can do on this subject?
    Thanks in advance for any help
    Regards
    Achim

  • Buffered event counting. Why can't I explicitly sequence generating the Sample Clock Pulse and reading the counters?

    At irregular occasions I need to grab counts from several counters, and buffering the counts must be done simultaneously for all counters. I'm modeling my approach after zone.ni.com/devzone/cda/tut/p/id/5404 which someone kindly pointed out in an earlier thread. However, that example only uses one counter, and you can't test the synchronization with only one counter, so I am using two counters configured the same way, and they're wired to a single benchtop signal generator (for example at 300 kHz).
    What I want to do, I can test in a loop with a somewhat random wait in it. I want to drive a hardware digital output line high for a few ms and then low again. The hardware line is physically connected to terminals for my timing vi's Sample Clock Source and so will cause them to buffer their counts for later reading. After I pulse this line, when I know new good buffered counts await me, I want to read both my counters. If their bufferings are simultaneous, then each counter will have counted the same number of additional counts since the last loop iteration, which I can check by subtracting the last value sitting in a shift register and then subtracting the two "additional counts" values and displaying this difference as "Diff". It should always be 0, or occasionally +1 followed immediately by -1, or else the reverse, because buffering and a count could happen practically at the same moment.
    When I do this using a flat sequence to control the relative timing of these steps, so the read happens after the pulse, the counters often time out and everything dies. The lengths of time before, during, and after the pulse, and the timeout value for the read vi, and the size of the buffer and various other things, don't seem to change this, even if I make things so long I could do the counting myself holding a clipboard as my buffer. I've attached AfterPulse.vi to illustrate this. If I get 3 or 10 or so iterations before it dies, I observe Diff = 0; at least that much is good.
    When I use two flat sequences running in parallel inside my test loop, one to control the pulse timing, and the other to read the counters and do things with their results, it seems to work. In fact, Diff is always 0 or very occasionally the +/- 1 sequence. But in this case there is nothing controlling the relative timing such that the counters only get read after the pulse fires, though the results seem to show that this is true. I think the reads should be indeterminate with respect to the pulses, which would be unreliable. I don't know why it's working and can't expect it to work in other environments, can I? Moreover, if I set some of the pulse timing numbers to 1 or 2 or 5 ms, timeouts start happening again, too. So I think I have a workaround that I don't understand, shouldn't work, and shouldn't be trusted. See SeparateSequence.vi for this one.
    I also tried other versions of the well-defined, single sequence vi, moving the counter reads to different sequence frames so that they occur with the Sample Clock Source's rising edge, or while it is high, or with the falling edge, and they also often time out. I'll post these if anyone likes but can't post now due to the attachment limit.
    Here's an odd, unexpected observation: I have to sequence the reads of the counters to occur before I use the results I read, or else many of the cycles of this combine a new count from one counter with the one-back count from the other counter, and Diff takes on values like the number of counts in a loop. I though the dataflow principle would dictate that current values would get used, but apparently not so. Sequencing the calculations to happen after the reads fixes this. Any idea why?
    So, why am I not succeeding in taking proper control of the sequence of these events?
    Thanks!!!
    Attachments:
    AfterPulse.vi ‏51 KB
    InSeparateSequence.vi ‏49 KB

    Kevin, thanks for all the work.
    >Have you run with the little execution highlighting lightbulb on? -Yes. In versions of this where there is no enforced timing between the counter and the digital line, and there's a delay inserted before the digital line, it works. There are nearly simultaneous starts on two tracks. Execution proceeds directly along the task wire to the counter. Meanwhile, the execution along the task wire to the digital high gets delayed. Then, when the digital high fires, the counter completes its task, and execution proceeds downstream from the counter. Note, I do have to set the timeout on the counter longer, because the vi runs so slowly when it's painting its progress along the wires. If there is any timing relationship enforced between the counter and the digital transition, it doesn't work. It appears to me that to read a counter, you have to ask it for a result, then drive the line high, and then receive the result, and execution inside the counter has to be ongoing during the rising line edge.
    >from what I remember, there isn't much to it.  There really aren't many candidate places for trouble.  A pulse is generated with DIO, then a single sample is read from each counter.  -Yup, you got it. This should be trivial.
    >A timeout means either that the pulse isn't generated or that the counter tasks don't receive it. - Or it could mean that the counter task must be in the middle of executing when the rising edge of the pulse arrives. Certainly the highlighted execution indicates that. Making a broken vi run by cutting the error wires that sequence the counter read relative to the pulse also seems to support that.
    >Have you verified that the digital pulse happens using a scope? -Verified in some versions by running another loop watching a digital input, and lighting an indicator, or recording how many times the line goes high, etc. Also, in your vi, with highlighting, if I delete the error wire from the last digital output to the first counter to allow parallel execution, I see the counter execution start before the rising edge, and complete when the line high vi executes. Also, if I use separate loops to drive the line high and to read the counter, it works (see TwoLoops.vi or see the screenshot of the block diagram attached below so you don't need a LV box). I could go sign out a scope, but think it's obvious the line is pulsing given that all these things work.
    >Wait!  I think that's it!  If I recall correctly, you're generating the digital pulse on port0/line0...  On a 6259, the lines of port 0 are only for correlated DIO and do not map to PFI. -But I'm not using internal connections, I actually physically wired P0L1 (pin 66) to PFI0 (pin 73). It was port0/line1, by the way. And when running some of these vi's, I also physically jumper this connection to port0/line2 as an analog input to watch it. And, again, the pulse does cause the counter to operate, so it clearly connects - it just doesn't operate the way I think it is described operating.
    For what it's worth, there's another mystery. Some of the docs seem to say that the pulse has to be applied to the counter gate terminal, rather than to the line associated with the sample clock source on the timing vi. I have tried combinations of counter gate and or sample clock source and concluded it seems like the sample clock source is the terminal that matters, and it's what I'm using lately, but for example the document I cited, "Buffered Event Counting", from last September, says "It uses both the source and gate of a counter for its operation. The active edges on the gate of a counter is used to latch the current count register value in a hardware register which is then transferred via Direct Memory Access...". I may go a round of trying those combinations with the latest vi's we've discussed.
    Attachments:
    NestedSequences.png ‏26 KB

  • How to output the digital clock and synchronization signal from the NI USB-6211

    Hello,
    I need to connect the NI USB-6211 to control a digital to analog convertor chip (AD5541). However, this chip requires three input signals :1) Clock input, 2) Logic input or a synchronization signal  and 3) Signal Serial Data input (CS, SCLK, DIN).
    how to output the digital clock and the synchronization signal from the NI USB-6211?

    Hi SaberSaber,
    You should be able to use the counters to generate a pulse train that could be used for clock and synch purposes.  
    Hope this helps.  Let us know if you have more questions.  
    Dave C.
    Applications Engineer
    National Instruments

  • Synchronize multiple tasks and multiple boards with X-series USB devices

    Hi all,
    I am trying to figure out how to synchronize multiple tasks across multiple X-series USB boards (6353, to be precise). 
    I have to run a digital output task AND an analog output task on each board.  All four tasks (the DO and AO on Board 1, and the DO and AO on Board 2) must be synchronized.
    I know how to synchronize multiple tasks on a single board.  I've been doing that for years.  That works fine.
    I know how to synchronize a single task across multiple boards (say, a DO task across 2 different boards).  That works fine too.
    For the life of me, I can't figure out how to marry the two.  Everything I've seen, all of the examples, etc. assume you want to do one or the other, or that you have a RTSI cable available.  Are there any examples out there that synchronize multiple tasks across multiple USB boards?
    I tried exporting the AO clock signal from my master AO task to PFI12, and then using the signal on PFI12 to as the clock source for the remaining tasks (Dev1/PFI12 physically connected to Dev2/PFI12, and Dev1/PFI12 set as the clock source for Dev1's DO task). 
    I have also tried setting Dev1/aoSampClock as the source for Dev1's DO task.
    Under both configurations, I invariably get error -89137 when I try to start the tasks -- required resources (PFI12) in use by Dev1/do/SampClock.  I understand what the error is telling me.  What I don't understand is why I'm receiving this error when I don't have any of my tasks configured to use the DO Sample Clock.  It seems as though it is not possible to export a clock signal to a PFI line and simultaneously run a clocked digital task, even if the clock source for that task is specified as something other than the DO Sample Clock?
    So, my question is, is it possible to do what I want to do?  And if so, how do I do it?  How do I configure a common clock source across multiple tasks running on multiple USB boards?
    Hoping for insight from those wiser than I...
    Diane
    Solved!
    Go to Solution.

    Update:  I decided to try using a counter as the source clock.  One cannot use counter 0 to accomplish this, but it does appear to work with counter 1.
    I'll take what I can get.  Fortunately I have two spare counters.  (Yes, I'm running counter tasks too -- 6 of them -- but they don't have to be synchronized.)
    I have to add both digital and analog input tasks as well -- all synchronous with each other, but not with the output tasks since they'll be running at different sample rates.  I hope I'm able to use a counter as the source clock for those as well.
    My head aches.

  • How to use the PXI's 10MHz backplane clock to synchronize two or more 6031E boards?

    Hi,
    I'm trying to use two 6031E boards to acquire multiple channels Analog Inputs, and I'd like to sync them with the PXI backplane clock (not the RTSI bus). I found an example from NI, "Two E-Series Shared ScanClk.vi", and modified it a bit. But I'm wondering if the two boards must have the same acqusition rate? e.g. Can I have 1 board acquiring at 1kHz while the other one at 20Hz? and if yes, how do I do it?
    Your input will be very much appreciated. Thanks!
    Dan
    Attachments:
    mod_Two_E-Series_Shared_ScanClk.vi ‏148 KB

    Unfortunately, E Series boards cannot synchronize with the 10 MHz PXI backplane clock. They do, however, have access to the PXI trigger lines, which are basically the RTSI lines. Except for line 6 which is the star trigger line. They can only read from this line.
    The example program you have selected will definitely be part of your solution. It allows you to share the scan clock timing signal between two boards. If you would like the slave board to acquire at a slower scan rate, you could always route the master's scan clock to one of the slave's on-board counters which can act as a frequency divider. The output of this counter can become the new slower scan clock for the slave board. Use the Generate Pulse Train shipping example VI as your frequency d
    ivider. Finally, make sure you route the signals appropriately and you'll be in business.
    I hope this helps!
    Russell McMurtrey
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Loss of Synchronization for Finite Pulse Train generation

    I have successfully generated a finite pulse train on my 6608. My program is based off an example I got from NI Zone (Square_Wave_Trigger.zip).
    Unfortunately, the Finite Pulse Train loses synchronization every once in a while, and I'm not sure why. Is there anyway to prevent the loss of synchronization???
    When I say loss of synchronization, here is what I mean exactly. I'm generating 4 pulses, but every once in a while, when I reprogram my equipment, I lose those 4 pulses. They seem to go out of phase or something.
    I have included my code as well (Sync.txt), which is slightly different from the example code. In my code, the finite pulse train is generated by the "Sequence Gating Pulse"
    and the "USIP Firing Sequence" lines of code, which are clearly marked.
    Any help would be greatly appreciated. =)
    Attachments:
    Sync.txt ‏14 KB
    TIOgenSquareWaveStartTrig.C ‏6 KB

    I lose the pulse train until I reset my counters. The pulse train shifts out of phase with the main pulse. It's easier to see in the pictures below.
    Attachments:
    Good_Pulses.jpg ‏203 KB
    Shifted_Pulses.jpg ‏220 KB

  • Synchroniz​e hardware timed buffered counter acquisitio​n with buffered analog input acquisitio​n

    LV7.1
    DAQmx
    PCI-6036E
    SC-2345
    Windows 2000
    Greetings.
    I am simply trying to synchronize AI readings with readings from one Counter.
    I am trying to perform buffered analog input synchronized with buffered counter acquisition.
    I'd like the AI acquistion to trigger the Counter acquistion.
    I'm currently setting the Sample Clock Source for the CI Cnt Edges Task to "Dev1/ai/SampleClock" but when I try and set the source for the "DAQmx Trigger" I can't seem to select one that works. I assumed that the source should be the "Dev1/ai/StartTrigger" but that produces and error as does selecting any of the PFI's.
    I'm new to DAQmx and didn't have any luck with the examples or what's been previously posted.
    Thanks for your help.
    Attachments:
    Initialization.jpg ‏84 KB

    Gentlemen-
    All of your initial help was great. I had some noise on my counter lines so switched from an E-Series card to a PCI-6259 M-series card in order to use the counter digital filters.
    Now I can't get a corellated buffered counter and buffered analog input acquistion to work. This same code worked fine on an E-series card but it doesn't on the M-series.
    I verified that the source and gate of the counter are working properly using the test panel and a external function generator.
    But when I run the attached code I get no data out of the "Counter 1D U32 NSamples", only an error saying that the timeout of the function was reached and no count data became available. Am I missing the specification of a another clock or something?
    The counters also work fine using the M-series example code "Count Digital Events (M-Series DAQmx) but this is not a buffered acquisition.
    Any help would be greatly appreciated.
    Steve
    Attachments:
    Sample_Code.jpg ‏136 KB

  • IDM JMX monitoring - Synchronization MBean

    Does anyone know how to additionally expose Waveset data using JMX MBeans? In earlier versions of the product (at least 7.0) I thought it provided insight into the synchronization processes currently running within the system, under:
    ObjectName=IDM:type=Cluster,service=Synchronization,component=ActiveSync,resType=”<Resource type>”,name=”<resource name>”
    However, looking at the documentation for 8.1.1, for example, I only see the following:
    From: http://docs.sun.com/app/docs/doc/820-7976/byajd?l=en&a=view
    Data Exposed in JMX
    So what kind of data does Waveset expose using JMX MBeans? The following table contains a list of MBeans, describes the data they provide, and explains how to use that data.
    List of MBeans:
    Cluster
    Names of the servers in the Waveset cluster, including which servers Waveset considers active.
    Provides a quick status of the cluster from the perspective of one Waveset server.
    ObjectRepository
    Waveset repository configuration data, including database name and version, JDBC driver version, and connection pooling settings
    Shows everything you need to know about how Waveset talks to the repository.
    Performance
    Contains sub-beans for DataExporter, DataQueue, FormConverter, ObjectChangeNotification, Reconcile, Rule, TaskInstanceCache, ViewMaster, and WorkItemCache execution.
    Identifies GUI performance problems and provides visibility into how these subsystems perform. You can enable these beans to capture data that can quickly isolate why a particular page loads slowly on a production server.
    Scheduler
    Internal processing counters for the Scheduler
    Provides detailed visibility into what the Scheduler is doing at any given point in time. Making use of this bean requires an in-depth understanding of how the Scheduler works.
    Server
    Current status of this Waveset server
    Shows server status
    <resource name>
    Operational statistics for each resource and connector used by Waveset.
    Shows the count and maximum, minimum, and average time for each resource operation. Gives visibility into the performance of the resource, the Waveset interface, and the Waveset activity on each resource.
    Was the ability to monitor ActiveSync taken out sometime between 7.0 and 8.1.1? Is there a way to incorporate this into JMX again? Anything I am missing?
    Any additional info would be great.
    Thanks again!

    How is the WebSphere node connected to the cluster? Is it using TCMP? Extend?
    Local, Distributed, Replicated, Near, Overflow, External and Optimistic cache statistics appear in the Coherence JMX server. However, near and local caches created on extend nodes do not appear. Therefore the -Dtangosol.coherence.management.remote=true on an Extend client will not register the near or local caches.
    Thanks,
    Everett

Maybe you are looking for

  • Adding navigational attributes to a cube

    We have upgraded to BW 7.3. Previously when we added navigational attributes to a cube we need to activate the update rules from the ods but now it appears that we don't need to do that anymore. Is this the expected behavaior?  We are using the 3.5 u

  • How to share variable between jsp and JSF?

    hi: I have code : <h:dataTable binding="#{Tables.dataTable}" value="#{Tables.query}" var="currentRow"> <h:column> <h:outputText value="#{currentRow['factorycode']}"/> </h:column> <% //here I want get upon variable currentRow and process some field. /

  • Swing best practice - private modifier vs. many parameters

    Dear Experts, I have a comboBox that has a customized editor and has KeyListener that responds to several keyPressed and keyTyped. The comboBox is used in two different JFrame, say JFrame frmA and JFrame frmB. Since the KeyListener changes the state

  • Creating new transaction calling TC- GR55?

    Hi Abap-Experts, 1]I want to create new transaction. 2]The name of the new transaction should be ZMGRO. 3] It should call transaction GR55 and choose report group MGRO. 4] The first screen for the user should be the selection screen to run the report

  • The video that is recorder through my mobile camera can't be seen in mobile screen

    I need to record through by mobile camera and play it in browser of my website. In my mobile phone the frame that should show the video is created by flash player but it is just white and no video (preview) is seem inside the frame. The video that is