Pretriggered plus posttriggered Using DAQmx functions

Dear Sirs,
In the propel.vi which is attached, laser is used in the channel Vi0 to start the mechanism of trigging to acquire posttriggered samples from the analog signal in the channel Vi1 successfully. I would like to know what changes I need to do in the block diagram to acquire pretriggered plus posttriggered samples from the analog signal in Vi1?
Thank you for your help.
Oscar Delgado.
Attachments:
propel.vi ‏34 KB

Hello Christian,
Thank you for your reply. According with your suggestion I found in the examples file of my LV the Cont Acq & Graph Voltage – Analog SW Trigger.vi, which I am using successfully to acquire pre triggered plus post triggered samples.
Thank you for your help.
O. Delgado.

Similar Messages

  • Using DAQmx functions without installation

    Good evening everybody,
    I have an instrumentation problem linked to DAQmx. I would like to communicate with an instrument using NIDAQmx tasks. I use an environment program system : visual studio 2003. At the end, I want to produce a dll. This dll, I want to put it on another computer. The question is the following. If I want to launch the dll by calling it, will I need NI-DAQ on the other computer or a software to use the dll ?
    When I tried to produce an exe with a VI, I needed to have Labview RunTime to launch the exe. If I want to launch the dll, will I be able to use the dll alone on the computer, without the installation of NIDAQ. Can I use the tasks only with the dll (since I need Run Time for the .exe, do I need Run Time also). ?
    I am sorry, it must be not clear. But I am available to explain you more the problem.
    Best regards.
    Thank you.
    gautier 
    Solved!
    Go to Solution.

    Since you have LabVIEW installed on your computer, the Run-Time is not required for running LabVIEW executables.
    But if you decide to use your LabVIEW executable on an other computer, you will need to install the LabVIEW Run-Time on it. You can also build an installer which will contain your program and addtionnal components (such as LabVIEW Run-Time and required drivers). Building an installer avoid to download and install the components separately.
    For more information regarding installer, you can look into LabVIEW's help (Building an Installer (Windows)) or follow Core 2 training course.
    If your program uses NI-488.2 driver, you will need to install it on your computer.
    Installing LabVIEW Run-Time is only required if your program which contains DLL calls is a LabVIEW executable.
    Regards,
    Jérémy C.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • Simultaneous tasks using DAQmx functions

    Hi all,
     Is there any example of DAQmx PCI-6251 on Labwindows in which Multithreading is used.
    Basically i want to acquire and generate Analog signals from PCI-6251 by using Multithreading.
    In which one Thread is for Acquiring the analog signals and the other thread is for generating
    the analog signals after performing some calculations on the samples of the Acquired Signals.
    So it means i dont want to Acquire and Generate analog signals Simultaneously but there must be a
    "Little Delay" between the two Threads.
    Any help on this topic will be Greatly appreciated.
    Regards    

    Actually, this is entirely possible.  The primary difficulty is sharing data between your two threads.  The easiest way to accomplish this in LabWindows/CVI is with a thread safe queue.
    I admittedly don't write much DAQ code, so it likely won't meet your specific needs, but I've attached a simple example of doing what you've asked about.  I create two threads, one for reading and one for writing.  Each thread creates a task, and then loops while reading or writing until told to stop.  They share data through a thread safe queue.
    Let me know if you have any questions regarding the sample -
    NickB
    National Instruments
    Attachments:
    DAQMTProcessing.zip ‏7 KB

  • Qns on DAQmx function

    i am currently using ATMI force and trying to use VB6 to get the reading for the six analog channel in realtime..
    I keep seeing ppl use daqmx function.. but i dont have that in my library... i have install NI -DAQ 7 and measurement studio.. 

    Do any one have program that run muti analog channel by not using daqmx.. using traditional code

  • Error in using aggregate function in Outer Query in Siebel Analytics

    Hi,
    When I am using aggregate function in outer query in Siebel Analytics I am facing error.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 59111] The SQL statement must include a GROUP BY clause. (HY000)
    Bellow is the code.
    SELECT test1.username saw_0, test1.desg saw_1,COUNT (test2.querydate) saw_2
    FROM (SELECT POSITION.CBL username,
    POSITION.CBP desg
    FROM "CM"
    WHERE (POSITION.BPTCD = 'Marketing')
    AND (POSITION.EDate =TIMESTAMP '1899-01-01 00:00:00'
    ) test1,
    (SELECT users.UN username,
    measures."Query Count" querycount,
    measures."Max Total Time" secs,
    topic.db dashboardname,
    "Query Time".DATE querydate
    FROM "Plan"
    WHERE (topic."Dashboard Name" IN ('DS'))) test2
    WHERE test2.username = LOWER (test1.username)
    AND test2.dashboardname = 'DS'
    GROUP BY test1.username, test1.desg

    Should your query be a valid SQL query?
    I can't think that the query you have would be valid in a SQL plus window.
    Chris

  • Use sql function decode with Zend code

    Hi,
    I need to use sql function DECODE() in a query for PHP Code. This query works well in sql*plus but PHP returns
    the following error message:
    Parse error: syntax error, unexpected T_STRING in C:\Program Files\Zend\Apache2\htdocs\Compta\compta2.php on line 16
    the query is :
    $query =
    'select substr(c.NUM,1 ,2) Compte ,
    c.designation , a.Periode
    ,decode(substr(c.NUM,1 ,1), '1',1, '2',1,'3',1,-1) cp_type ,
    sum(credit) - sum(debit) Montant
    from ecritures a, clients b, compte c
    where
    b.NUM (+) =a.NUM
    and a.DATEECRITURE between to_date(:debut, \'dd/mm/yy\') and to_date(:fin, \'dd/mm/yy\')
    and substr(a.num,1,2) =c.num
    group by substr(c.NUM,1 ,1), substr(c.NUM,1,2) , c.designation ,a.periode
    order by compte ';
    Can any one help me ???
    Thanks by advance
    nb: Iuse Zend 2.0

    Hi,
    You need to escape single quote mark:
    decode(substr(c.NUM,1 ,1), \'1\',1, \'2\',1,\'3\',1,-1) cp_type ,
    the same way you did for to_date:
    to_date(:debut, \'dd/mm/yy\')
    Regards,
    Paweł

  • Multiple inputs and outputs using DAQmx VIs

    Hello,
    I am fairly new with the LabView programming language.  I have a few training books that I have been reading, and I have been following online tutorials and reading the forums.  However, I have come to a problem where I don’t see a clear solution.  I am using LabView 2009 (9.0f3) and DAQmx VIs.
    I am using a NI 9172 chassis PLC, with two 9201 AI cards, 9217 AI RTD card, 9472 DO card, 9263 AO card, and two 9237 AI Bridge cards.
    I am reading eight analog inputs with the 9201 cards, two analog RTD inputs with the 9217 card, three digital outputs with the 9472 card, three analog outputs with the 9263, and eight analog inputs with the 9237 cards.
    I wrote a simple program to test one digital output task, two of the analog output tasks, and a single analog input task.  I put all of them in the same while loop, and it worked perfectly.  However, when I add analog input tasks to the same loop, I get an error 200022.    So I tested each sensor individually by changing the channel before each run.  I searched error 200022 and found that this is because I cannot start another analog input task until the previous one ends.  With this said, I don’t know how to acquire an analog voltage in the same task as an analog RTD voltage.  Both inputs take different constants in the start task DAQmx icon.
    Attached is my test program.  It is titled “Test All”. This is the program I used to test the various sensors.  I tested the input sensors one at a time, and it worked fine.  A few tasks are written just to test functionality, and will be added to later.  The data is only displayed on the screen.  I will add triggers and data write to disk functions later.  This program works now, but if I add more analog inputs, it will generate the 200022 error.
    Can someone show me how to correctly write the code for multiple inputs and outputs using DAQmx?  All training materials and tutorials I can find all show a single input or single output, not multiples of each.  Thanks for looking.
    -Randy
    Attachments:
    TestAll-NI.vi ‏32 KB

    Hi RandyC,
    The Knowledge Base article Using Different Types of DAQmx Global Channels in the Same Task goes into a little more depth of what Bryan is talking about, and it also includes some example code to help show what to do.
    Hope that helps,

  • How do I configure a counter to generate pulses using DAQmx?

    How do I configure a counter to generate pulses using DAQmx?
    Is says in the DAQmx C reference help
    "CtrnInternalOutput—The signal at this internal terminal is where the pulsed or toggled output of the counter appears. The output of a counter pulses or toggles when the counter reaches terminal count. When counting down, the counter reaches terminal count when the count reaches zero. When counting up, the counter reaches terminal count when the counter rolls over. To configure the counter to toggle or generate pulses, use the Export Signal function/VI with Counter Output Event as the signal name."
    I've tried this but can't get it to work, I may have the parameters wrong or something. The DAQmxExportSignal() function is very unintuitive to me. Here is my counter config code...
    int ret = 0;
    ret = DAQmxCreateTask("",&task_);
    errorMsg(ret);
    if (ret != 0)
    throw ret;
    // Configure the counter
    ret = DAQmxCreateCOPulseChanTicks( task_, "Dev1/ctr0", "", "/Dev1/PFI8", DAQmx_Val_Low, 0, divider, divider );
    errorMsg(ret);
    ret = DAQmxCfgImplicitTiming( task_, DAQmx_Val_ContSamps, 1000 );
    errorMsg(ret);
    // Change to pulse mode
    ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    errorMsg(ret);
    // Start the counter
    ret = DAQmxStartTask(task_);
    errorMsg(ret);
    The above code works fine, in toggle mode, if I just comment out the DAQmxExportSignal() part.
    HELP!!!
    Stefan

    The problem is due to the DAQmxExportSignal call.  By default, when you create a counter output pulse train task, the driver will automatically set the output of the counter to toggle when the count for each high ticks and low ticks expire.  The driver also automatically routes the signal present at Ctr0InternalOutput terminal (the output of the counter internal to the device) to the Ctr0Out terminal (the I/O pin available externally).  Using the line
     ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    will tell the driver to tristate the Ctr0Out terminal and not output the signal to the external I/O pin.  Using the DAQmxExportSignal function is generally only useful if you want to route the signal to some other terminal internal to the board without having the output show up on the external connector, route the signal to some other external pin other than the default pin, or if you want to have the output show up at multiple locations. 
    If you want to change the output behavior from toggle to pulse, you need to use the DAQmxSetExportedCtrOutEventOutputBehavior function.  However, this is generally only useful if all you care about are edges (not the duty cycle of the pulse train), and you want to generate higher frequency signals.  For example, with a 20 MHz timebase as the source of your counter, you can only generate a 5 MHz pulse train by default.  This is because the minimum value for the low and high ticks parameter is 2 (20 MHz / 4 = 5 MHz).  By changing the output behavior form toggle to pulse, you can generate a pulse train at 10 MHz since the output is now pulsing instead of toggling.  However, the width of each pulse is not programmable so you will no longer have a 50% duty cycle signal.  I don't remember exactly what the width of each pulse is, but I believe it's in the neighborhood of 50 - 100 nanoseconds in width.  I hope this information helps.

  • Does the voltage to temperature conversation require in usb 6008 using daqmx 8.5??

    Another question need u all guy help.I currently using K-type thermocoupler for my project using usb 6008.Does the voltage to temperature conversation require in usb 6008 using daqmx 8.5? what is DAQ TEDS function use ? is it help us to convert?

    You will need to factor the voltage per degrees C to get to reading in degrees, this is 10mv per degree V for the device mentioned in the post you previously made
    http://forums.ni.com/ni/board/message?board.id=170&message.id=246200#M246200
    TEDS - Transducer Electronic Data Sheet
    A video about TEDS
    http://digital.ni.com/demo.nsf/websearch/8e55de8fe6b5702686256e7c007a47b4?opendocument

  • How do I turn off the requirement to press control when using a function key

    When using my wireless keyboard, it requires me to press controls to use the function keys (F3, F5, F70.) However, this makes it so some of my games controls won' work,(For example, in Minecraft I can't access the debug menu.) Is there any way to disable this.Thank you for your support

    Please take these steps if you're prompted for a password when moving items in your home folder to the Trash.
    1. Triple-click anywhere in the line below on this page to select it:
    ~/.Trash
    2. Right-click or control-click the highlighted line and select
    Services ▹ Show Info in Finder (or just Show Info)
    from the contextual menu.* An Info dialog should open.
    3. The dialog should show "You can read and write" in the Sharing & Permissions section. If that's not what it shows, click the padlock icon in the lower right corner of the window and enter your password when prompted. Use the plus- and minus-sign buttons to give yourself Read & Write access and "everyone" No Access. Delete any other entries in the access list.
    4. In the General section, uncheck the box marked Locked if it's checked.
    5. From the action menu (gear icon) at the bottom of the dialog, select Apply to enclosed items and confirm.
    6. Close the Info window and test.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. Open a TextEdit window and paste into it (command-V). Select the line you just pasted and continue as above.

  • I want to open a txt file and output data through an AO-using DAQmx for PXI

    I have a PXI running a 8145RT CPU. I have a PX6040E Multifunction DAQ card installed in the PXI. I want to program an application where I open a txt file (existing in one of the the RT machines' folders), read the first row, and output its data through an AO channel. The drivers I should use is DAQmx v7.1, and the Labview RT v.7
    Any idea?

    What exactly are you having problems with? Reading a text file can be done a number of ways. Look at the File I/O palette and check out Read Lines From File or Read Characters From File. There are string to number conversion functions on the string palette (i.e. Scan From String). There are also numberous shipping examples on using DAQmx for analog out. If you have a specific problem or question, please post back with additional details.

  • How to use a Time - Voltage Array to Control a Analog Voltage Output using DAQmx Write VI

    I have an array of Time values associate with Voltage values that I want to use to control a Anolog Votage Out Device (PXI-6251) using DAQmx.  The array contains 1,000 elements.  The time values are NOT evenly spaced, the rate changes through the array.  The array is output once, timed to other processes.
    My problem is I haven't been able to locate a reference on how to handle the timing variability in the array.  If time was equally spaced I could use a loop....
    The attached showes the array, first row is time (ms) and the second row is voltage (volts).
    Can someone point me in the right direction?
    David
    Attachments:
    TimeVoltage.png ‏11 KB

    David,
    if you have only Base version of LabVIEW, this will be a time consuming task.
    If you have either Full or Professional, you will find interpolation-functions in the mathematic palette.
    I am not sure which ones serves you best,  but i'd startexperimenting with Interpolate 2D.
    hope this helps,
    Norbert 
    [Edit]: You could also use a polynominal fit on your voltage values. You will get a function describing the voltage over time. But you will have to modify this function to take care of the variation of time spacing. If you have a function describing your voltage over your (nonconstant) timestamps, you can simply create values for constant timeslices for your voltage.
    Message Edited by Norbert B on 11-06-2008 10:21 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Any LabWindows/CVI examples for SPI communication using DAQmx?

    I have a PXIe-6363 module in a PXI running as a real time target, and I'm trying to talk to an accelerometer that communicates with SPI.  I know the 6363 isn't one of the special modules built for SPI, but my understanding is it should be capable; the issue is just the programming.  I've seen examples of this for LabVIEW using DAQmx.  Are there any examples out there for doing it in LabWindows/CVI?
    I'm looking to save time and avoid reinventing the wheel here.  SPI is easy on an Arduino, so it should be doable in LabWindows/CVI, right?  
    Thanks,
    Matt

    Hey Matt,
    I was unable to find any full examples of SPI communication with DAQmx in C. My best suggestion would be to use the LabVIEW examples and implement the same series of function calls to implement the LabVIEW code in C. The DAQmx C API is good about keeping a standard with naming conventions to map with the function names in LabVIEW.

  • Questions about Alternate Syntax using DAQmx

    Hello all,
    my group has started using an alternative syntax for DAQmx Functions. Here's part of our original code:
    nitWFM->AOChannels.CreateVoltageChannel("Dev1/ao0", _T(""), dMinimum, dMaximum, DAQmxAOVoltageUnitsVolts);
    nitWFM->AOChannels.CreateVoltageChannel("Dev1/ao1", _T(""), dMinimum, dMaximum, DAQmxAOVoltageUnitsVolts);
    nitWFM->AOChannels.CreateVoltageChannel("Dev1/ao2", _T(""), dMinimum, dMaximum, DAQmxAOVoltageUnitsVolts);
    nitWFM->AOChannels.CreateVoltageChannel("Dev1/ao3", _T(""), dMinimum, dMaximum, DAQmxAOVoltageUnitsVolts);
    which became:
    DAQmxCreateAIVoltageChan(nitWFM,"Dev1/ao0","",DAQmx_Val_Cfg_Default,dMinimum, dMaximum,DAQmx_Val_Volts,NULL));
    DAQmxCreateAIVoltageChan(nitWFM,"Dev1/ao1","",DAQmx_Val_Cfg_Default,dMinimum, dMaximum,DAQmx_Val_Volts,NULL));
    DAQmxCreateAIVoltageChan(nitWFM,"Dev1/ao2","",DAQmx_Val_Cfg_Default,dMinimum, dMaximum,DAQmx_Val_Volts,NULL));
    DAQmxCreateAIVoltageChan(nitWFM,"Dev1/ao3","",DAQmx_Val_Cfg_Default,dMinimum, dMaximum,DAQmx_Val_Volts,NULL));
    we changed it to accommodate for a function that seemed to only work for us in one syntax (DAQmxSetWriteAttribute (nitWFM, DAQmx_Write_RegenMode, DAQmx_Val_DoNotAllowRegen))
    My question is, what is the alternative syntax for the following lines?:
    nitWFM->Control(DAQmxTaskVerify);
    CNiDAQmxAnalogMultiChannelWriter writer(nitWFM->Stream);
    because keeping them this way resulted in an error.
    Your responses are much appreciated.
    Solved!
    Go to Solution.

    Hello,
    The first function can be found in the C Reference Help by going to Start»All Programs»National Instruments»NI-DAQ»Text Based Code Support»NI-DAQmx C Reference Help and expanding the NI-DAQmx C Functions»Task Configuration/Control»Advanced»DAQmxTaskControl. This explains this function and the syntax to use. 
    Regards,
    Justin
    Justin
    National Instruments
    Product Support Engineer - Conditioned Measurements

  • How to use replace function to replace word

    I am trying to write a replace function in which I replace CA with California in an address string.
    I am trying to avoid using regular expression and just use other functions like replace, instr, trim etc.
    But what my main confusion is how do i take care of three cases in which.
    CA can be present with spaces before and after it like.
    - Redwood City, CA 96403
    CA can be present with spaces only before it and after it the string ends.
    - Redwood City, CA
    and I do not want to replace any other CA in the string that is part of other word
    - Blaca Street CA
    ( for example do not replace ca in Blaca)
    or
    - Cardinal Dr CA
    Thanks

    Hi,
    user6287828 wrote:
    ... (only four of these abbreviations need to be replaced)In that case, nesting the functions one inside another won't be too bad. But watch out: this is exactly the kind of requirement that changes over time. You might only need 4 states now, nut next year they might expand the application so that you need all 50 states (plus Puerto Rico, and DC, and ....). In that case, something like MODEL, or a user-defined PL/SQL function, would be better.
    As these are abbreviations these will always be stand alone words and never part of words. And these abbreviation can be at the beginning or end or in between the string.
    And any abbreviation can be present in one column.
    More than one abbreviation can be present in one column
    None of the abbreviations can be present in this column.
    For example
    column
    3251 BLACA ROAD CA 94305
    74 CALDWIN STREET CA
    67 DIGITAL DRIVE NM
    NM UNIVERSITY AVENUE 890
    7645 ROCHESTER NY PARK STREET
    834 GRAND AVENUE ATLANTAPost CREATE TABLE and INSERT statements for the sample data.
    Include all special cases, e.g. more that one abbreviation in the same column.

Maybe you are looking for

  • Set up reverse DNS for virtual mail hosting

    I need a bit of server configuation advice. I have a static IP and two public domains on a Snow Leopard server connected using NAT behind a firewall - with the necessary port forwarding to ensure all works.  1. abc.com is my primary domain on the ser

  • Query on Virtual Provider with Services

    Hello everyone, I created a VirtualProvider and used the HowTo "Implement a VirtualProvider with Services" (Scenario 3: Any Table). Everything works fine and I can see some data with listcube. But when I'm executing a query (Bex) on the VirtualProvid

  • COMPARE MIRO LINE ITEMS WITH PO LINE ITEMS

    Is there any standard report available to find out MIRO line itemwise values with the respective PO line items? We would like to have control on any price increase after PO has been raised? Regards, Sudha

  • How to do selectable filtering of output from table-function

    Hi - I have been looking carefully but can't see the answer to my question in the forums so I have had to resort to asking!  Apologies if this is covered elsewhere - my newbie state indicates I am fumbling in the dark here! I have a report which come

  • Windows 8.1 email App (Metro)

    Is it possible to change the Metro email app from the default live.com account you get to an Office 365 account? I have an O365 account with my own domain which is <user>@domain.com. When I setup Win 8.1 I sign in with my O365 account - <user>@domain