Event at a specific moment of a data acquisition

Hi!
I'm trying to create a VI which should perform data acquisition during which an event should happen.
The full problem is:
I have to do data acquisition (sampling rate up to 100000 samples/sec) of the voltage of a deformed 60 Hz sine wave signal. This data acquisition is saved into a file (Excel or DIAdem compatible) and is not displayed to the user of the VI in real-time (no worrying about displaying a graph). The problem is that after a fixed number of periods has been acquired, at a specific angle of the ideal sine wave (0° being the beginning of the sine wave, 90° the positive maxima...), a digital signal has to be sent to modify part of the circuit we are analysing, while continuing to gather data. I know that using an analog trigger, I can find a 0° point easily, then, knowing the sampling rate and the input signal's frequency, I know the number of samples to wait before the angle. What I don't know though is how to do this event at that specific moment without interrupting the data acquisition.
I am using LV7.1 with a NI-6110 DAQ device configured with NI-DAQmx. If you need additionnal information to answer, then just ask me.
Thanks!

Hi Maxime-
I'm not sure why your counter would be counting too fast, but it might have something to do with the comparator circuit. Are you able to count edges successfully with your counter? I would suggest using the LabVIEW shipping example "Count Digital Events.vi" that can be found by accessing Help>>Find Examples in LabVIEW and then browsing to Hardware Input and Output>>DAQmx>>Counter Measurements. You will need to connect your comparator output to the source input of the counter.
If this VI works for you then I have another suggestion along the lines of Kevin's earlier suggestion to use two counters. The counters on your board can be configured to output a pulse once the counter reaches your Terminal Count (i.e. the highest value the counter can reach before rolling over to zero). Your PCI-6110 has 24-bit counters, so the terminal count will be 2^24-1 or 16777215.
By using the first counter to count zero crossing events from your comparator and setting the initial count to be a certain number of counts less than the Terminal Count you can output a pulse after a user-specified number of rising edges. This output can then be routed to trigger pulse train generation on the second counter of specified frequency and length. Finally, you can route this generated pulse train to be the external clock for your analog input operation.
I have attached a modified edge counting example that shows how to route the terminal count to a pin that can be used to trigger the pulse train on the second counter. For an example of AI operation with a counter-generated pulse train, check out "Multi-Function-Ctr Retrigg Pulse Train Generation for AI Sample Clock.vi" in the Hardware Input and Output>>DAQmx>>Synchronization>>Multi-Function folder in the Example Finder.
Thanks-
Tom W
National Instruments
Attachments:
Count Digital Events with Output Pulse.vi ‏64 KB

Similar Messages

  • Is it possible to enter events into a specific iCal calendar, then print a list of those events with the name and date on a single sheet?

    Is it possible to enter events into a specific iCal calendar, then print a list of those events with the name and date on a single sheet?  I don't need the calendar grid.  I just want a list of events on a particular calendar, and their dates.  Is that possible? 

    Not easily. Two possibilities:
    1) If all the events have some common feature (eg you have included "XXX" in all the summaries), search for that feature then select and copy the found items at the bottom of the window. You can then paste them into TextEdit or a spreadsheet for printing
    2) You could write an Applescript to locate the events and write them into a text file for printing.
    The first one will probably give you what you want.

  • Fail to add all day event on a specific date

    Hi, my ical fail to add all day event on a specific date 2nd of Oct, when i double clickto add all day event, it falls on the 1st or 3rd but not the 2nd?

    Hi Maggie,
    Yes you can change your timezone, but in my opinion only Apple can really fix this problem. The more people they know are having the this issue the more likely Apple will fix it. Therefore I suggest you send them feedback about the problem.
    Best wishes
    John M

  • Grabbing an event from a specific calendar by date

    Is there a way to grab an event from a specific calendar by date?
    Basically, I receive an email with information I want to put in the event name (title?) - it is in a particular calendar, and a on a particular date. I grab that event, update the event title with the information i parsed from the email message (i've already got that part done).
    I've looked through many applescript examples, but they all seem to deal with creating an event, not updating one.

    It's quite easy if you know specific value of the event, the following change summary property of the event:
    tell application "iCal"
    set _event to first event of calendar "Home" whose summary contains "Test..."
    set summary of _event to "More Test..."
    reload calendars
    end tell
    However, things get complicated when you try to get repeated events, because repeat events don't really have true start date and end date. So it's really difficult to get a repeat event by its start date or end date. See this thread:
    http://discussions.apple.com/thread.jspa?threadID=440481&tstart=0

  • Use a "Write" Event on a Specific Drive or to a Specific Folder to Trigger a Task in Task Scheduler

    I first posted this question on the Microsoft Community forum. It was suggested that I repost it here.
    I have a question!
    (Pleas forgive the long post...)
    What I am trying to do: (This is what I have not yet figured out!)
    I am trying to figure out how to trigger a task, in Windows Task Scheduler (WTS), whenever a "Disk Write" event occurs on a specified drive on the machine. - Or, more specifically, whenever a new file or folder is written or
    saved to a specified Folder, or a specific Disk Partition, or a specific Hard Disk on the machine - whichever is more relevant for the end goal.
    The overall goal:
    When a "disk write" operation occurs and data is written to a specified location on a Hard Drive, start a Program at the beginning of the following hour, that will run a backup of the contents
    of that location, (after - of course - the new data has been written). After the backup is complete, disallow the program from being started again at the beginning of the next hour, unless more data is written to the specified location beforehand.
    Example:
    At 2:27pm, I save a new word document to "D:\My Folder\". When the new Word doc file is saved to "D:\My Folder\", my preferred Backup software application is then scheduled to run a backup at the beginning of
    the following hour - at 3:00pm - which will then create a new backup of "D:\My Folder\".
    The backup software will NOT be scheduled to run again at the next following hour - at 4:00pm - unless another file or additional data is written to "D:\My Folder\" - between 3:00pm and 4:00pm.
    Summary:
    The goal here is to only run a backup at the beginning of the next hour, following a “disk write” event to a specified location on the hard drive.
    Steps that I have, so far, on how to make this happen:
    Whenever data is written to a specified location on a hard drive (i.e. "D:\My Folder\"), "Task A," in Windows Task Scheduler, will be triggered to execute its action.
    The Action in "Task A" will run a script that changes the Status of "Task B" to ENABLED.
    The Action in "Task B" will, on a continuous hourly schedule, start a program that will perform work on the machine. (In this case, it will run a Backup Task in my preferred backup software.)
    Upon completion of work by that program (the Backup software), that program will run another script that will change the Status of "Task B" back to DISABLED; preventing "Task B" from continuing that program every hour
    according to its hourly schedule.
    How do I do this: ... ?
    The thing holding me back on making this work is figuring out how to identify the source that generates the “disk write” event and event ID I need, so I can use it to trigger a task in Windows Task Scheduler - in the way that I need. Furthermore,
    the “disk write” event needs to specific to a disk drive that I specify and if at all possible, specific to a location that I specify, i.e. “D:\My Folder\”.
    Any help on this as well as other suggestions on making this work is greatly appreciated!
    Ryan A Miller

    Hello Ryan A Miller,
    What is your current situation?
    Have you try the script as  Frederik Long mentioned?
    To receive better support, it is recommended to post in the TechNet Script forum.
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    The professionals there will be glad to help you.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Not able to extract performance data from .ETL file using xperf commands. getting error "Events were lost in this trace. Data may be unreliable ..."

    Not able to extract  performance data from .ETL file using xperf commands.
    Xperf Commands:
    xperf –i C:\TempFolder\Test.etl -o C:\TempFolder\BootData.csv  –a process
    Getting following error after executing above command:
    "33288636 Events were lost
    in this trace. 
    Data may be unreliable
    This is usually caused
    by insufficient disk bandwidth for ETW lo
    gging.
    Please try increasing the minimum
    and maximum number of buffers
    and/or
                    the buffer size. 
    Doubling these values would be a good first at
    tempt.
    Please note, though, that
    this action increases the amount of me
    mory
                    reserved
    for ETW buffers, increasing memory pressure on your sce
    nario.
    See "xperf -help start"
    for the associated command line options."
    I changed page size file but its does not work for me.
    Any one have idea, how to solve this problem and extract ETL file data.

    I want to mention one point here. I have total 4 machines out of these 3 machines above
    commands working properly. Only one machine has this problem.<o:p></o:p>
    Hi,
    I consider that you can try to use xperf to collect the trace etl file and see if it can be extracted on this computer:
    Refer to following articles:
    start
    http://msdn.microsoft.com/en-us/library/windows/hardware/hh162977.aspx
    Using Xperf to take a Trace (updated)
    http://blogs.msdn.com/b/pigscanfly/archive/2008/02/16/using-xperf-to-take-a-trace.aspx
    Kate Li
    TechNet Community Support

  • How to count number of members on specific level at specific moment?

    ASO
    4 dims(for example)...
    -Times
    -Product
    -Organizations
    -org1
    -org2
    -orgN
    -Measures
    -cost
    -org_num
    I want to identify the count of memebers in Dimension Organizations at any time(f.e. for all Products in January in) . What is the syntax of mdx formula in outline?

    Here is an example that i've right now
    Count (EXCEPT([Dimension1].Levels(0).members,Descendants([Parent 1],Levels([Dimension1],0))))
    This will give all the level 0 members of dimensions except level 0 of a parent.
    I'm assuming that by specific moment you mean a specific measure.
    NonEmptyCount (Market.Levels(0).Members, Sales,exclude_missing)
    With
    Member [Measures].[Number Of Markets]
    as 'NonEmptyCount (Market.Levels(0).Members, Sales,exclude_missing)'
    Select
    {[Measures].[Number Of Markets]} on Columns,
    {[100].Children, [200].Children} on Rows
    FROM Sample.Basic
    where ([jan],[actual])This will give you
    (axis)     Number of Markets
    100-10     20
    100-20     16
    100-30     8
    200-10     20
    200-20     17
    200-30     9
    200-40     3
    Now if you clear one market (I cleared colorado->100-10,Sales,Actual,Jan) and then the result will change to
    (axis)     Number of Markets
    100-10     19
    100-20     16
    100-30     8
    200-10     20
    200-20     17
    200-30     9
    200-40     3
    Regards
    Celvin
    http://www.orahyplabs.com

  • HT2513 iCal string of events repeat and end on a given date?

    Is there a way to have any given string of events repeat and end on a given date?
    Example, I have a different training regiment for each day leading up to an event/date and then will have the same training regiment again leading up to another event. I want each day's training regiment to show up as an event per day... but don't want to have to post each days repeat string of training prior to each event... and they don't nessecarily repeat monlthy or regularly... I want to set an end date and all the training fill in from that date backwards. Is this possible??

    Does this work any better? New-jobtrigger requires a datetime object.
    $csv6=Import-Csv D:\Lzero\Coll_Schd\Dependent_List.csv
    foreach($cs in $csv6)
    {$sys=$cs.CI
    [datetime] $schd=$cs.RebootSchedule
    $user="Domain\username"
    $paswd=ConvertTo-SecureString -String "P@ssWord" -AsPlainText -Force
    $Credential=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $user,$paswd
    Register-ScheduledJob -Name System_Restart -ScriptBlock {
    Restart-Computer -ComputerName $sys -Force -wait} -Trigger (New-JobTrigger -At $schd -Once) -ScheduledJobOption (New-ScheduledJobOption -RunElevated) -Credential $Credential

  • How to read a specific line of a .dat file?

    can we read a specific line of a .dat file, if so, how?
    i have this .dat files for each customer, which contain their name on the first line, their id on the second line
    and a list of items and an item id between each item.
    John Doe
    455689
    milk
    1
    orange
    9
    Here is what I am trying to do, please correct me
    //list out .dat file in dir
    File customer_dir = new File ("Customer")
    if (customer_dir.isDirectory())
    String[] listofdat=dir.list();
    for (int i=0;i<listofdat.length();i++)
    Scanner dat_read = new Scanner (new File listfodat);
    dat_read.nextLine();
    if (dat_read.nextLine().equals("455689")) <--is this okay?

    bibiancheng wrote:
    would you please explain to me what
    String[] tokens = line.trim().split("\\s*,\\s*")"\\s*,\\s*" is a regex where \\s means whitespace and the * means "any number of".
    so \\s* means that it will grab all the whitespace if there is any.
    trim() removes white space from the beginning and end of the string.
    dont put a comma in the name.
    spaces allowed: "jane doe, 12-14-09, 428438, 6, 388473, 7, 187374, 3"
    it was just a recommendation. breaking it into separate lines would be fine.

  • How do I backup to a specific device at an specific moment?

    Here is what I want to do:
    - Any night of any day in the week, connect my external HDD to my Arch computer, and go to sleep.
    - At the next morning there is a backup done on that HDD.
    I understand the basics on some tools which can help me do that (crond, dd, udisks), but I utterly uncapable to make it work all together, so let me ask some questions to start looking myself:
    - Is it possible to use some kind of "device ID" to take a signal from udev and pipe it anywhere else?
    - Which daemon could be watching in order to take that signal and execute the backup script?
    Thanks for patience =P
    Last edited by JMO (2011-03-26 14:56:52)

    Since it's happening so infrequently (once every 24 hours), why not just set up a simple script to run every night at a time you're usually asleep?
    Here are some tools you'll probably find helpful:
    1) Cron: runs a specific task at set times.  Arch Wiki: Cron
    (If midnight works for you, you can simply place your script in /etc/cron.daily/; it will then run each night when the clock strikes 12.)
    2) rsync: copies files incrementally (i.e. only files that have changed will be copied) Arch Wiki: Rsync
    In your script, you can pretty easily check to see if the drive is plugged in using its label; there's a nice set of symlinks in /dev/disk/by-label. This short script runs one or more commands if and only if a block device is attached with label yourDiskLabel.
    #!/bin/bash
    if [ -b /dev/disk/by-label/yourDiskLabel ]
    then
    #perform your backup command(s)
    fi
    (If, for some reason, you have multiple drives with the same label, you can use their UUID/universally unique identifier. There are a similar set of symlinks in /dev/disk/by-uuid.
    just got this idea, using udev script to start a backup.
    When you plug in the media it will record and it could wait a specific moment to start the backup procedure.
    I would think this would just take up more resources than just checking for the drive's presence at a set time.

  • Exporting one specific pdf form field data to a specific webpage field

    Hello there.
    I am currently creating a form in which I need to export one specific pdf form field data to a specific webpage field to avoid typing it again or hitting ctrl+c and then ctrl+v to the webpage, as there are several records that need to be copied and pasted.
    I read that there is no access to the clipboard within pdf therefore, would like to know if there is any way to do that without accessing the clipboard.
    I am a newbie and have been learning by searching the forums and Google, therefore, would appreciate any insight on whether or not this is possible using javascript or the "submit form" funcion.
    Any help is greatly appreciated!

    Hi George, thanks for your response!
    The main issue I have is that this web page is in fact a government page in which I have to manually copy and paste information.
    I have no idea how to automate this process - I have access to the scripts on the page to see what I am able to do, but since I do not have much experience (only very basic javascripting), any other insight would be great!

  • I've just imported photos that are misdated and appear out of order in my events. How can I correct the dates on these events so they appear properly?

    I've just imported photos that are misdated and appear out of order in my events. How can I correct the dates on these events so they appear properly?

    The one iin the Photos ➙ Adjust Date and Time menu option:
    checkbox below:

  • Date type-specific Customizing missing for date type ACTActPln

    Hi all.
    I'm using a Web Service obtained by copying the CRM 7.0 built-in WS APPTACTCRTRC.
    I'm using it to create Appointments using an Adobe Interactive Form.
    It goes everything fine (a Date is created in the system, with all the input data properly set) excepted the dates...
    The WS uses two TIMESTAMPS, TIMESTAMP_FROM for StartDateTime and TIMESTAMP_TO for EndDateTime, whereas the GUI transaction to create Dates accepts dates and times in separated fields.
    Going in Debug I can see that the execution ends with the following error, referred to the involved entity (CRM_APPOINTMENT):
    Date type-specific Customizing missing for date type ACTActPln
    CRM_APPOINTMENT uses date profile 0000000001 with three possible date types: ORDERACTUAL, ORDERPLANNED and ORDERPROPOSED and I cannot find anywhere date type ACTActPln (just to add it in customizing).
    Is anyone able to enlight me?
    Thank you in advance!
    Alessandro
    PS I've years of experience in Java programming but I'm quite new to the SAP world. Maybe the problem is not a problem at all, but it seems to me as such. Even if it has a trivial solution, please let me know. Thx!

    Hi,
    Well I was about to write that you should enter date in decimal format. but you already did that as mentioned in How to set a date in a Form where the bound date format is a decimal?
    In response to following from above thread (copied for others to understand my response)
    Hi all.
    I'm successfully using the LiveCycle Designer and I've managed to remotely create Appointments using a CRM Web Service (a mere copy of APPTACTCRTRC).
    The only problem I'm encountering is that I'm not able to set the dates/times (start and end of the appointment).
    Dragging each of the two fields from the WSDL based Data Connection I obtain a Decimal Field limited to 15 digits.
    How can I write a date and time in such a field?
    I've tried with a retroverse date as YYYYMMDDHHmmss (for example, 20100301124500) but it does not work
    (the appointment is indeed created, but with the start date and time fields filled with
    the current date/time and the end date and time fields filled with the current date and time plus 10 minutes).
    The retroverse date above is only 14 digit long, so, maybe, this is the problem.
    But, given the field definition, I'm not able to fill a blank space between the date and the time.
    I'm not able to put a dot either.
    What should I do?
    Any suggestions?
    Thank you in advance.
    Alessandro
    15 digit in UTC time format here is fraction of second so you should enter 201003011245000 (add one more zero).
    14th Oct 2010 16:00 should be written as 201010141600000, so just try it and and see if it works, I guess if you do not supply end time then by default it will be starttime + 10 min but this is just guess.
    Regards,
    Gourav

  • One Event created when importing photos from many dates

    This is my first time using iPhoto, and I imported a few hundred images from my camera dating back about 7 months. I viewed the tutorial, and my understanding was that different events would be created based on the date of the files. Instead, it created one huge event of the date I imported them. Is that the way it operates? One this I was able to do with the app I used on Windoze was to have the images go into directories named by the date, so images were separated by day. Is there a way to specify that in iPhoto, or do I manually have to create events by splitting them once they are all in my Event that is dated the day I actually imported them?

    Welcome to the Apple Discussions. How photos are separated when imported is set in iPhoto's Events preference pane:
    Click to view full size
    When importing from the Finder, i.e. a folder on the hard drive, all of the photos will be in a single Event unless that checkbox that's pointed to in the screenshot is checked.
    FWIW my workflow is to upload after every shoot to a folder, name the folder to identify the occasion of the photos and import the folder into iPhoto. This gives me an Event with the same name as the folder. I also rename the photos with the international date format for the date the photos were taken: YYYY-MM-DD-001.jpg, -002.jpg, etc. This avoids duplicate file name issues that can crop up at a later date.
    I then have the camera reformat the memory card for the next shoot.

  • Data acquisition loop with queue

    What I would like to do is have a data acquisition loop that samples a load cell at 500Hz and have another loop that runs much slower to run a state machine and display some data in real time.  The reason I want to sample the load cell so fast is to filter out some noise.  Making producer/consumer loops with a queue kind of makes sense but I don't really care about all of the samples, I just want to be able to read a real time filtered signal at certain times.  I looked at having just two parallel loops, one to acquire the data and the other to run a test and retrieve a real-time signal when I want but not sure how to pass data between the loops without using a queue.  You can do it with local variables but you are at risk of a race condition.  I hope this make sense.  I am sure this is a simple problem I just don't know what direction to go.  Thanks

    Good Evening secr1973,
    It sounds like you are on the right track.  You already know about the producer/consumer architecture; this is almost always the first step to the separation that I think you are after.
    The step that I think you are missing is a Case Structure around the enqueue element VI.  You likely have some event or specific pattern that you are looking for in the input signal.  You can have the output from this algorithm (likely a boolean) determine which case of the Case Structure to execute (Case 1: enqueue the element or Case 2: Do not enqueue the element).
    This, of course, leads to processing being done in the producer loop, which is quite the opposite of what you are trying to accomplish with the producer/consumer architecture.  You will have to decide if your processing is very simple or more complicated.
    If it is easy/fast, you can likely get away with doing this processing in the producer loop.  My guess is that your program falls under the category of do-it-all-in-the-producer loop because you are only acquiring at 500 Hz.
    If the application requires faster acquisition rates or if the logic is going to require some processing, you may want to implement a double layer producer/consumer architecture.  In this setup, you would pass all of the data from the DAQ producer to a second loop (using queue #1) that determines what to do with the data (to enqueue or not to enqueue...) and, if appropriate, write to a queue (queue #2) that the third loop can read.  The third loop would be where your state machine executes.
    If you have a quad core machine, each of these steps will execute on its own core.  If not, you will have a little more thread swapping; not a huge concern in most cases.  Here, we get into the art of programming more than the science.
    In any event, I think you will be OK with a little processing for the enqueue or not algorithm in the producer loop.
    Regards,
    Charlie Piazza
    Staff Product Support Engineer, RF
    National Instruments

Maybe you are looking for

  • How to delete a report from SAP BO?

    is there a way to delete a report from SAP BO that won't be right clicking on it, organize, then delete. Something from the database because I have a report that for some reason has more than 2 million iterations trying to run and is making my server

  • Sort by Alias name in Webform

    Hi All, Greetings!!! I have defined employee dimension as row in Webform and display property as "Alias". Now the requirement is, I need to display the employees based on sort by their alias names. Thank you so much for your kind help Regards, tvmk

  • Formulas on Groups

    Post Author: Joy Hampson CA Forum: Crystal Reports I am working from CR XI.  I have created two groups using a formula, TeamA and AllOthers.  TeamA is derived from a Dynamic Parameter field.  These two groups have 14 areas in which they are scored. 

  • Production order - Master data explosion date

    Dear Team, I am creating the production order in CO01. While creating the production order, i am choosing the backward scheduling. Since i have selected the backward scheduling, i have given the finish date as "27.02.2012". And in the tab "Master Dat

  • Can I flatten/expand stroke to outlines on Export to PDF or EPS?

    I have 300 page document that I need to use to send to a sign makers to have 300 different vinyl cut signs made. I've used a heavy stroked line in my document but when exported as EPS or PDF the stroke has not been outlined, meaning the path for the