input analog trigger on the door of the meter to measure the frequency of generation

Hello

I want to measure a frequency on the analog input, but it doesn't seem to work.

I'm trying to work with DAQmx with the use of the ansi c standard.

The first step, I've done was acquiring information on the analog input. With the use of a simulated device, it shows a sine wave on the entry.

My next step is to generate a trigger for the meter signal, but this doesn't seem to work.

I don't see how it is possible to connect the trigger on the entrance to the analog meter.

For the creation of the analog input and relaxation, I use the following code:

DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-3.0,3.0,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",10000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,1000));

DAQmxErrChk (DAQmxCfgAnlgEdgeStartTrig (taskHandle, "Dev1/ai0 ', DAQmx_Val_RisingSlope, 0 '"));

For the creation of the meter, I use the following code:

DAQmxErrChk (DAQmxCreateCIFreqChan (taskHandle1, "Dev1/ctr1", "", 1 January 2000, DAQmx_Val_Hz, DAQmx_Val_Rising, DAQmx_Val_LowFreq1Ctr, 1, 4, "");)

I hope someone could give me a hint.

I also tried the examples that come with DAQmx but well I know this are only examples to counter with the help of the digital inputs.

Thanks in advance.

Hello

You must use the exit event of comparison at the entrance of the meter. Change this property after the configuration string function.

DAQmxSetChanAttribute (taskHandle1, "", DAQmx_CI_Freq_Term, Dev1/AnalogComparisonEvent);

Kind regards

Bottom

Tags: NI Software

Similar Questions

  • To input analog shutdown when the analog output is completed and synchronization

    Hello

    I'm trying to get my LabVIEW program to send analog output to a computer and read acceleration using the cDAQ-9184. Chassis output that I use is the NI 9263 and the chassis of entry is the NI 9234. I generate a signal of white noise using LabVIEW Express signal generator.

    The first problem I have is the synchronization. I had an old VI that has begun to measure the acceleration just about a second after the entry has been given to the machine. I used the LabVIEW tutorial on how to sync the analog input and output, only to discover that it does not work with two different hunts. Then I found another tutorial that shows how to synchronize different frames between them.

    The second problem is the cessation of the LabVIEW program. What I want to do is to generate the signal and then simultaneously send and read the input and output analog, respectively. It is because I don't want a phase difference or any shorter signal for a direct comparison. But as soon as the signal is sent to the machine, I want the entry to stop analog playback and then then the LabVIEW program must stop. I want to be able to choose any length of signal to be generated and stop as soon as the entire duration of the signal has been sent to the machine.

    I tried 'DAQmx stop', "DAQmx Timer" and 'DAQmx's task made?' and none of them have worked for me. It is also my first time on a forum posting, so I hope I gave enough information. I enclose my VI as well. The VI shows I read an entry for the analog input voltage, but I am only using this to try to get to the work programme.

    I'd appreciate any help I could get.

    Thanks in advance

    Peter

    Hi Peter,.

    I have some recommendations for you that I think you will get closer to your solution. First of all, I assumed you meant that you had 1 chassis (cDAQ-9184) who had two modules in it (NOR-9263 and NOR-9234). My next steps are based on this assumption, so if it's wrong, please let me know.

    For your first question about the synchronization, the code you provided is very close to what you need. You need to do, however, implement architecture master/slave for startup tasks DAQmx functions. To do this, you can add another frame to the flat sequence structure and put the master start task (input voltage) after the start slave (output voltage) task.

    To manage your second question and that the program ends at the point where you, the first step is to get rid of all the logic that you use with the local variable of length of time. Rather than use this logic, just wire the node "task performed?" of "is task performed?" operate to stop the loop. This will cause your loop to stop as soon as the signal is sent to the machine.

    I have some other recommendations for you that will increase the performance of your program:

    (1) rather than writing on file inside the last loop, you can use the DAQmx Configure Logging (PDM) .vi. You will place this VI between DAQmx Timing.vi and DAQmx Start Task.vi to the task of the analog input voltage.

    (2) after the last while loop, you want to stop the task and analog outputs as well with another DAQmx stop Task.vi.

    (3) rather than using a local variable for the entrance of displacement and wiring it in the DAQmx Write.vi, you can wire directly from the output waveform of the wave to build function node.

    That should help you get started in the synchronization of these tasks.

    -Alex C.

    Technical sales engineer

    National Instruments

  • Generate a digital output that indicates the frequency of half of the contribution

    Hi, I'm new with data acquisition. I would like to get your help.

    I have a digital signal input that is generated by an encoder. I would like to generate an output signal of the way that his level of signal will change at each edge of the awareness of the input signal so that the frequency is half that of the entry.

    I would like to know how to do this using the NI DAQ M 6221 map.

    Thanks for your help

    Hardware solutions can be so simple... sometimes I prefer an iron solder wire

    Look at the section counter...

    I think there's a prescaler/separator for the meter... and the next would try to drive the output to a PFI

  • How can I impliment a delay between the analog output and analog input (started by an external analog trigger)?

    I am acquiring several channels of analog voltage input at the same time, I need to send an output analog two seconds after the start of the entry.

    I'm running an experience with accelerometers on a query table.
    I start the trigger and the table remains still for two seconds, which allows a reference level for all sensors.
    Then the output signal of the VI removes the break in the motor controller.
    The speed measured by the encoder is sent to one of the input channels.

    In this way, our accel and speed data are synchronized.

    After it acquired the analog input data out put must be reset to zero.

    MULTI.vi

    I've updated the link above works of VI, I used a property node to solve the problem.

  • 6071E analog out and trigger to the end

    Hi, I'm here a trivial question: using PCI6071E, at the end of an analog output, is it possible for a trigger to output or update a number line?  for example, we hope when the last MONOSTABLE one sample is done, a digital HIGH is generated to power a switch.  I can think of have an analog and digital task task and the digital task at the end of an analog task in the program, but I don't know how long the delay would be. The best ways to do this? Thank you!

    Analog output: finished/large size but NOT via the trigger of FIFO, internal CLK software,

    on DAQmx / C + c++ / WinXP

    eLions,

    Analog task followed by a digital task that you thought would work, but it would be a delay of small software timed as you thought it would which can cause problems. If it's an analog output of finite size (say 1000 samples), what you can do is to synchronize the digital and analogue tasks together and have a digital low for 1000 samples, with the 1001eme exit on the digital line being the maximum. It would make no delay, as analog and digital line should be sharing the same frequency. C++ examples provided show how to sync analog analog output, which can be changed by the digital output.

  • How to distinguish the samples from 6 different inputs analog

    Hello everyone, I'm still new to NOR-DAQmx. I write a C++ program that reads 6 analog inputs of the card PCI-6220.

    Basically, I created 6 virtual channels in a single task, looks like I'm acquisition of required inputs.

    However, the problem is that I don't know which sample comes from what analog input channel. I put the fill mode "DAQmx_Val_GroupByChannel".

    Please help me, how can I distinguish between samples of different analog inputs.

    Best regards from Kazakhstan,

    Khassan

    Khassan,

    Channel order would be decided in the order in which you added your channels to the task.  So let's say I create a task and adds three channels and add them in the order ai0 ai1 and ai2.  If I set the fill to "DAQmx_Val_GroupByChannel" mode, DAQmxRead will copy data in "readArray' such that ai0 data all together, followed by the data of ai1, which is followed by the data of ai2.  The size of each of these sections of the buffer must be returned through the 'sampsPerChanRead' argument to read.  So if were to call read and DAQmx returned 5 for "sampsPerChanRead", then my data buffer would look like this:

    AI0, ai0, ai0, ai0, ai0, ai1, ai1, ai1, ai1, ai1, ai2, ai2, ai2, ai2, ai2

    Hope that helps,

    Dan

  • Trigger on the first attempt

     I'd like some help / advice on my LabView program (attached) please. In the VI, the MyVoltageTask_1 is configured as a voltage signal corresponding to a pressure change inside an enclosed cylinder. The signal is transmitted to the BNC 2110 DAQ board / PCI 6133 DAQ card via a differential pressure transducer. 
    
    Ideally, the program should trigger as soon as I let air into the cylinder and start acquiring data, and stop as soon as its done. However, LabView does not trigger when I let the air into the  cylinder on the first attempt, but if I exhaust the air and let it in again a second time, the program triggers and I can see a graph of the pressure trace. Please let me know if there is something I should / could change in the program to have the program trigger on the first attempt. Thanks!
    
    
    
    			 

    Have you try to change the slope falling upward? I begin to take a look at shipping the first examples. "" "Open Finder for example of OR and go to hardware input and output" DAQmx "analog measures" voltage. Take a look to the example called "Acq Cont & chart voltage-Int Clk - Analog Start.vi ' I contains the basic structure of what you're trying to reach.

  • synchronize the inputs and outputs on the USB-4431

    Hello

    I have an application that needs to send a signal on the USB-4431 and then capture it with an entry on the same device.

    Aware that I use two tasks to do this, one for input and one for output. I discovered that a trigger (on the RTSI bus) can cycles of sending/capture sychronisé departure operations so that it can be a constant offset between the captured signal and the output signal.

    Unfortunately, the code I found is for Matlab. I can't find an equivalent for it in the C API of NIdaq. The method is described here; http://www.mathworks.in/help/daq/synchronize-analog-input-and-output-using-rtsi.html.

    What I can't understand is how to implement this on the analog input:

    ai.ExternalTriggerDriveLine = 'RTSI0';
    

    Can someone shed light on how to do it?

    The rest of the things described here, seems to be feasible with a normal trigger:

    ao.TriggerType = 'HwDigital';
    ao.HwDigitalTriggerSource = 'RTSI0';
    ao.TriggerCondition = 'PositiveEdge';
    

    Thank you

    Nirvtek

    You can synchronize the HAVE and AO by sharing the start of relaxation between your two tasks.

    Choose one of your tasks as the "master" and the other to be the "slave" (any).

    Set up a trigger to start of digital dashboard on the task of the slave, and set the source of the trigger to be the trigger of the master's departure.

    Assume the following:

    The name of your device is 'Dev1 '.

    I is the main task

    AO is the task of the slave

    Here's what you would do to sync the two:

    (1) create the tasks I and AO in order that you want to

    (2) set up "timing" on the tasks of HAVE it and AO (you choose the sampling rates must be the same or power-of-2 many of the other (for example 100 K, 50 K, 25 K, 12.5 K, etc...))

    (3) configure your slave (the task of AO) task to have a numerical advantage start trigger and make the source is the trigger for the start of the task of the master (the task to HAVE it). In our case, "Dev1, AI, StartTrigger.

    (4) write data (a sine wave, presumably) to your task AO

    (5) start the task from the slave (the task of AO).  The task of the AO is now in the 'Started' State, but given that you've set up a digital trigger early, it won't actually generate data until he sees a numerical advantage of 'Dev1, AI, StartTrigger.

    (6) to start the main task (task to HAVE it).  The task of the AI does not have a trigger digital early, so the software will immediately generate a start trigger, which also causes a numerical advantage on "StartTrigger/AI/Dev1", which causes the task AO start at the same time.

    7) read your job to HAVE.

    You will notice a few 0 at the beginning of your data to HAVE. It's a result of something called "Filter Delay" and it is an inherent characteristic of all DSA devices - see the manual to use DSA and this article for more information on what is and how to cope.

    I hope this helps.

    EDIT: I just noticed that you pointed out an existing C example. It's exactly what you want. I don't know why you have a resource error booked - I tried it myself and (after changing the AO will of +/-10V to +/-3 .5V), it works beautifully.  Try to reset your device to the MAX (or DAQmxResetDevice() of your program)

  • The original loop iteration after receiving the trigger of the PXI-6652 pulse

    Hello world

    I apologize if this has been answered somewhere else, but I'm having a hard time finding examples and tired after a long day of work.

    in any case, I use a PXI chassis with a PXI-7854R FPGA Board and module synchronization PXI-6652.  I have the FPGA biphasic pulses being generated at 8 analog channels.  I want to be able to do is to send a trigger (say at 1 Hz) for the PXI-6652, which begins at the exit of the biphasic pulse on the FPGA.  I'm running the FPGA through a host program as the variables on biphasic wave will change based on the current experience.

    So, in short, I was wondering how to generate a trigger of the PXI-6652 pulse and then use this trigger in a host of VI to start an iteration of a loop.  It seems simple enough, so any help would be appreciated.

    Thank you, and I can post the code tomorrow if necessary.

    To answer your second question, Yes, the driver NOR-SYNC 3.3 is available for download and use with LabVIEW 2011.

    As far as use the PXI-6652 to start the acquisition on an FPGA VI, we have enough good examples provided with LabVIEW that will show you how to proceed.  To actually generate a trigger with NO-Sync, there are several examples in the Finder for example of NOR (help > find examples) which send a trigger one of the PFI lines to be used with the other modules.  You can search for OR Sync and they all appear here.  You need this driver installed first before you see anything, however.

    Also, if you look through the viewfinder of the example under Hardware Input and Output > R Series > FPGA Fundamentals > triggers and guard dog, you will find an example of triggering good enough it for use in your FPGA code.

    This example uses NO-Sync to trigger a device of the M series, which is not relevant to what you are doing (he uses DAQmx), but there is a very good example of generation OR-Sync trigger here who I think can help.

  • analog input external trigger 6015

    Hello

    I was able to configure my 6015 to accept an external trigger to start a measurement of analog input (with a # set of samples and freq).  However, what I want to do is to set up so I can send a 20 kHz signal to the trigger, and whenever the trigger detects the signal, the device would take a measure of the tension of each of the two channels.  He would then save this memory on board and allow me to read the data later.  That's what I can't figure out how to do.

    If he put in place such as I have an asynchronous callback and read data after each pulse, it takes too much time in my application.  I want to get a measure for each external trigger pulse (the freq may vary higher or lower, it's why I can't put just a freq - I need to use the trigger) and these data saved in memory on the card for me to pick it up later.

    Is this possible with the 6015?  Another tip?  If so, can you please show a few snippets of code in VB.NET or c# .NET?

    Thank you

    Joe

    Hey Joe,

    I think that your application should work fine with the 6015. I mentioned only the buffer size as previous your post said 'I want... these data stored in memory on the card to grab me afterwards,' and especially supported in NOR-DAQmx devices (including the 6015, PCI E Series, the new series X PCIe and PCI M Series) don't work that way. They have permanently transfer data in a buffer in the memory of the host throughout the acquisition PC, and they have enough buffer on board to avoid negative/overflow buffer overflow errors at their maximum supported rate

    Brad

  • How to generate a trigger when the arbitrary

    Hi all

    I have a digital output pci card 6534 and an analog output pci card 6723.

    I would like to generate a material long pulse sequence timed. The 6534 has 32 MB memory on board, so it is good to do a long sequence. The 6723 will run out of memory if started at the same time. I would therefore trigger the 6723 at a later date. The boards are connected with rtsi.

    I see 3 ways to do (well that I know how to do, but the first two would be more elegant):

    (1) generate a sequence of digital pulses on ports (i.e. how that), then convert a line of port online rtsi (don't know how to)?

    (2) generate a trigger to the arbitrary point on the rtsi lines (don't know how to)?

    Go 3) with 1) physically connecting a port to a line PFI on the analog card.

    I have not found a way to send a trigger at some arbitrary point with the RTSI. Instead of this I went with solution 3) and related digital outputs analog card PFI channels.

  • How can I activate several tensions trigger on the PCI-6221 using NOR-DAQmx?

    I use the card to make an acquisition of data simple PCI-6221.  The idea is to allow three different analogue voltages trigger the State of data acquisition.  I currently put code in place for a trigger voltage but I'm not sure what to do to add two additional trigger voltages. Any ideas?

    Thank you.

    Hi capncane,

    The 6221 is not able to do an analog trigger so DAQmxCfgAnlgEdgeStartTrig will not work for your card. Is your relaxation a digital signal? If so what kind of logic level is? If it's TTL, you can use the PFI lines. If this isn't the case, you need to trigger as I mentioned in my previous post.

  • How to reset the file input form after submitting the form with an ADF file

    I use oracle 12 c. I have a form where I have 3 fields and an af:inputFile where I need to download the file and the final backup.

    I can't use for inputFile valueChangeEvent because if I user ResetUtils then I won't get the invalid entry form.

    On record everything works fine but when I add once again a record then the last file update still shows in inputFile (its not reset).

    After save if I set the binding of the null input file then do partial trigger for the component by using its page load Binder takes a huge time to save so I can't use it.

    Here is my code

    < af:panelFormLayout id = "pfl1" rows = "3" >

    < af:inputText value = "#{bindings." Filename.inputValue}"label =" #{bindings. " Filename.hints.label}.

    required = "#{bindings." Filename.hints.Mandatory}.

    columns = "#{bindings." Filename.hints.displayWidth}.

    maximumLength = "#{bindings." Filename.hints.Precision}.

    shortDesc = "#{bindings." Filename.hints.ToolTip}"id ="9 ".

    contentStyle = "width: 150px" showRequired = "true" >

    < f: validator binding = "#{bindings." Filename.Validator} "/ >"

    < / af:inputText >

    < af:panelGroupLayout id = "pgl350" layout = "horizontal" >

    < af:inputFile label = "Select" id = "if51" value = "#{ContractDocumentUploadDwn.file} '"

    showRequired = "true" binding = "#{ContractDocumentUploadDwn.inputFileBinding}" / >

    < af:button text = "Upload" id = "b353" action = "#{ContractDocumentUploadDwn.uploadPortfolioDoc}" / >

    < / af:panelGroupLayout >

    < / af:panelFormLayout >

    Java code:

    {} public void savePortfolioDoc (ActionEvent actionEvent)

    Add the code in the event here...

    DCIteratorBinding iter = getDCIteratorBinding ("portfolioDocument1Iterator");

    UploadedFile myfile = this.getInputFileBinding () .getValue () (UploadedFile);

    String link = "Commit1";

    String popUpId = "p2";

    genericSaveDocuments (actionEvent, iter, myfile, lie, popUpId, "Portfolio"); Saves the document

    iter.executeQuery ();

    ITER. Refresh (1);

    setInputFileBinding (null);

    ResetUtils.reset (actionEvent.getComponent ());

    }

    Please help me

    See this line in your code

    You use a variable as the inputFile value so you must set its value to null

    Write like this-

    this.setFile (null);

    Reset the inputFile component after download

    ResetUtils.reset (inputFileBinding);

    Ashish

  • Population of trigger of the field dependent on the loading of the page

    Hello

    I use JDeveloper 12 c. I have a text with a LOV entry field and the output text field which depends on the input box. I created these in the view entity such that when I change the value of the entry in the field (directly or indirectly), he correctly fills the field of dependent result. Note that the input field is linked to the data, but the result field is not (it is a transient field). So that everything works correctly.

    When I load the page fragment, the data are filled in the field as expected. But I would also field dependent for automatically filled with the appropriate value based on the value in the input field. I've tried to set 'auto-submit' on the entry field and a PPR trigger on the output field, but it was not effective. Is there a setting that can allow to do it automatically? Or do I need to use code in a backing bean? And if so, examples of code would be great.

    Thank you.

    As first, write continuation method in the Java ViewRowImpl class:

    /**
     @param lbdName - List Of Values Name you attached to the attribute
     @param attrName -LOV attribute name whose value you want to return from method
     @param arr - LOV's key attributes values
    */
    protected Object getLovAttribute(String lbdName, String attrName, Object[] arr){
        Object result = null;
        ListBindingDef lbd = getViewDef().findListBindingDef(lbdName);
        if (lbd != null) {
            Key keyForLovVO = new Key(arr);
            Row lovRow = getListBindingRSI(lbd).getRow(keyForLovVO);
            if (lovRow != null)
                result = lovRow.getAttribute(attrName);
        }
        return result;
    }
    

    Then, change getter transitional attribute, in the following way:

    public String getTransAttr() {
        if (getAttributeInternal(TRANS_ATTR) == null) {
            // check to see if databound attribute (where is LOV attached) have value, and if so, get appropriate value from LOV row
            if (getDataBoundAttribute() != null)
                return (String)getLovAttribute("_List_Of_Values_Name", "LOV_attribute_you_want", new Object[]{getDataBoundAttribute()});
        }
        return (String) getAttributeInternal(TRANS_ATTR);
    }
    

    Of course, change over the method to return the appropriate type and ajdust databound attribute accessor Get etc...

  • VI to convert input signals NI 9402 in a RPM value, based on the frequency of the pulses

    Hello

    I'm looking for a VI convert an input signal NI 9402 in a RPM value, based on the frequency of the pulses. Is there such a thing that exists in the library of national instruments?

    I run LAbview 2014 integrated control and monitoring on on a cRIO 9802 high performance integrated system with NEITHER 9402, 4 channels, 50 LV, LV TTL Module input/output digital, ultra high speed digital i/o for the cRIO module.

    Any help would be greatly appreciated.

    The easiest way is to use the FPGA to get the time between the edges of your pulse increase (shift registers to maintain the current situation and the time will be necessary).  This will give you the period.  If it's a single pulse per turn, then the number of laps is just 60/T, where T is the time in seconds.

Maybe you are looking for

  • HP Pavilion dv6-6b56er: module WLAN 5 GHz for HP Pavilion dv6-6b56er

    Greetings! Spoiler (Highlight to read) As I broke the wlan module (Connector for white cable) everything disassemble to clean (dust in the cooler), so I need to replace it. I found Manual for my laptop with wlan support modules. So the question is wh

  • HP 15-d043se Notebook PC: problem in installing driver for nvidia geforce 820 m

    Hi guys I have HP 15-d043se Notebook PC with windows 7 64 bit and I have error to install the graphics driver from nvidia geforce 820 m, I downloaded and installed all the drivers (including intel graphics hd 4000) driver from the official site of hp

  • Why have I not Outlook Express wanting to compress files?

    I can't find Outlook Express in my Add / Remove programs as I believe that I deleted it from my computer because of conflicts with Outlook 2003. Lately, I have a pop up message saying that Outlook Express can compress the files.  How to remove or del

  • Unauthorized telnet access

    Hello If someone could guide in writing script of EEM to allow users to access based on the IP address telnet session... Or send by email whenever someone telnets to the device. Kind regards Faizan.

  • MFP (Hi Speed)

    In my page devices and printers, I have an item labeled "USB 2.0 MFP (high speed), which has a! against which means that something is wrong. I used the built in Trouble shooter, and who is unable to solve the problem I have disconnected all external