Sync output timing to hardware trigger (PFI?)

I'd like to sync the output of my cards (2 PCI-6733 connected with an RTSI cable, and using  BNC-2110's) to the AC power line of the lab I work in. That is, when told to output, they will always wait and output at the same point in the 60Hz cycle.  
To that end, I've built a circuit that gives a TTL signal that is synced to the building's AC line. I now need to find a way to take this TTL signal and use it as the starter for my experimental sequence. If there is a delay that's ok, however it needs to be a consistant delay (to within a few microseconds preferably). This is so that everytime I run my experimental sequence, I'm starting at the same point in the AC power cycle.
Is it correct to use the PFI port to try and do this? Other suggestions?
The sequence would be:
Step 1: Cards are ready to write
Step 2: Cards write once, started by hardware trigger of the TTL from the circuit I built.
Step 3: Other Labview code runs, and then returns to step 1.
Solved!
Go to Solution.

Ok. Knowing about DAQmx export signal is definitely helpful. I don't think I've got everything set up quite right though, as it's giving me an error with what I tried. 
Error -89136 occurred at DAQmx Start Task.vi:1
Possible reason(s):
Specified route cannot be satisfied, because the hardware does not support it.
Property: StartTrig.OutputTerm
Destination Device: Dev1
Destination Terminal: PFI0
Task Name: _unnamedTask<1E>
I'm not sure on the correct order of the DAQmx functions. I currently have: Create Channel -> Timing -> Write -> Export Signal (?) -> Start Task. This doesn't seem to be the correct way to do this though. The sample you linked to had the Write after the Start Task... which doesn't quite make sense to me... In addition, I'm not sure where to put the DAQmx Trigger.vi in this sequence.
Any pointers to set me in the right direction? I've attached a screenshot and vi of my current code to show you what I do now. 
Attachments:
Write2PCI6733 (SubVI).vi ‏54 KB
WriteToPCIscheme_Mar9_2012.PNG ‏59 KB

Similar Messages

  • IMAQdx with JAI and a hardware trigger

    Hello,
    We are working with two 'JAI AD-080' cameras and IMAQdx, and have two problems regarding the triggering and frame grabbing:
    1)  We are unable to change the trigger source through IMAQdx property node or the Vision Acquisition Express; Vision Acquisition block.
    2)  When we manually edit the trigger source property using the NI Measurement and Automation Explorer (MAX) to its correct value, we can't get all four of the CCD's to run at a time without resulting in bad packets, e.g. horizontal black lines across the images.
    Our goal is to obtain the images from the 4 CCD's at a rate of 5 Hz using our hardware trigger.  We can already connect and obtain all four images at full speed, but the 5 Hz trigger is not being used by the cameras in that case.
    Details of the setup:
    NI 2011, Windows 7 
    Two (2) JAI AD-080 cameras (with 2 CCD's each), GigE cameras connected over Ethernet
    Hardware triggering at 5 Hz, on pin:  'Line 7 - TTL In 1'
    Details of the problem:
    (1)  Setting the trigger source not possible in Vision Express or IMAQdx property node
    In order to use our hardware trigger, we have to set the camera property 'CameraAttributes::AcquisitionControl::TriggerSour​ce' to a specific pin (Line 7 - TTL In 1).  This property is available in MAX, but is not usable in the Vision Express Block.  The property is present, but the values are invalid.  Here is what I think is happening:  the list of properties are read from the camera, but LabVIEW does not know what the valid values are for that property and it populates the value drop-down menu with whatever was loaded last.  This can be seen in figures 1 and 2 where the values in the drop down menu change.
    Similarly, this property of 'Trigger Source' cannot be changed programmatically using the IMAQdx property node shown here: http://digital.ni.com/public.nsf/allkb/E50864BB41B​54D1E8625730100535E88
    I have tried all numeric values from 0 to 255, and most give me a value out of range error, but the ones that do work result in no change to the camera.
    (2)  Lost packets in image during triggering
    If I set the 'Trigger Source' property in MAX to the correct pin, save the configuration, and then use the Vision Acquisition Express block to connect to the camera, the triggering works properly (the hardware trigger is used and the images are received by LabVIEW at 5 Hz).  However, this only works for one CCD:  If i use the same code for all four CCD's at the same time, I get black bars on the images, and at least one of the CCD's result in an error in 'IMAQdx Get Image.vi'  (code -1074360308, -1074360316)
    I tested this by using the configuration attributes created by the Vision Express Block, (The string used in the 'IMAQdx Read Attributes From String.vi'),  in the code we have been developing as well as a very simplified version which I have attached.  Those configuration attributes are saved in the text files:  JAI_Config_TrigON.txt and JAI_Config_TrigOFF.txt for using triggering or not respectively.  
    So my final questions are:
    Is there a problem with the IMAQdx because it doesn't recognize the trigger source value?
    Do you have any suggestions for why there are bad packets and trouble connecting to the cameras when I load them with the trigger on attributes?
    Thank you for your time - 
    Attachments:
    Fig1_VisionAcq.png ‏387 KB
    Fig2_VisionAcq.png ‏442 KB
    Fig3_BadPackets.png ‏501 KB

    Hello,
    Thank you for your response; especially the speed in which you responded and the level of detail.  
    I have not solved the problem fully in LabVIEW yet, but I was able remove the black lines and apparitions from the images using different camera parameters.  
    Since this was a significant victory I wanted to update:
    1)  Version of IMAQdx?
    I have IMAQdx 4.0, but the problem persists.
    2)  Setting configuration files
    Your suggestion to pay attention to the order in which the properties are set as well as using the MAX settings is very helpful.  I have not explored this feature fully, but I was able to successfully use MAX to set the default settings and then open the cameras programmatically without loading a new configuration file.  
    3)  Bandwidth limitations
    I modified the CCD's to only use 250 Mbits/second, but the lost packets (or missing lines/ apparitions) were still present.  
    4)  JAI AD-080GE Specifics
    I am using the JAI AD-080GE; and there are two settings for this camera that I want to mention:  
    JAI Acquisition Control>> Exposure Mode (JAI)>>Edge pre-select
    JAI Acquisition Control>> Exposure Mode (JAI)>>Delayed readout EPS trigger
    The "Edge pre-select" mode uses an external trigger to initiate the capture, and then the video signal is read out when the image is done being exposed.
    The "Delayed readout EPS trigger" can delay the transmission of a captured image in relation to the frame start.  It is recommended by JAI to prevent network congestion if there are several cameras triggered simultaneously on the same GigE interface.  The frame starts when the 'trigger 0' is pulsed, then stored on the camera, then is transmitted on 'trigger 1'.  
    The default selection is the "Delayed readout EPS trigger", however, I do not know how to set the 'trigger 1' properly yet and I only have one connection available on my embedded board that is handling the triggering right now (I don't know if 'trigger 1' needs to be on a separate line or not).  Incidentally, the system does not work on this setting and gives me the black lines (aka lost packets/ apparitions).
    I was able remove the black lines and apparitions using the "Edge pre-select" option on all 4 images with a 5 Hz simultaneous trigger.  I confirmed this using the "JAI Control Tool" that ships with the cameras.  I am unable to make this happen in MAX though, as the trigger mode is automatically switched to 'off' if I use the mode:  JAI Acquisition Control>> Exposure Mode (JAI)>>Edge pre-select
    i.e. when manually switching the trigger mode to 'on' in MAX, "JAI Acquisition Control>> Exposure Mode (JAI)>>Delayed readout EPS trigger" option is forced by MAX.  The vise-versa is also forced so that if EPS mode is chosen, "Trigger Mode Off" is forced.
    Additionally, there is a setting called:
    Image Format Control>>Sync Mode>>Sync     &     Image Format Control>>Sync Mode>>Async
    When the "Sync" option is chosen the NIR CCD uses the trigger of the VIS CCD.  In addition to using the "Edge pre-select" option, the "Sync" option improves the triggering results significantly.  
    5)  Future troubleshooting
    Since I cannot set the camera parameters manually in MAX (due to MAX forcing different combinations of parameters in 4), I am going to explore manually editing the configuration file and loading those parameters at startup.  This can be tricky since a bad combination will stall the camera, but I can verify the settings in JAI Control Tool first.  There is also an SDK that is shipped with the cameras, so I may be able to use those commands.  I haven't learned C/C++ yet, but I have teammates who have.

  • Triggering GigE Camera with Hardware Trigger

    Hello,
    Here is an outline of what I want to accomplish:
    -LabView program starts running and waits for GigE camera to output frames
    -Hardware trigger leads to GigE camera outputting frames
    -Some simple arithmetic is done on each frame to generate the average pixel value--> this average value is plotted for each frame
    -Repeat the above three steps
    Please see the attached VI. I have successfully set my camera's settings in MAX to make it wait for an external hardware trigger. However, the output of IMAQdx Grab2.vi inside the While Loop is only a single frame (even though in MAX I have set the Acquisition Mode to MultiFrame - 255 Frames).
    Any help would be appreciated!
    Thank You.
    Solved!
    Go to Solution.
    Attachments:
    ImageGrab.vi ‏57 KB

    The "problem" that you are having is the frame rate of video acquisition, which you think is about 20 Hz.  Take the very simple VI I posted and run it with your camera -- all it does is continuously take frames (and display them) -- does this have an acceptable rate?  I suspect it will.
    If so, then "start with what works and add to it", rather than trying to "fix what is broken".  First, let's consider how to (better) control the Start and Stop of frame acquisition.  I like your idea of using the 6009, but I recommend (if you are using a 3V signal as the trigger) that you wire the trigger to one of the Digital I/O ports (as 0 and 3V are acceptable TTL levels for False and True).
    Your Video loop will be "clocked" by the Camera at its frame rate, so you might consider using the same loop to clock the DIO.  Take a Digital sample of the line to which you've wired your TTL signal, and as long as it is True, run the loop.  [You'll need to think about how to get the loop started ...].  It should, I think, be possible to read from your USB 6009 within a 60th of a second -- if it is too slow, there are other ways of handling this with a separate parallel loop, but let's not go there until we see it is a problem.
    So now, in principle, you've gone from a simple loop showing frames at 60 Hz to a loop controlled by a TTL signal showing frames at 60 Hz.  All we need now is to process those frames.
    Here is where you want to use a Consumer/Producer pattern -- you don't want to do processing inside this loop (because the loop cannot run faster than all of its parts, taken together, and if you are processing incoming data, you have to get the data, then do the processing).  Instead, you have have two loops running in parallel -- the Producer loop acquiring the videos, and then "exporting" them to a Consumer loop that processes them.
    Are you familiar with this pattern?  There are numerous examples around (look in File/New/From Template/Framework/Design Patterns, and at some of the Sample Projects).  It uses a Queue, with data put onto the Queue by the Producer and removed by the Consumer.  You might need to increase the number of buffers for your camera, but you should be able to do quite a bit of processing in 1/60 of a second.
    Bob Schor

  • Purchase Order Output Timing Error

    Upon creation/change of a purchase order, the system defaults an output timing of '2' instead of '4'. I checked NACE for the affected output type and found it to be listed as '4'. Where else can I check to see why the system is proposing a defualt of '2'?
    Thanks - points will be rewarded.

    in MN05 enter Output Type then check all Key Combinations. In one them you must have had it selected as 2.
    Please check all Key combinations
    Regards
    Adeel

  • Is there any plan to for usb 9234 to support hardware trigger?

    We expect to provide our low cost modal testing solution based on NI usb-9234 and ModalVIEW software. Hardware trigger is needed when using usb 9234 to perform impact testing.
    Message Edited by Troglodyte on 07-11-2008 10:44 PM

    Thank you for your post. 
    In order to keep the power of the board to a minimum, and to keep our prices very competitive, our customers use software triggering for applications such as impact hammer test.  We are happy to coach your development team in the implementation of software analog triggering in LabVIEW, Our Sound and Vibration Assistant, or with our "C" Api.  I have asked our Product Support Engineer to post a note regarding the "C" api function calls.  Stay tuned. 
    Also, please feel free to contact us directly as the need arises. 
    Sincerely,
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • Nscans pretrigger and post trfigger upon analog hardware trigger

    How can i sample N samples from multipli AI upon analog hardware trigger ? I need some pretrigger and some posttrigger samples. I'm using the pci6071e A/D.

    There are examples that do exactly what you are explaining that get installed with the NI-DAQ driver. Depending on the API (LabVIEW, C, etc.) you are using and the version of the driver (NI-DAQmx, Traditional NI-DAQ), the examples will be called different things and found in different places.
    Basically, you want to find an example that does Analog Input With Reference Triggering. If you are using LabVIEW, then launch the Example Finder and look for an example called Acq&Graph Voltage-Int Clk-Dig Ref.vi (if you're using DAQmx) or Acquire N Scans Digital Trig.vi (if you're using Traditional NI-DAQ).
    Jared A

  • Single image by one hardware trigger

    I am using Basler Camera Gige vision sca640-70gc with real time EVS and vision builder i use MAX for putting camera settings. when i put settings of camera as mentioned in the manual to get single image per hardware trigger it gives me time out error.
    hardware trigger comes every 3.5 second what camera acquisition control settings i have to use to get the desired result?and what is more setting i have to put in my consideration.

    Hi frank
    I think you are facing a bit troubles please ensure these things
    1.Put your camera in hardware trigger mode.
    2.Set your timeout period too long.
    3.In acquisition mode select the continuous immediate mode (You will get only one image when the camera triggers).
    4.If you getting more images its because of your camera triggers.
    I think this will help you...
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney

  • Syncing keeps timing out any ideas?

    Just installed iTunes onto a laptop and the syncing keeps timing out. Any ideas?

    This issue occurred in my iMac as well.  I did the following:
    1.  Backed up my data using Time Machine.
    2.  Opened the Mail application on my iMac and entered Preferences.
    3.  I removed the iCloud email account from Mail and closed the Mail application.
    4.  I re-opened the Mail application and added the iCloud email.
    The process above seemed to work for me.
    Good luck.

  • How can i use an ao card (pci 6723) to output data and to trigger an ai o acquire the data coming from the ao card?card (pci 6254) t

    Hello
    I am trying to perform AO (pci 6723) and to trigger my AO card (pci
    6254) to read the data coming from the AO card. I am using LV7,1,
    win2000.
    Is an RTSI cable necessary or I can connect the trigger signals externally ?
    I am using the LV example " multi function - synch ai-ao.vi" but i can't for some reason configure the trigger lines.
    thank you in advance for your time.
    Yiannis

    Hello Yiannis,
    If I understand you correctly, you want to synchronize your analog input and analog output that are started by a trigger on the analog input board. If you don't want to use the RTSI lines, your best bet is to export the AI Sample Clock and then read it in to the AO board. There is an example on ni.com called DAQmx - Synchronized AIAO Shared Clock. It appears to be having techincal issues so I have attached the example below. To export ai/sampleclock, use DAQmx Export Signal.vi after Get Terminal Name with Device Prefix.vi. Export Sample Clock to PFI3 (There are only connections between the sample clock and PCI3/4/8/9). Connect PFI3 on your AI board to PFI0 on your AO board (with a wire). Then change the source for the AO Timing.vi to Devx/PFI0. If you want to do triggering, stick the DAQmx Trigger.vi between the Timing property node and the DAQmx Start.vi on the AI task. I have shown how to do this in the modified version below. Please take a look at it and let me know if you have any questions. If you still get an error please take a screenshot of it and post to the forum. Have a great day!
    Sincerely,
    Marni S.
    Attachments:
    Synchronized_AIAO_Shared_Clock[Modified].vi ‏140 KB

  • Email Output type : No Automatic trigger of output type while saving doc.

    Hi Gurus - To trigger an email from the output type, I've configured a output type with medium as 5(external send) with communication strategy and created condition records with medium as 5 to trigger immediately.
    While creating corresponding document, the output is not automatically determined, it required to manually feed the output type every time. Can you please provide if any settings were missed to trigger immediately!!
    In Output analysis showing a message as "No print data determined for the communication strategy"
    Steps:
    1. Configured the output type with Medium as"5" and associated partner functions.
    2. Created the condition records with medium as 5 and trigger immediately.
    Thanks,
    Sree

    Hi ,
    while maintaining condition record for output type when you click on communication method, give logical destination as 'LP01'.Hope this will solve.PLease let me know if you have any issues on this.
    Thanks and regrads,
    Rajeshwar

  • EBS: Email XML publisher output, from After Report Trigger in Data Template

    Here is what I'm trying to do:
    -- In EBS (11.5.10 CU2), I'm using XML publisher (5.6.2) data template and layout template to generate Output files (PDF, EXCEL etc)
    --In the Data Template's AfterReport Trigger, I'm using the Concurrent Request Id to locate the Output file name and trying to Email that output file.
    Problem:
    -- When the AfterReport trigger code is executed, the code is NOT seeing the output file and hence the file is NOT emailed.
    Observations/Questions:
    -- From what I observe, the Output Post Processor ( that generates the Excel / PDF files) is running AFTER the code in AfterReport trigger... and hence the AfterReport trigger is Not quite seeing / able to access the output file.
    So, the sequence of execution seems to be:
    -- Before Report Trigger
    -- Data Query (SQL statement)
    -- After Report Trigger
    -- Output Post Processor
    Because the AfterReport Trigger is running before the Output Post Processor, it is Not able to see the output file. Is that a True statement?
    If Yes, how else can the DataTemplate access the Output file?
    If No, what could cause the AfterReport trigger to not see the output file?

    Because the AfterReport Trigger is running before the Output Post Processor, it is Not able to see the output file. Is that a True statement?
    I believe so, as the OPP works on the output of the Report after the Report has completed execution.
    You could use the same approach as we do for bursting the report to different users. Write a Java Concurrent program based on "oracle.apps.xdo.oa.cp. XMLPReportBurst" with delivery channel Email to send the email output. You would need to add code to launch the Concurrent child request in your AfterReport Trigger:
    function AfterReport return boolean is
    jreq_id number;
    begin
    srw.message (100, 'DEBUG: AfterReport_Trigger +');
    jreq_id:= FND_REQUEST.SUBMIT_REQUEST ('XDO','XDOBURST','','',FALSE,:P_CONC_REQUEST_ID,'Y',chr(0),
    If (jreq_id=0)
    then
    srw.message (100,'Request id is zero');
    end if;

  • Using a hardware trigger to reset a counter

    Hi all...I am trying to using a quadrature encoder with A,B,Z outputs on an e-series card (pci-6052e). the problem is that the card does not support the z output since it only has 2 counters. So i am trying to find a way to get around this problem. I start off using ctr 1 (to the source pin of which i connect the A signal)..to count the events which will tell me how many angles the shaft has rotated through. The only other thing i need is to use the single pulse generated on the z line to reset the count each time it turns high. From reading posts it seems like i have to stop and restart the counter task to accomplish this. So the thing i dont know how to do is to convert that pulse on the z-line to a boolean value so i can run a case loop to stop and restart the task. I can use a daq-mx start trigger to look at the pulse but how do i convert that to a boolean value to run the case loop.
    Thanks in advance, Shyam.

    Hi Shyam,
    Depending on how fast the encoder will be rotating, you can do a few things. The simplist is to just read the Z index on a digital line as you have begun doing. Using a DAQmx Read, you can detect the state of the line and if the rotation is slow enough, you can use the boolean value. Again, this is not ideal. The newer M-Series boards have a counter input for the Z index in addition to being able to do change detection on digital lines which will make this task much easier. See if this works for your needs.
    Regards,
    Kent
    Applications Engineer 
    Digital Multimeter Home

  • Start Counter Output on a Analog Trigger in the PCI 6259 Mseries board

    Hi,
    My question is regarding how to use Analog Triggering to start a counter in the PCI 6259 M-series board.
    I have attatched a program here
    'Mult_Device_Digital_Analog_Out_on_Analog_Trigger.​vi'
    and I'll explain my problem regarding this program.
    I've tried to include all the details about the program in the documentation for the VI, but what the program
    does is essentially output a set of digital and analog patterns as specified by an end user, and at times
    specified in the front panel.
    Problem 1.
    I wish to start the whole operation on a analog trigger signal, in the program its the boolean "Line Trigger",
    but I get an error saying that trigger type is not supported, when the M Series board manual clearly says it can be done.
    Is there something wrong with my program ?
    Thanks.
    Shomu
    Attachments:
    Programs.zip ‏101 KB

    Shomu
    Admittedly, it might take a little time to find the documentation, but it is there. Also, the error you are getting indicates the proper trigger signals to use. In the help look at the analog Triggering Considerations for E Series, M Series, and S Series.
    With that being said the easiest thing to do is to setup an Analog Input task configured to start on an Analog Trigger. Then, setup a digital edge trigger for the Counter task. The signal you are going to want to look for is the Analog Comparison Event. This signal won't show up by default in the list. What you need to do is right click on the trigger source constant or control and select I/O Name Filtering. Then check Include Advanced Terminals. Once you have done this you can select the Analog Comparison Event
    StuartG

  • 8830 World Edition Quit Syncing Non-timed events to Outlook

    I have searched high and low, tried every solution offered, and none have helped me thus far. My 8830 all of a sudden quit syncing any calendar items TO Outlook that are non-timed like birthdays, many of which are recurring. It will sync other appointments. I thought it might have started after downloading Facebook. So I removed the application, I do not have a Facebook calendar or any other CICAL, and yet it still won't sync properly. I have tried limiting the scope of the transfer to a few days to see if that would make a diffference. Nada. At this point, the calendar on my phone is more accurate than Outlook (thank goodness it's not the other way around). Everything else, tasks, address book sync just fine. I have upgraded both my phone and DM to the latest version hoping that would help. Still no change. PLEASE HELP! I am going crazy here.

    I'm having somewhat similar calendar backup issues with my 8830.  Scares me that you don't have any responses posted yet after two weeks.  Hope help arrives soon.

  • Regarding output type and idoc trigger issue

    Hi
    i need to copy pgi quantity into sales order quantity for that i write a code into user exit MV50AFZ1. code is working fine but
    output type and idoc is not trigger due to this. In this exit to update sales order quantity i used bapi *BAPI_SALESORDER_CHANGE . can anyone tell me why o/p type and idoc not trigger ,what is the reason and what is the solution for this?
    Thanks
    Dinesh

    Hi Dinesh,
    Did you activate the enhancement for user exit ?
    Did you check if the output type is configured correctly ?
    Put a debugging point and see if control is coming there.
    Regards,
    Nisha Vengal.

Maybe you are looking for