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.

Similar Messages

  • 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....

  • 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

  • Clock synchroniz​ation of a NI-6111 with a NI-6602

    Hello,
    We are trying to synchronize two boards. One is a NI-6602 and the other one is NI-6111. We have already synchronized both devices using the OUT signal from the 6603 (PFI32) and routing it to RTSI_5. Now we would like to synchronize both onboard clocks. We were able to route the 20MHz clock of the 6602 to RTSI_7 using a DaqMX subVI but when we attempted to read that signal with the NI-6111 using the VI AI clock config, it is not allowing to us to configure the clock source in that VI as RTSI_7. Any ideas?
    Thanks
    Facundo

    Hi facundo,
    It appears that you're using DAQmx with the NI-6602 device, but the Traditional DAQ driver (since you're using the AI Clock Config VI) with NI-6111. Is this correct? If so, is there a reason why you're doing so since both boards support DAQmx?
    Each device can use one driver at a time. If you're using AI Clock Config, and right click the "Clock Source" and choose Create >> Constant, you should be able to choose "RTSI Connection", and indicate the RTSI pin number. However, unless you have a specific reason, I would recommend using DAQmx for both boards. You can consider LabVIEW shipping examples such as "Multi-Device Synch-Analog Input-Cont Acquisition.vi" as a starting point.
    Thanks,
    Lesley Y.

  • How to synchronize two NI9215 DAQmx cards?

    Hi there,
    I'm using two NI9215 DAQmx cards (4ch simultaneous sampling analog inputs) in a chassis type cDAQ-9174.
    Since I need to aquire 8 channels simultaneously I've two NI9215 cards.
    My question is how do I configure these cards to be synchonized?
    I'm using LabVIEW2009 SP1 Dev. Suite
    Thanks for answers!
    Solved!
    Go to Solution.

    One of the beautiful things about CompactDAQ is that you can put multiple modules of the same time (Analog, Digital, etc.) into the same task and they are automatically synchronized.  So, to synchronize the two modules, create one Analog Input task and reference the channels as "cDAQ1Mod1/ai0:3, cDAQ1Mod2/ai0:3".  This will automatically synchronize the two modules together.
    Seth B.
    Staff Test Engineer | National Instruments
    Certified LabVIEW Developer
    Certified TestStand Developer
    “Engineers like to solve problems. If there are no problems handily available, they will create their own problems.”- Scott Adams

  • Synchroniz​ation of M-Series cards via RTSI and ANSI C?

    Hi!
    This is my first post and I'm happy to be here. I tried to search as thoroughly as possible, but if this has been answered elsewhere, I'd be grateful for a hint/link nevertheless.
    System:
    Win 2000 Pro with NI-DAQmx (part of NI-DAQ 7)
    2x PCI-6220M, 1x PCI-6221M
    RTSI Cable
    all components are registered in MAX
    Problem:
    I want to synchronize the cards over the RTSI bus. I am using the ANSI C library. There's an example SharedClk10-FiniteAcq_main.c, but it is designed for PXI and uses the undocumented (at least in the C reference?) DAQmxSetTimingAttribute function. I tried to pass '/Dev1/RTSI7' as the clock source, but it did not work.
    Then, after reading the C reference a bit more, it seemed as if I needed to use DAQmxExportSignal. But it gives me an error DAQmxErrorInvalidRoutingSourceTerminalName_Routing = -89120 when I try to route DAQmx_Val_20MHzTimebaseClock to '/Dev1/RTSI7'
    I'd like to know what C functions I have to call in which order to enable synchronized sampling with the three M-Series cards.
    So far I do:
    DAQmxCreateTask (primary & driven)
    DAQmxCreateAIVoltageChan (p & d)
    DAQmxExportSignal (p)
    DAQmxCfgDigEdgeStartTrig (d - trying to import the failed export of /Dev1/RTSI7)
    DAQmxStartTask (d & p)
    DAQmxReadAnalogF64 (p & d)
    DAQmxStopTask(p & d)
    This is my first time using M-Cards or the ANSI C functions, so I might have missed something essential.
    Can anyone give a hint as to what I need to do?
    Jens

    First, if you haven't, you should explicitly create a RTSI cable in MAX. This can be done by right-clicking on Devices and Interfaces -> NI-DAQmx Devices and choosing Create New NI-DAQmx Device -> RTSI Cable. Then, for each device that is connected to the RTSI cable, use MAX to edit its properties and in the "RTSI Configuration" tab, specify the RTSI cable. This will allow NI-DAQmx to automatically route signals of the RTSI cable.
    Now that a RTSI cable is configured, you don't need to explicitly export signals from the task. You can use the DAQmxGetMasterTimebaseSrc function to retrieve the master timebase terminal name from the primary task and the DAQmxSetMasterTimebaseSrc function to set the master timebase terminal name for the driven task. The DAQmxGetMasterTimebaseRate and DAQmxSetMasterTimebaseRate functions can be used in a similar manner. Configuring these properties will result in NI-DAQmx automatically routing the master timebase signal from the primary task to the driven task using the RTSI cable. To ensure the driven device starts at the same time, invoke the DAQmsxCfgDigEdgeStartTrip function passing a triggerSource parameter of "/ai/StartTrigger" which will result in NI-DAQmx automatically exporting the start trigger signal for the primary task over the RTSI bus and using it as a digital start trigger for the driven task.
    I assume that you will also want to invoke the DAQmxCfgSampClkTiming function for each task to specify the acquisition rate and number of samples to acquire. Note that since the master timebase signal and the start trigger signal are already routed using the RTSI cable, the sample clock itself does not need to be shared between the two tasks.
    geoff
    Geoffrey Schmit
    Fermi National Accelerator Laborary

  • Ptp Synchroniz​ation on Windows

    I am currently using software ptp synchronization to synchronize the time on several RT systems (PXI, cRIO, and RMC) I now need to sync a windows machine on the subnet. Is there a windows program that does ptp synchronization to an RT grandmaster?
    Solved!
    Go to Solution.

    Hello Marcis-Andreis,
    the PTP sotfware options for Windows machines are very limited.
    As you can see here - http://www.endruntechnologies.com/ptp-slave.htm
    Windows XP, 2003, VISTA, Windows 7 (PTPv2 only)
    Choices for PTP Slave software on Windows machines are very limited. Windows is not a real-time operating system and synchronization is dependent on the CPU and the operating system version. PTP Slave software is available from Greyware and is called Domain Time II. Your PTP Slave can be synchronized to within one millisecond of the Grandmaster (network topology dependent) using this software.
    Plus you can check the list on wiki page - http://en.wikipedia.org/wiki/List_of_PTP_implement​ations#Software
    The biggest problem is that Widows OS itself is non-deterministic, maybe you should consider using Linux where the options are better.
    For Linux you can use popular PTPd package for example, plus you can go for PREEMPT RT, that make you Linux more deterministic.
    But everything depends on your application
    Please let me know if I can be helpful here.
    Thanks and wish you good luck with your project.
    Best regards,
    David

  • Synchroniz​ation RFSG with digitaizer

    Hello!
    How to synchronize work RFSG with work digitaizer? I can synchronize digitaizer by signals RFSG . But how synchronize RFSG by signals digitaizer?
    Necessary on input TRIG (digitaizer 5114) send clock pulse, then this clock pulse to transfer on the PXI-tire to RFSG (5673) and start work RFSG on this clock pulse. Is it possible to do so? Tell me please about the scheme or algorithm or a ready solution. I can not understand how to transmit signals on the tire.
    Thanks for the help.  

    Now I will explain that I do:
    I use the block of DAQmx Connect Terminals VI. I send the signal of Reference Trig on a tire with digitizer(5114) on PFI0 of generator(5673). Then I want to use this signal as impulse of start of generator. I connect PFI0 and PFI1 a cable. In a project I specify the source of start of generator - PFI1. I start a project - all works. A generator is started as soon as on the entrance of PFI1 an impulse comes with PFI0. If an impulse does not act on the entrance of PFI1 - a generator is in the camp-on of signal of start.
    Questions:
    1. I want to use stepped trig for a management by the start of generator. Why herein and in other modes is a generator started and works without stops?Id est I give one impulse of start - a generator is started. I disconnect a cable from the entrance of PFI1 - but a generator continues to work. Why?In fact did he have to stop and pass to the camp-on of new impulse?I understood so, that at stepped trig a generator gets an impulse and passes to the camp-on of the second impulse.But goes out not so.
    How I must do so that did a generator work with breaking or upcast in the initial state between the receivabless of impulses?I am not necessary that he generated constantly in the mode of stepped trig. Mode of single and burst does not suit for my task. 

  • Synchroniz​ation RFSG with Digitizer

    Hello!
    How to synchronize work RFSG with work digitaizer? I can synchronize digitaizer by signals RFSG . But how synchronize RFSG by signals digitaizer?
    Necessary on input TRIG (digitaizer 5114) send clock pulse, then this clock pulse to transfer on the PXI-tire to RFSG (5673) and start work RFSG on this clock pulse. Is it possible to do so? Tell me please about the scheme or algorithm or a ready solution. I can not understand how to transmit signals on the tire.
    Thanks for the help.

    Now I will explain that I do:
    I use the block of DAQmx Connect Terminals VI. I send the signal of Reference Trig on a tire with digitizer(5114) on PFI0 of generator(5673). Then I want to use this signal as impulse of start of generator. I connect PFI0 and PFI1 a cable. In a project I specify the source of start of generator - PFI1. I start a project - all works. A generator is started as soon as on the entrance of PFI1 an impulse comes with PFI0. If an impulse does not act on the entrance of PFI1 - a generator is in the camp-on of signal of start.
    Questions:
    1. I want to use stepped trig for a management by the start of generator. Why herein and in other modes is a generator started and works without stops?Id est I give one impulse of start - a generator is started. I disconnect a cable from the entrance of PFI1 - but a generator continues to work. Why?In fact did he have to stop and pass to the camp-on of new impulse?I understood so, that at stepped trig a generator gets an impulse and passes to the camp-on of the second impulse.But goes out not so.
    How I must do so that did a generator work with breaking or upcast in the initial state between the receivabless of impulses?I am not necessary that he generated constantly in the mode of stepped trig. Mode of single and burst does not suit for my task.

  • Synchroniz​ation for AI and AO with non-regene​ration of output waveforms

    Hi all,
    I need to output several analog waveforms, while at the same time acquiring analog input, and synchronise the two. For this, I'm using a cDAQ-9178, a 9264 module for AO, and 9220 for AI.
    I managed to this all right following this example: http://www.ni.com/example/26527/en/ (NI-DAQmx: Simultaneous AI and AO Using a Shared Clock). The problems started when I moved the waveform generation inside the main while loop to be able to modify the waveform parameters on-the-fly: now I get Error -200018 as soon as I start the VI, or Error -200284 those few times when the VI manages to run some iterations.
    This does not happen if I omit the source of the sample clock for the two tasks, but then I lose the synchronisation between input and output.
    Any idea of what's going on?
    Thanks!
    Nathan
    Attachments:
    piezo_continuous.vi ‏82 KB

    Hi again,
    I've been tweaking my VI: at this point it's a hybrid between the "Multi-Function-Synch AI-AO" GerdW was mentioning, and the shared-clock approach found in the "Timing and synchronisation" white paper. Still, the input signal shows random fluctuations of the phase with respect to the output.
    Any ideas?
    Attachments:
    AI-AO-sync.png ‏94 KB

  • Sampling local variable and synchroniz​e with DAQmx

    Hello, 
    I made a small change in the set-up I used with labview and now when I wanted to change the code I'm having a rather complicated problem.
    In my old set-up I was measuring three variables: x and y with a QPD and the power of a laser with a power detector. I was using the DAQmx and I was getting a matrix with three columns with n (sample rate) values. Now, for various reasons I had to take out the second detector. So now I want to build the same matrix as constructed before, but instead of putting the measured values of the laser power I want to put the theoretical values (they are in a local variable) as I cannot measure them. The problem is that this local variable, in general, changes during the DAQmx acquisition time and I would need to sample it at the same rate as I acquire the data from DAQ and then combine all them. How I could sample this variable and attach it to my DAQ results? DAQmx doesn't accept local variables.
    Thanks

    A local variable is not something standalone. It is always associated with a control or indicator. Hows is it updated?
    From your description, it is not clear what you are doing. Can you show us some code instead?
    (Also be more clear when using acronyms. QPD cound mean many things)
    LabVIEW Champion . Do more with less code and in less time .

  • Wireless Synchroniz​ation in Desktop contact list properties is by default showing "Not Available"​, Not able to change also

    In my Blackberry 8520 - Curve model, Wireless Synchronization in Desktop contact list properties (Go to Contacts, select options, select Desktop) is by default showing "Not Available" and not allowing to change also. My other colleagues are having the options.
    My basic issue is that Outlook contact details are not getting syncronized with Blackberry. I believe this is the root cause for the same. Please guide to resolve the issue.
    with best regards,

    Hey pratiktnm,
    Welcome to the BlackBerry Support Community Forums.
    Thanks for the question.
    Are you setup on a BlackBerry Enterprise Server?  With the Desktop service book appearing it seems you were on one.  If you are still on a BlackBerry Enterprise Server, I would suggest creating a full backup with BlackBerry Desktop Software: www.blackberry.com/btsc/KB33505
    Then proceed with a security wipe by going to Options>Security>Security Wipe and then contact your network service provider to generate a new Enterprise Activation password.  Then proceed with the enterprise activation by going to Options>Advanced Options>Enterprise Activation.
    Once the activation is completed, test out the wireless synchronization of the contacts.
    Let me know if you have any more questions.
    Cheers.
    -ViciousFerret
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Like! for those who have helped you.
    Click  Accept as Solution for posts that have solved your issue(s)!

  • Problem with Gmail synchroniz​ation

    I have both my work email configured via BES service and my private Gmail account on my Bold 9700.
    Recently I noticed that when I delete emails on the 9700 it reflects almost immediately both on Gmail web interface and both in my Outlook. However, if I delete emails from either the web  or Outlook there are no changes on the device.
    I opened a case with my mobile provider and they did some tests on several devices on their side and also told me to delete and re-configure my Gmail account. They also configured my Gmail account on their devices, All these confirmed that there is a problem.
    After a few days they called back and told me that there is nothing wrong with the service and that the synchronization from Outlook/Web with the device happen after several hours. They also stated that according to RIM's documentation this is how it should work.
    Well, if it's true don't you find it quite troubling?
    What annoys me the most that I'm sure that when I first configured Gmail on my device the sync was much more frequent.
    The support team also mentioned something about BIS upgrade and that that's how RIM decided to implement IMAP4.
    Is that true?
    Did anybody experience what I mentioned as well?

    snip from
    http://www.blackberry.com/btsc/KB05133
    Additional Information
    Email reconciliation with the BlackBerry Internet Service is from the BlackBerry smartphone to the messaging server, and the messaging server to the BlackBerry smartphone. For reconciliation changes to occur in an email application such as Microsoft Outlook, the email application must reconcile with the messaging server, not the BlackBerry smartphone.
    It is necessary to correctly configure the BlackBerry smartphone and integrated email accounts to turn on the full two-way reconciliation. For more information, see KB13509.
    Reconciliation changes from the mailbox to the BlackBerry smartphone might require up to 6 hours.
    For more information on Microsoft® Mobile Services Protocol (MSN® MSP), see KB24360.
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • Synchroniz​e IMAQ1394 DAQmx

    Dear frds,
    I am trying to synchronize image acquisition (input) and Piezoelctric transducer (PZT) motion (output) through labview. However, i have no clue how to go after it.
    My camera is DMK21BF04 with external trigger allowing only mode 0 for triggered acquisition  It is a IEEE 1394 type. The PZT motion is controlled through labview using PCI6024E. The motion of this transducer will change the shape of the object viewed by the camera. I want to capture that change at the moment it happens. The change is continuous since i am ramping the PZT. I would like to capture this continous change using the camera and want it to be synchronized.
    Looking forward for your suggestions and advices..
    thank you in advance

    Hello Shiju Ul,
    thank you for your forum post. I did found a tutorial about synchronizing audio and video through a IEEE framegrabber, a DSA card and a E series DAQ card. I hope that this information is usefull to you just for reference; http://zone.ni.com/devzone/cda/tut/p/id/6432
    Best regards,
    Martijn
    Martijn S
    Applications Engineer
    NI Netherlands

  • Synchroniz​ation of PCI devieces via the RTSI bus using the measuremen​t studio for Viusual Basic 6

    Hi everyone,
    I would like to synchronize a NI 4474 A/D card with a NI 6733 D/A card via the RTSI bus. Is there any way of sharing the timebase using the measurement studio for VB 6.0? It seems like it could be possible using the traditional NI-DAQ .DLL but I would prefer to do it with the ActiveX API.
    I am quite desperate, since all my attempts to use the CWDAQTools1.RouteSignal and CWDAQTools1.RouteRTSI command failed miserably :-(
    Thank you very much in advance!
    Federico

    Thank you very much indeed!
    Unfortunately it doesn't really work... I cannot use the DI options since my A/D card (NI 4474) does not support DI/DO... When using the other option (CWDAQTools1.RouteRTSI) I keep getting an error message that this command is inapropriate for my device (even though it does have a RTSI bus and allegedly it also supports time sharing...)
    Looking forward to your answer!
    Kind regards
    Federico

Maybe you are looking for

  • MS Access and JTable Question......

    I have a MS Access Database file and I want to display the data on my JTable using JDBC/ODBC connectivity? Is this possible? how would the coding be like? Does anyone have a similar example?

  • Passing input Dates in a Crystal Report

    Post Author: Preethig CA Forum: Older Products Hi all, I am using Crystal reports 8.5 to develop my report. I use the the Crystal report Enterprise Version 8.0 to view my reports in the IE 6.0 Web browser.I communicate to the Crystal Enterprise throu

  • MD06 add Screen Field

    I need to add a filed in selection screen for requirement category in collective access tab how could i do that. I need thre report based on requirement category also. Kindly help me

  • Item Manage by Serial Number

    hello all, related to my question Service Module, Can i use the Service Module? what should i do if my item master data has an Onhand qty. and it is not manage by Serial Number, now i want to manage this item master data by Serial Number,but SBO Prom

  • SQl*Modeler - foreign key amendment error

    SQl*Modeler 2.0.0 Build 584 (Windows) Oracle 10.2.0.4 Solaris If I change an existing foreign key to simply change the delete rule (from say CASCADE to RESTRICT) it changes in memory just fine. If I generate the DDL the change has happened and I get