Use Daqmx Trigger to initialize software

Hello,
I am using an NI PCIe-6537B to run an SMB-2163 High-Speed DIO Accessory.  I have a high speed camera sending out triggers whenever a frame is captured.  Each time the trigger is received into PFI4, a digital output (DIO#) sends out a waveform. 
I would like to know if it is possible to read that trigger so that I can use it to trigger other things in the software "simultaneously."
I have attempted to simply read PFI4 as a digital input (Digital Bool 1 Line1 Point) while also using it as the external trigger.  It worked for a while but after I left the project it now seems to only randomly read when the trigger is sent.  Not knowing what changed since it last worked, am I doing this correctly or is there a better way to do this?  Perhaps using the Daqmx events.
Any help is greatly appreciated!
Thanks,
Mike S.
CLAD
 

Hey Mike,
A couple of things here.  Firstly, for the Change Detection timing type, you will not need to use the event structure in your program.  This is implemented in hardware, with samples being latched when the configured lines show the change.  Basically, every time the configured line changes, the DAQmx read will return the values of all lines configured for your channel.
Also, you will not be able to use PFI4 as the source for change detection.  You will have to specify a data line (ports 0-3) for use with the change detection timing type.  Here's some documentation I could find about using this:
http://www.ni.com/white-paper/4102/en/
http://digital.ni.com/public.nsf/allkb/4B9452520950566A86256F31006C9AEF
 

Similar Messages

  • Daqmx Trigger Indication

    How can I get an indication to the front panel that an acquisition event has triggered using Daqmx?
    I've set the system to pretrigger on a falling edge, which works fine, however, the end user does not get an indication that the system has triggered until after Daqmx Read.vi has finished reading all the data.......12 seconds later (duration of acquisition event).  I'd like the user to get the indication at the moment the trigger threshold parameters have been met.
    I'm using LabVIEW 7.1, DAQmx 7.2.
    Thanks.

    I agree that a software trigger might be your best answer.  I cannot think of a good way without additional hardware to indicate to the user the occurrence of a hardware reference trigger.  The properties for available samples and total samples acquired will not give you the indication you are looking for with a reference trigger.  These are valid options for a start trigger.  If pretrigger samples are important to your application you can continuously read the samples into LabVIEW and programmatically determine the location you wish to trigger, saving your desired number of pretrigger samples and discarding the rest of the pretrigger data. There is an example already built for this in Help>>Find Examples by the name of "Cont Acq&Graph -Analog SW Trigger.vi".
    Hope this helps,
    Jennifer O.

  • How do I reset an STC Counter using DAQmx?

    When another digital line goes high I want to reset my counter. How do I reset the counter using DAQmx?

    Hello,
    Thank you for contacting National Instruments.
    Please see this link for information on this issue.
    I have attached an example program which shows how to to do this in software.
    Regards,
    Bill B
    Applications Engineer
    National Instruments
    Attachments:
    Count_Digital_Events_with_Reset_Button.vi ‏68 KB

  • PXI 4070 use DAQmx Drivers

    I have replaced a PXI 4060 card with a PXI 4070 card in a PXI 1042 chassis that I use for resistance measurements.  I want to use DAQmx drivers instead of the traditional daq drivers.  How can I do this?
    My controlling software is VB6.  I have had issues with traditional daq on Windows XP machines with new NI installations.  Errors indicate there is an issue with the traditional daq drivers.  The sample applications installed with the niDMM 2.7 installation error with message "Error Loading Driver Module".  I have used the palbase utility in the past to work around this issue, however, the palbase utility is not failing to change the base address.  There is an error message associated with the failure, but I figure I may save myself the headache by switching to DAQmx drivers.

    I would recommend upgrading to the niDMM 3.0.4 drivers found here.  This version is still compatible with Visual Basic 6.0 and Windows XP.  niDMM 2.7 would have installed NI-DAQ 8.5.  The name indicates that it is traditional DAQ, but as far as I can tell, version 8.5 was only DAQmx.  3.0.4 will also install a newer version of DAQmx that is compatible with XP, as well as the examples.  It seems that the version you have should have worked, but there may be some corruption, or there may have been a version of traditional DAQ 8.5 at some time (we had some versions of NI-DAQ that included both traditional DAQ and DAQmx).  I hope this helps!
    Thanks,
    Sean
    Applications Engineering Specialist - Semiconductor Test
    National Instruments

  • Differences in DAQmx Trigger (VI)

    I am trying to figure out why DAQmx Trigger VI works differently with different hardware.
    Case 1; using PXI-6133 and Reference Analog Edge version of VI
    Case 2; using PXIe-6368 and Reference Digital Edge version of VI
    My users have shown me that using an analog signal on an analog channel for a trigger source in both cases works.  Now, using the same trigger source conditions, I want to use a PXI-6133 and Reference Digital Edge version of VI.  This does not work.  Why?
    My goal is to create a subVI that will use the appropriate DAQmx Trigger VI, given the source trigger hardware.  My application will aquire 2 sets of data simultaneously on different hardware.  One set based on a trigger, one set continueuosly.  Does this seem unreasonable? 

    TrigConfig.png - code from main VI that create parameters for Trigger
    Setup Triggers.vi - subVI that configures Trigger
    Kevins_Triggered Fast DAQ.vi - working VI for PXI-6133 and PXI1045
    Attachments:
    TrigConfig.png ‏177 KB
    Setup Triggers.vi ‏39 KB
    Kevins_Triggered Fast DAQ.vi ‏45 KB

  • Populate Series ID in header using block trigger

    Hi Gurus,
    I need your help.
    What is the correct block trigger that i should use in order to populate a series id in a field
    only when the NEW record button in the toolbar.
    Hoping for your reply.
    Thanks

    orville wrote:
    What is the correct block trigger that i should use in order to populate a series id in a field
    only when the NEW record button in the toolbar.
    Since you're using only the button to add a record, you can either include the code in your button trigger and initialize the ID or you can use the WHEN-NEW_RECORD-INSTANCE trigger and test the record status.
    Something like this:
    IF :SYSTEM.RECORD_STATUS IN ('CHANGED', 'NEW') THEN
      :BLOCK.SERIAL_ID := :SYSTEM.TRIGGER_RECORD;
    END IF;This is a simple example, you can further evolve the code to suite your requirements.
    Tony

  • PXIe-4499 DAQmx Trigger

    I'd like to trigger off a rising edge on one of the analog channels, let's say AI0, on a PXIe-4499 card however I can't seem to figure out how to specify the trigger source. I'm using the "DAQmx Trigger.vi" and the documentation says the following:
    "source is the name of a virtual channel or terminal where there is an analog signal to use as the source of the trigger"
    I tried creating a virtual channel with no luck and have looked through the 4499's documentation but haven't been able to find a reference to source names.
    Can anybody offer a suggestion or point me in the direction of an example?

    Hello bww,
    The example you are looking for can be found on this page. The source you specify will be the signal that triggers the acquisition.  This signal can come through the PFIO for your device, the PXIe chassis backplane, or the Analog Input channels. For your purpose (correct me if I am wrong) you want to acquire on AIO and begin the acquisition when the analog signal (AIO) is above a certain level? Then I would recommend configuring the example to look like the item below.
    Regards,
    Izzy O.
    Applications Engineer
    National Instruments
    www.ni.com/support

  • I am trying to use the trial creative cloud software on a PC windows 8.1 - I've downloaded and removed Photoshop CC 2014 two times - every time I open the file it says there is a problem and it shuts down and closes. I can open indesign and maybe other ap

    I am trying to use the trial creative cloud software on a PC windows 8.1 - I've downloaded and removed Photoshop CC 2014 two times - every time I open the file it says there is a problem and it shuts down and closes. I can open indesign and maybe other apps but photoshop no. Any ideas?

    I don't think I can access the crash report? Excuse the ignorant questions I'm about to make am a relative tech novice.
    Soo - as mentioned every time I open photoshop it crashes - it just says there's an error and the program will shut down and if there's a solution windows will notify me. Then nothing...
    I've tried to look in photoshop files for the detailed crash report & the system event viewer but cannot find a file with those names. I've also looked in the windows files for files with those names but cannot find them either - so I don't know where to look.
    Any guidance would be great.

  • How do I use daqmx to get encoder direction/count on E-series board?

    Hardware:
    PCI-6014
    Labview 7.1
    I have a linear actuator and wish to get distance/direction.  The
    motor has a quad encoder with phase A and B only.  I connected the
    lines according the the E-series, PFI-8 and PFI-6, and ground to
    digital ground. I then attempted to design a control with daqmx but
    failed.  I have tried the daqmx examples but none were attempting
    a reverse in direction.  Most examples given for direction change
    are for traditional daq control; i cant make a correlation on what to
    use to substite traditional daq with daqmx vi's. 
    2 questions:
    How do I use daqmx to get encoder direction/count on E-series board?
    Are there low pass filter vi's recommended for each phase connection to stabilize data?
    Thanks,
    Wayne Hilburn

    Hello Wayne,
    Take a look at the Count Digital Events.vi shipping example.  You can find this in LabVIEW by selecting Help >> Find Examples... then browsing to Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events.
    If you set the "Count Direction" control to "Externally Controlled", you will be able to count up and down depending on which direction you rotate your encoder.  Make sure you wire Phase A to Ctr0 Source and Phase B to P0.6.  P0.6 is the up/down line for counter 0.
    I hope this helps.  Please let me know if you have any further questions.
    Regards,
    Sean C.

  • How to make a good UI for channel selection using DAQmx

    A lot of my Labview programming was with earlier verisons of labview (pre Labview 7), and there are a ton of new features that I'm trying to digest (currently using Labview 8.2).
    My question is (in general terms), how are people programming their UI for selecting channels and such when using DAQmx hardware?  What I have in mind is a compacDAQ system with a number of modules.  The user would be able to pick and choose which channels to monitor.  Using MAX as part of that process seems counter intuative, and somewhat static (yeah I know you can change it there, but it feels more like something you would use for something that really doesn't change much).  I'd like all the UI to be within the VI.
    Are programmers using the create task VIs for that or something else?
    Thanks in advance.
    Solved!
    Go to Solution.

    I wholeheartedly second the motion to keep MAX out of the picture as far as users are concerned.
    Setting up UI's for channel selection is a breeze in DAQmx when you create channels on the block diagram. The control you create off the Channels input will populate itself with the inputs that it knows are capable of performing the desired task...
    <<< My configuration knows that my Module 5 is capable of doing Analog Input.
    So... Just create a panel that waits for the user to select the proper channel. I also run a quick check of the user's selection before creating / starting the task. For example, if they choose ai30 or higher, and I know that the system isn't wired for those inputs, I'll not allow that selection. Also check for using two of the same input, etc.
    Richard

  • How to make a virtual channel in MAX using DAQmx ?

    I want to measure the CJC temperature on the TBX 1328 ( attached to SCXI 1121). I want to create a virtual channel in MAX using DAQmx. I have right clicked on DAQmx but there is no option for virtual channel. Ther is the option of 'Traditional virtual channel' which i dont want.
    I used the VI to make the virtual channel but i want to knowhow to doit inMAX.
    thanks

    Here are 2 ways that you can create a DAQmx channel that appears in MAX.
    1) In MAX, right click on "Data Neighborhood" and select "Create New...". Then click "NI-DAQmx Global Channel" (or "NI-DAQmx Task" -- a task contains the channel(s) and triggering/timing information) and click "Next". This launches the DAQ Assistant that will guide you in creating the channel or task.
    2) In LV, place a NI-DAQmx Global Channel control on your panel or constant on your diagram. Right click on the control/constant and select "New Channel(DAQ Assistant)..." (Note: You can do the same from the NI-DAQmx Task control/constant to create a NI-DAQmx Task.)
    Deborah

  • How can I get properties of global virtual channels using DAQmx?

    I'm using DAQmx with VB6. In my app, I would like to be able to present the user with a list of available predefined channels to select from. I can use DAQmxGetSysGlobalChans to get a list of the channels, but I need a way to sort out which of these channels are defined as inputs, and which are outputs. It would also be nice to be able to query other properties of the virtual channel (for example, the device and physical channel being used). These all seem very simple things, but I haven't found anything like this in the documentation so far.
    Thanks.

    Try using  DAQmxGetChanType(TaskHandle taskHandle, const char channel[ ], int32 *data)DAQmxGetChanType(TaskHandle taskHandle, const char channel[ ], int32 *data).  This will return one of the following types:
    DAQmx_Val_AI
    10100
    Analog input channel.
    DAQmx_Val_AO
    10102
    Analog output channel.
    DAQmx_Val_DI
    10151
    Digital input channel.
    DAQmx_Val_DO
    10153
    Digital output channel.
    DAQmx_Val_CI
    10131
    Counter input channel.
    DAQmx_Val_CO
    10132
    Counter output channel.
    Let me know if this works. 
    Regards,
    L. Allen

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

  • Abort inserting a record in a table using a trigger

    Hi there,
    Is there any way to abort inserting a record in a table using a trigger?
    For full details, I have the following table ("myTable"):
    BSC INTEGER NOT NULL,
    BTS VARCHAR2(20) NOT NULL,
    INFO1 INTEGER,
    INFO2 INTEGER
    myTable_PK = PRIMARY KEY (BSC,BTS)
    I have also a stored procedure that imports a data from text file and inserts them to the specified table (using UTL_FILE package). The stored procedure works great.
    But the thing that in the text file itselft it might be (due to third-parity report generation bug) that the primary key will be violated or the BSC/BTS field has null value. In such case I just want to ignore the insertion statement using a trigger.
    Thanks

    Ok Jens, could you tell me what exception could I use?
    Below a protion of my StoredProcedure.
    CREATE OR REPLACE PROCEDURE update_myTable() IS
    FHANDLE UTL_FILE.FILE_TYPE;
    BSC INTEGER;
    BTS VARCHAR2(20);
    INFO1 INTEGER;
    INFO2 INTEGER;
    BEGIN
    FHANDLE := UTL_FILE.FOPEN('LOG_FILE_DIR',FILENAME,'R',4000);
    LOOP
    UTL_FILE.GET_LINE(FHANDLE,STR);
    -- Process the line STR and generates BSC, BTS, INFO1, and INFO2 values
    EXECUTE IMMEDIATE 'INSERT INTO myTable VALUES(:1,:2,:3,:4)' USING BSC,BTS,INFO1,INFO2;
    END LOOP;
    EXCEPTION WHEN NO_DATA_FOUND THEN UTL_FILE.FCLOSE(FHANDLE);
    END UPDATE_R205BTS;
    Remember that I am already using an exception with NO_DATA_FOUND to indicate the end of file then closing it.
    Thanks for your reply

  • Java Applets not working using IE 6 after uninstalling software

    I uninstalled some software on WinXP using Add/Remove, however the software still left remnants on my system. I tried to removing all the entries in the registry with RegEdit....I will confess I am a rookie with that tool, however now IE 6 will not launch Java Applets on the web sites I visit.
    I also have Mozilla Firefox 8 installed and Java Applets work fine using that browser. Do I have to reinstall WinXP to correct IE 6, or is there an easier alternative?
    Thanks for any suggestions
    Gerry

    Please check out in the IE Explorer Tools--> Internet Options --> in this Advanced tab this will display you with the set of options and chceck boxes...
    in that please check out that whether the Java(SUN) --- (USe Java....<applet> Requires reStart...
    is existing or not if existing please check it and restart the system.
    if it is not existing in your broser then you have to install the JRE in the system for your Applet to work..
    That can be downloaded form...
    http://www.java.com/en/download/manual.jsp
    Here go for windows....
    All The Best..

Maybe you are looking for