Digital edge timestamp ni9403

Good morning all,
I am relatively new to labview and have the following problem that I am trying to solve which is stumping me at the moment:
I have requirements to test the time (in milliseconds) from physically touching a touch screen to receiving a specific packet on the other end of a test system. I currently have a momentary switch wired into a ni-9403 module to capture the time when the touchscreen is physically touched. Capturing of the packet timestamp will be handled by wireshark which will be running on the same computer as labview. The expected timeframe to receive the packet is under 20ms, so there is not much room for error with the timestamp. Labview is prioritized on 2 cores of the computer and wireshark gets a single core, the 4th core is assigned to the os. The system clock of the pc will be utilized for the timestamp to compare the 2 timestamps.
For the labview portion, the scope only consists of capturing the timestamp (including milliseconds) for when the momentary switch triggers (a rising edge digital signal coming from the ni 9403 daq) and logging the timestamp to a file. I only need the timestamp for the first rising edge seen, after that the vi can terminate. The desired output file would be a csv file and to the screen. The timestamp has to be accurate within 1-2ms.
I have found plenty of examples on exporting analog waveforms with timestamps to tdms, but i have not yet found an example on how to achieve this with a triggered digital input (and i have been searching the internet for a week on examples related to timing digital signals/edges/state change detection timestamp/writing digital signals to tdms, etc). I figured I would have at least found an example related to timestamping/recording the use of a emergency stop button. It doesnt make it any easier that the 9403 does not support state change detection in its current version.
Currently I am running lv2013 and daqmx 9.7.5
Could anyone point me towards an example or help me figure this one out? any help would be greatly appreciated,
Stephen
Stephen F.
System Integrator & Automation Engineer

Hi dpom
I have not fully understood your question, you want to create a digital waveform signal with the timestamp and log the data.
What exactly do you want to trigger log the data or a process?
If you mean trigger the process of logging we should be able to do this programmatically
Could you provide me a little more details and if it is possible point me to the examples that you have find with analog tasks in order to understand what exactly you want to do
Regards
Esteban R.

Similar Messages

  • Why does Start Digital Edge in Start Trigger.vi do a kind of timeout?

    Hi I am doing a manual trigger on my hardwareboard by inserting a 5 volt source into the selected triggerchannel a couple of seconds after I push the start button.
    The generation never starts. But if I put the trigger signalchannel  equal to the external sampling clock the appended vi work.
    Example I use PFI7 as trigger source which is also the source of the sampling clock.
    Could somebody explain?
    Kindest regards,
    Lasse
    Solved!
    Go to Solution.
    Attachments:
    Cont Gen Voltage Wfm-Ext Clk-Dig StartA.vi ‏36 KB

    One cannot just insert a wire with a 5 V potential to PFI6 for instance if PFI6 is used as a trigger for "Start Digital Edge" daqmx -vi. The pin is floating and just inserting 5V does not guarantee a low to high edge.
    If I use a potentiometer to pull the channel low first, and then increse the voltage, the trigging happens.

  • Multiple Channels with Single Digital Edge Trigger

    I have a simple vi where two analog channels are read in and recorded simultaneously to a lvm file and plotted on a waveform graph. I need a digital edge to post trigger the data acquisition for both channels. 
    I can get this vi to work with one analog channel and the digital edge trigger just fine.
    When I remove the digital edge trigger, I can get the vi to work with both analog channels. Both signals plot on a waveform graph, and record nicely in the lvm file.
    The issue is how I am setting up the digital trigger (see attached).  The program is never entering the while loop. Where am I going wrong?
    Chassis:cDAQ-9172
    Analog Card:NI 9205 (Trigger Source PFI0)
    LabView: 8.6
    OS: Windows XP
    Solved!
    Go to Solution.
    Attachments:
    Analog Input with Digital Edge Trigger.vi ‏52 KB

    Gardma,
     I am going to take a quick guess (I'm lazy and haven't actually tested the code ), but, since it works without the trigger and given that you have it so that the read never times out (i.e. = -1), there is something going on such that the trigger is never generated on the source pin.  Just a thought.
    Cheers, Matt
    Matt Richardson
    Certified LabVIEW Developer
    MSR Consulting, LLC

  • Getting error -200452 using DAQmx Base Trigger (Digital Edge).

    I'm trying to set up AI and counter output, and I'm using digital output as trigger for to start AI and counter at the same time. I get error 200452 "Specified property is not supported by the devise..." not consistently, but around 5 runs out of 100. Below the error description, the error box shows "This error code is undefined. No one has provided a description for this code..." If I "Retain Wire Values" in Block Diagram, the error first appears after 'Start Digital Edge' block in top counter output line.
    Using LabView 8.5 on MAC OS X and DAQmxBase 3.2
    The MAC I have is not Intel base, so I can't upgrade LabView and DAQmxBase to latest version
    Note: The file contains just a small portion of the program, but the rest of the program does not have any other DAQmxBase blocks accessing the channels used here in code attached.
    Attachments:
    Combined V 1.5.41_sm.vi ‏98 KB

    Hi Azotov,
    It looks like the DAQmx Base driver readme includes Mac OS X support for LabVIEW 8.5.  Could you specify what hardware you are using?
    I found one KnowledgeBase specifying that error code occurs when you try to use certain properties with certain devices.  Of course, this would most likely occur every time you run the task, not 5% of the time.
    Since I'm running Windows, it's a little difficult to see if you have DAQmx Base "Reset Device" functionality with that version of the driver.  You might check if you can run that functionality before using your device, though.
    National Instruments

  • USB scope triggering off wrong digital edge

    All,
     I have setup my USB scope card (5133) to trigger of a positive digital edge on the PFI input. This then captures rising analgue connected to the two channels. This normally works fine, but sometimes the scope will start to trigger off a negative edge! (digital input signal is a digital pulse). To get the scope to work correctly again I have to set the scope to trigger off an analogue edge on ch0/1, then after runing the vi once return to the digtal edge trigger on PFI1. I have attached an image of the setup of my scope.
    Attachments:
    trigger.jpg ‏290 KB

    Hello,
    I don't immediatly see anything wrong with the screenshot of your VI.  I have a few questions about your setup that will help narrow this down.
    1)  What are you using as the source of your digital trigger on PFI 1?  Have you verified that this digital signal meets the VIH and VIL levels specified in the 5133 spec sheet?  http://digital.ni.com/manuals.nsf/websearch/8D323D9E4F4B39288625737C0071E462  (Page 7)  Also make sure you are not exceeding -0.5V or +3.5V and that your pulse width is greater than 20 ns.  The easiest way to verify this would be to run the configured acquisition example VI with your digital trigger signal running into one of the analog input channels.
    2)  How are you connecting your signals to your board?  Are you using BNC cables or probes?
    3)  I am assuming that the signals you are digitizing on ch 0 and ch 1 are different than the signal you are feeding into PFI 1.  If you have a BNC splitter handy try splitting the signal you are feeding into PFI 1 so that it also runs into one of the input channels.  Leave the other analog input channel unconnected.  Then run your VI again and see if you see the same phenomena where it looks like the scope is triggering on the falling edge of PFI 1.  If the scope is triggering on the falling edge you should see the falling edge waveform captured on the analog channel.  This will help us determine if the scope is triggering on the wrong edge or if your input signal and digital rising edge are not always correlated.  If you are using probes instead of BNC cables you can do the same test, just connect both probes to the same signal.
    Regards,
    Matt

  • AO output/start digital edge

    AO output中,我想用DAQmx write来写入电压信息到buffer,然后用DAQ start task开始产生电压。我的程序中用start digital edge指定每个pulse的falling edge来开始产生电压。我的问题是电压是不是只有在pulse的low edge电压才能产生,而当下一个rising edge是,产生就会停止呢? 还是说start digital edge只决定第一次电压写入的时机?望高人指点!

    可以贴程序框图看看么?
    Thomas | Xi'an China
    LabVIEW 7.1 | LabVIEW 2011
    DAQmx | CompactRIO

  • Most efficient coding method to get from WFM Digital to Timestamp Array and Channel Number Array - Earn Kudos Here !

    I'm Fetching data from a digitizer card using the niHSDIO Fetch Waveform VI.  After Fetching the data I want to keep the Timestamp and Digital Pattern which I'll stream to TMDS file.
    What is the most efficient method of striping out the Arrays I'm interested in keeping?
    The attached VI shows the input format and desired output.  The Record Length is always 1.  I'll be streaming 100,000+ records to file using a producer-consumer architecture with the consumer performing a TDMS write.
    I'm assuming only the WDT Fetch gives you the time from t0.
    Attachments:
    Digital Waveform to Array Coding.vi ‏11 KB

    Hi bmann2000,
    I'm not sure about efficiency but this method definitely works. I've just used a 'Get Digital Waveform Component' function and the 'Digital to Boolean Array' function.
    Hope this helps.
    Chris
    National Instruments - Tech Support
    Attachments:
    Digital Waveform to Array Coding 2.vi ‏15 KB

  • Can buffered digital edge detection only be performed using an external sample clock?

    I am working on an application where I need to measure the speed (rpm) of a motor as it starts up using the output of its built in hall effect sensor.  The sensor should output 2 pulses per revolution of the motor.  My plan is to count the pulses from when the counter (counter 1) is armed to when it is up to speed. Looking at the M series manual, the CVI (v8.5.1) help, and the examples it appears that this can only be done using an external sample clock.  Is there a way to route an internal sample clock to the appropriate terminal on the counter so that I do not need to add additional hardware?
    I am currently using a PCI-6289, but the final application will use a CDaq-9188 chassis (using one of the the built in 32-bit counters).
    Thank you for your assistance.

    Thank you for your input.
    However, I did forget to mention one detail of the application.  I need to buffer the edge counts so that I can graph the speed of the motor as it starts up.  I need to be able to acquire the edge counts at reqular intervals so that I can determine how fast the motor was rotating at each point.  So far I have not been able to find an example of doing this without and external sample clock.  As I mentioned, in the final application I will be using the 32-bit counters on a CDAQ-9188 chassis.  The only thing I can think of at this point is to generate a pulse out of the second counter and use that as the sample clock.  Will this work?

  • NI-DAQ Digital Edge Start Trigger

    Hi -
    I have a digital input line that I would like to use as a trigger in order to collect 1 data sample of 31 analog input lines.  How do I configure this task?  I have been getting all kinds of error messages and am assuming there must be a simple way to go about it.
    Thanks,
    Dave

    Hi Dave,
    I think there is a problem either with your configuration files in MAX or the driver. Try renaming the MAX Data folder located at C:\Program Files\National Instruments\MAX. Also, you can try exporting your MAX configuration to preserve what you already have and then start fresh by creating new task. This will create a new MAX configuration and new Data folder when you create a brand new task.
    I have searched for the -2147220733 error but I can't find any documentation on it even internally. Do you have another machine where you can try to create/test the task? Does the error appear in MAX or in LabView when you try to run your application? Do you have problem setting up tasks with any other cards in the computer? Does the error occur only when you have one channel in the task or all 31?
    Selecting "1 sample HW timed" should definitely work.
    Regards,
    Natasa

  • DAQmx trigger: start digital edge

    Buongiorno a tutti.
    Mi trovo a lavorare su un VI creato in precedenza da altri colleghi, quindi sto cercando di migliorarne alcuni aspetti.
    Lo strumento si occupa dell'acquisizione di segnali di temperatura e pressione da svariati sensori. I colleghi hanno inserito una fonte di trigger esterna attraverso un generatore di funzione (tektronix AFG3021C). In allegato una immagine della sequenza precente al ciclo while di acquisizione ed elaborazione dei segnali.
    La mia domanda è questa: "è possibile ovviare all'utilizzo del generatore esterno di funzione?"
    Grazie
    Luca 
    Allegati:
    acquisizione.jpg ‏155 KB

    Ciao Luca,
    strano che non ti compare niente, prova a cancellare l'intera funzione e richerla, dovrebbe almeno apparirti i vari PFI della scheda DAQ che hai collegato al PC... Sei sicuro di aver collegato qualcosa?
    In ogni caso ***** vuoi come trigger una forma d'onda generate internamente, quello è un trigger software, prova a guardare questo esempo:
    https://decibel.ni.com/content/docs/DOC-35941
    Buon lavoro e buona giornata,
    Valerio

  • GPS timestampi​ng continousl​y sampled data

    Hi all,
    I'm working on an application that samples 32 analog and 5 digital signals at a fixed rate of 4 kHz and I'd like to accurately timestamp each sample using a GPS time reference.
    The timestamp accuracy should be better than 120 us. The application is written in C/C++ and uses the DAQmx C API.
    The hardware I have available is the following:
    * PCI-6224 card (A/D with 32 analog channels, lots of digital I/O and 2 timer/counters)
    * PCI-6602 card (8 timer/counters and a 80 MHz clock)
    * TrueTime XL-AK (model 600-000) GPS time reference, with serial ASCII output, IRIG-B timecode output and PPS (pulse-per-second) output.
    Unfortunately my GPS is not equiped with a 1 MHz or 10 MHz reference output. Also the IRIG-B output is not easily useable because it is AM modulated on top of a 1 kHz carrier (therefore not compatible with a digital input and all 32 analog inputs have already been allocated)
    I plan to implement this application by doing all timing generation on the PCI-6602 and doing all sampling (analog/digital) on the PCI-6224. A pair of counters is configured to do GPS timestamping as demonstrated in the document in this thread:
    http://forums.ni.com/ni/board/message?board.id=250​&message.id=8560
    By routing the same sample clock and digital edge start trigger to all blocks that sample data (analog or digital), the data from all measurement tasks would be synchronised to each other. This would result in 3 streams of parallel data: timestamp values (second + sub-second count), analog data (32 channels) and digital data (say 32 bits for each sample).
    However I suspect that the counter arrangement from the thread mentioned earlier does not produce *buffered* timestamps. This would make it impossible to use it as I just described above. Is this correct?
    Does anyone know another solution?
    I've been thinking about the following alternatives:
    1) Sample the PPS signal at a higher rate to more accurately find out where the first sample in the current second starts. Then the timestamp for each sample can be calculated as Tsample = Tpps + Tfirst_sample + N/F, where Tpps  = time (in seconds) of the last PPS pulse, Tfirst_sample = offset of first sample in the current second, N = sample number within the current second, F = sample frequency.
    2) Same as above, but using buffered two-signal edge-separation measurement to get the offset between PPS and sample clock at even better accuracy.

    Typically, (and sometimes necessarily), a sample clock signal used for counter measurements would be connected to a counter GATE pin.  For the specific case of "encoder" measurement on the 6602, the Z-index signal must be physically wired to the counter's default GATE pin, so the sampling clock signal would need to be physically wired to the GATE pin of a different counter.  Having wired the sample clock signal to a single GATE pin, both of the 2 counter measurement tasks can programmatically specify that their sampling clocks come from that single pin.
    The M-series board offers more flexibility in programmatic PFI signal routing than the 6602.  You can pretty much wire to any PFI pin and then programmatically specify which pin to use as Input (SOURCE) and which as Sample Clock (GATE).  I still typically adopt the convention of using default pins whenever possible.
    The terminology for counters can be a bit confusing.  In my opinion, the old traditional NI-DAQ was a little more cryptic at first glance but much more consistent overall.  The new DAQmx terminology tries to hide implementation details more, but in the process generates multiple aliases to the same pin assignment, depending on how you're using it.
    A quick rundown.  A SOURCE edge causes the count register to increment.  Under DAQmx, this may be referenced as an "Input" or a "Timebase" terminal, depending on the measurement mode.  When counting edges, it's an Input.  When measuring period or frequency, it's a Timebase.  Whatever it's called, the natural behavior at the counter hardware is to increment a count register on each active edge.
    A GATE edge can cause a count value to be stored in the acquisition buffer.  Under DAQmx, it may be referenced as a "Sample Clock" source when counting edges.  When measuring period or frequency it may be a "Channel" or an "Input terminal."  Again, whatever it's called, the behavior at the board level is to store an instantaneous count value into the data acq buffer on each active edge.
    [There are exceptions, of course.  The GATE pin is also used for "Pause Triggering", and can also be used to reset the count register for position measurement with Z-indexing enabled.  And so on.]
    -Kevin P.

  • Synchronizing the read of two timer tasks (Period and Two Edge Separation)

    Hello,
    I am using labview 2011 and need to latch the data from two timer tasks of a 6602 board at the same time and then perform the read. One task is a period measurement the other is a two edge speration.  It sounds pretty simple and I am sure it is, I just haven't located the correct information yet,  If someone would point point me in the correct direction.
    Thanks,
    Mike

    While it's true that a digital edge arm start trigger can help to sync the tasks to begin together, the nature of the measurements you're making also have a big impact on whether you can depend on the buffered data remaining "synced."   Both measurement types will latch measurement data at times determined by the signal(s) being characterized.  You cannot configure either task type to sample at a known constant rate.  You can only accept samples at the rate dictated by the signals' own edges.
    Ok, so having said all that, here are some implications:
    1. a cumulative sum of all your period data will effectively give you timestamps for all the active edges, with t=0 set by the arm start trigger edge.
    2. there is no information inherent in a two edge separation measurement that can identify the time relative to the arm start trigger.  You'll get a bunch of measured interval times with completely unknown times between those intervals
    3. caveat: if you are somehow using the same signal edge for both measurements AND getting one measurement of two-edge separation for each and every period measurement, ONLY then would you be able to reconstruct the timestamps relative to the arm start trigger edge.
    So I'd caution you that the idea of latching readings in sync or reconstructing relative edge times between the measurements is pretty unlikely to work except under some very specific circumstances.
    -Kevin P

  • Create 4 digital output pulses base on input ttl signal

    Hi
        I am a beginner in Labview and would appreciate any advice on how to solve the following problem.
    I am creating a TTL pulse train, and would like to send that into Labview as input.  For every falling edge detected on the input signal, I'd like Labview to generate 4 digital output pulses.  For each output pulse, I'd like to be able to specify the delay, and duration.       The picture should illustrate it more clearly, with the numbers showing the intended order of magnitude.
    System:  NI PCI-6733 DAQ card, Labview 8.5
    My daq card has 2 24-bit timers, and 8 digital I/O but I don't know what the best approach is for creating between 4-8 output pulses of this precision..should it be handled in hardware, or in software?  And how would I go about it
    Thanks,
    -Sidney
    NI Hardware: PXI-7853R, PCI-5122, PCI-6733, PXI-1036, PCI-MIO-16E-4, PCI-6110
    Computer Hardware: Xeon Quad Core - 2.33 Ghz, 8 GB RAM
    Software: Labview 2009, Labview FPGA 2009, Vista 64-bit, MAX 4.6, DAQmx 9.0, NI-SCOPE 3.5
    Solved!
    Go to Solution.

     Hi Yann,
       Wow, thank you so much for this example!  I'm trying to take a look at it, but when I run it.. it responds with the following error message
    Error -200452 occurred at Property Node DAQmx Trigger (arg 1) in DAQmx Start Trigger (Digital Edge).vi:1->reprise-1.vi
    Possible reason(s):
    Measurements: Specified property is not supported by the device or is not applicable to the task.
    Property: Start.TrigType
    Task Name: _unnamedTask<49>
    This is strange too, because ive already used the Digital Edge Start trigger for a different application with this card.
    -Sidney
    NI Hardware: PXI-7853R, PCI-5122, PCI-6733, PXI-1036, PCI-MIO-16E-4, PCI-6110
    Computer Hardware: Xeon Quad Core - 2.33 Ghz, 8 GB RAM
    Software: Labview 2009, Labview FPGA 2009, Vista 64-bit, MAX 4.6, DAQmx 9.0, NI-SCOPE 3.5

  • PXIe-4353 analog edge trigger

    Hello,
    I'd be grateful for some help with my case. I'm building a VI for acquisition of multiple signals from thermocouples. My hardware is NI PXIe-1073 chassis with PXIe-4353 module to read the signals.
    The problem is that I want to use an Analog Edge trigger for the start of the measurement but it is unavialable to choose in the DAQ Assistant properties window (I have only None and Digital Edge to choose form). I also tried to do the same with DAQmx functions but I got the Error which says that I can only choose Digital Edge Trigger or None.
    The hardware (PXIe-4353) does seem to support Analog Triggering: http://zone.ni.com/reference/en-XX/help/370471W-01/cdaqmxsupp/pxie-4353/ or am I mistaken ?
    Also I want to note that I currently use hardware simulation and not the actual hardware - can this be the reason?
    I'm new to Labview so I may have made some silly mistake. Please let me know then

    The product page at http://sine.ni.com/nips/cds/view/p/lang/en/nid/208291 says that only digital triggering is supported.

  • Hardware digital trigger to start stop continuous analog acquisition

    Hi I have seen the following example to use digital trigger to start and stop for finite number of samples. The example names is (DigitalStartandStopTrigger.vi)
    in this example Reference Digital edge is used to stop acquisition but if I change to  continuous then Reference Digital edge stops and show an errir. Could you please let me know how can I use hardware digital trigger to start stop continuous analog acquisition. An example would be really great
    many thanks

    HI tintin_99,
    The way that example works (by modifying the read position of the buffer) essentially performs the same operation that the continuous samples mode does. That is to say, it is already a continuous acquisition.
    The article below explains this in more detail, and the reasoning behind specifying buffer size manually and other tricks used. You may have already visited it in order to get the example VI, in which case it may be worth another read over.
    http://digital.ni.com/public.nsf/allkb/BA775B0E445BFA79482571FE0032CCEB
    Kind Regards,

Maybe you are looking for