Onboard Wait On High Speed Capture

I would like for an onboard program to wait for a high speed capture signal from a trigger input. Unfortunately, I have not had success with the flex_wait_on_condition function; it has always timed out before detecting the event. However, calls to the function flex_read_hs_cap_status identify that the high speed capture line is indeed toggling faster than the 3 second timeout. I use the following sequence of functions to configure the high speed capture:
flex_configure_hs_capture(m_BoardID, NIMC_AXIS2, NIMC_HS_LOW_TO_HIGH_EDGE, 0);
flex_begin_store(m_BoardID, ProgramNumber);
flex_enable_hs_capture(m_BoardID, NIMC_AXIS2, NIMC_TRUE);
flex_wait_on_condition(m_BoardID, NIMC_AXIS2, NIMC_WAIT, NIMC_CONDITION_HIGH_SPEED_CAPTURE, 0, 0,
NIMC_MATCH_ANY, 30, 0);
flex_end_store(m_BoardID, ProgramNumber);
Axis 2 is configured as a open loop stepper axis with encoder resource 2 mapped to it.
Any thoughts as to why this wouldn't work?
Thanks!

Thanks for the suggestion. It seems to work fairly well, although there is some delay between the trigger event and the execution of the critical section of code.
Are you aware of a method to speed up execution of an on-board program? The critical section of code in the attached program fragment takes about 4ms to execute. With the added delay of the polled high speed capture line, I am limited to a ~150 Hz loop. I would like to increase the execution time by about twice.
Also, a command from the host computer seems to preempt the on-board program, causing it to take up to ten times as long to complete. Is there a way to set the priority of the on-board program task above host communication?
Thanks for you assistance,
Mike
flex_insert_program_label(m_BoardID, LABEL_LOOP_START); // main program loop
flex_read_hs_cap_status(m_BoardID, NIMC_AXIS3, DATA_HS_CAP_STATUS); // check if high speed capture triggered
flex_and_vars(m_BoardID, DATA_HS_CAP_STATUS, DATA_HS_CAP_STATUS_MASK, DATA_HS_CAP_STATUS_MASKED); // AND high speed capture with trigger 3 mask
flex_jump_label_on_condition(m_BoardID, NIMC_AXIS3, NIMC_CONDITION_EQUAL, NIMC_FALSE, NIMC_FALSE, NIMC_MATCH_ANY, LABEL_LOOP_START); // if trigger 3 not triggered, jump to main program loop
// Critical Section Code >>>
flex_set_breakpoint_momo(m_BoardID, NIMC_AXIS3, 0x08, 0x00, 0xFF); // set digital output high
flex_enable_hs_capture(m_BoardID, NIMC_AXIS3, NIMC_TRUE); // re-enable the high-speed capture
flex_read_adc(m_BoardID, NIMC_ADC1, DATA_ANALOG_INPUT_1); // read the analog input
flex_write_buffer(m_BoardID, ANALOG_INPUT_BUFFER, 1, 0, &UselessLong, DATA_WRITE_TO_BUFFER_NUM_PTS); // write the analog input to the buffer
flex_read_buffer(m_BoardID, VELOCITY_PROFILE_BUFFER, 1, DATA_VELOCITY_CMD); // read the next velocity profile point
flex_load_velocity(m_BoardID, NIMC_AXIS3, UselessLong, DATA_VELOCITY_CMD); // set the axis velocity
flex_start(m_BoardID, NIMC_AXIS3, 0); // update the velocity by calling start
flex_set_breakpoint_momo(m_BoardID, NIMC_AXIS3, 0x00, 0x08, 0xFF); // set digital output low
// <<< Critical Section Code
flex_jump_label_on_condition(m_BoardID, NIMC_AXIS3, NIMC_CONDITION_TRUE, NIMC_FALSE, NIMC_FALSE, NIMC_MATCH_ANY, LABEL_LOOP_START); // jump to main program loop
flex_end_store(m_BoardID, ProgramNumber); // stop program store

Similar Messages

  • Buffered high-speed capture with multiple axes

    Has anyone succeeded in using buffered high-speed capture (on 7350 boards) with multiple axes?
    The capture works really well for me on a single axis, but when I try to use it on 2 axes simultaneously it behaves very strangely.  There seems to be some kind of unwanted interaction between the two buffers which means data points are lost and they often stop updating altogether.
    A very similar question was posted here over a year ago (http://forums.ni.com/ni/board/message?board.id=240&thread.id=4087), which includes a more detailed explanation and an example VI.  Can anyone help?  I'm using LabVIEW 8.5 RT with NI-Motion 7.6 and a 7358 board.
    Thank you,
    Ian

    Hi Ian
    I have been asked working with kostas on this problem for you and just wanted to give you an update as I know its been a while and is an important issue for you. I have been chasing up our specialists in the field and resently had responses of  the kind:
    "Hi Graham
    The issue was found out to be a bug in our motion driver. The issue is being examined by motion R&D right now. I do not know a time frame on when this will be fixed as it is proving to be a tricky problem. I am copying Stuart and Lorne on this since they have been working on it as well.
    Thanks,"
    Be assured that I am chasing it as closely as I can. From your end what is the situation, do you have a work arround that will suffice or are you still waiting on this.
    Thanks for your understanding and I look forward to hearing from you with your current situation.
    best regards
    Graham Green
    Technical Marketing Engineer
    National instruments UK & Ireland

  • Mapping the High Speed Capture signal to RTSI

    Hello,
    Can i Mapp the "High Speed Capture" signal to RTSI ?
    When i'm using the motion RTSI example and mae some changes: 
    i'm setting the source to "High speed capture"  and the destination to RTSI_0 i 'm getting an error that its possible!
    i want to use this input to trigger an action on other pci.
    I'm using pci-7344 with umi - 7774 and pcie-1430
    Thanks
    Mor
    Message Edited by MotiM on 08-01-2009 08:47 AM

    Dear Jochen,
    Thank you for your reply.
    I try to map the High Speed capture to RTSI , but the HSC doesnt work.
    When i remove the RTSI mapping from my diagram, the HSC work and i can capture the encoder position.
    I'm using the UM7774, and the HSC is wired to the global connectors (TRIGGER/BREAKPOINT connector)
    I also read all the relevant documentation about my hardware and i notice that there is a comment about mapping the motion rtsi :
    (from Select Signal vi Help):  Note  You must route signals from the RTSI lines before you enable high-speed capture ,
    so i also consider that, it still doesnt work....
    I really appreciate if you can take a look about the 2 versions of vi i attached here.
    They both need to do the same.
    Each vi contains 2 parallel diagrams, one diagram for the single axis move, the move is to target position X,
    the second diagram is for the vision, there is "trigger each line" from rtsi line (the motion diagram includes maping the encoder phase A to the rtsi for this purpose)
    and i want to use the High speed capture to trigger the start of imaq also.
    The example :
     HSC in motion activate the start of imaq in second loop.vi 
    is a working example that runs good and capture the image.
    but its "dirty" programming, i dont think its should work like this.
    its actualy a implementation of "busy wait" loop.... ( i dont like it, but work...)
    The example :  
    HSC triger directly the start of imaq.vi
    is hoe i think its should be ( i know that i need to trigger the HSC whitin the time of the timeout of waiting to the start trigger of imaq to accure, that is why i put a big number there... )
    BUT, this vi doesnt work, the High speed capture doesnt happend at all...
    Can you take a look on these vi and let me know what i'm doing wrong here.
    I really appriciate your help.
    Regards
    Mor
    Message Edited by M0Reng on 08-03-2009 02:14 PM
    Attachments:
    HSC in motion activate the start of imaq in second loop.vi ‏72 KB
    HSC triger directly the start of imaq.vi ‏71 KB

  • Route scan clock to high speed capture

    Hi, I want to have a continuous aquisition and sample into an array two encoders and my e series channel about 100 scans per sec. I will be routing the board clock over RTSI, assumed to bt the gerneral purpose clock, to do a high speed capture from two encoders. Absolute positions and AI must be syncronized. Can I use the internal clock from the e series, and what is it called? How do I get a periodic sample from AI to be stored with each high speed capture?

    Matt,
    To synchronize your analog input and encoder measurements, you will need to route your analog input scan clock over RTSI. In LabVIEW, you will use Route Signal.vi with AI scan start as the signal source input and your chosen RTSI line as the signal name input. This RTSI line can then be used to latch your encoder readings into a buffer. Thus, the data in your analog input and encoder buffers will be synchronized.
    Good luck with your application.
    Spencer S.

  • Buffered high speed capture

    Hello,
    I am looking for any example of an on-board buffered High Speed (HS) capture. The only example I've found so far (see http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3D77D56A4E034080020E74861&p_node=DZ52480&p_source=External) deals with single HS capture mode and cannot work with the high frequency capture of about 1000 Hz that I am interested in. Can anybody help me?
    Thanks.

    In this case NI can offer you two solutions:
    1. NI offers hardware upgrades. You could contact your local NI branch and ask them to exchange your 7344 with a 7354 (or a 7352 if you don't need more than two axes). This would be the best and easiest solution but maybe not the cheapest. At least you could ask them to send you a quote. Please take into account that the connector of the 7354 is compatible to the connector of the 7344 so you wouldn't have to buy additional cables or connector blocks.
    2. You could add a PCI-6601 counter board to your setup. The 6601 can be used to measure positions by either connecting the encoder of your motor to the inputs of the 6601 (in parallel to the 7344) or if you don't use an encoder (open loop stepper) then you could measure the step/dir signal of the 7344 with the 6601. You can connect your trigger signal to the 6601 for a buffered position measurement. The 6601 supports DMA so a position measurement rate of 1 kHz is absolutely no problem.
    The disadvantage of this solution is obviously the additional cabling and a higher complexity in programming.
    Regards,
    Jochenhttp://forums.ni.com/ni/board/post?board.id=240&message.reply_to_id=2110#
    Preview Post

  • Still Waiting for HIgh Speed Internet

    I see advertisements for Xfinity's high speed internet and have never seen it. I have been with comcast for a long time. My WIFI crashes in and oot on a regular basis. The internet locks up and I have to restart my computer. I have attahced a video. This happens often. I was trying to watch netflix when this happened. It never did come back. I gave up and turned off my computer. I am beyond frustrated. I pay for high speed - I want high speed. Unhappy,Jodie

    Please start by reviewing the troubeshooting tips at this sticky
    http://forums.xfinity.com/t5/Basic-Internet-Connectivity-And/Connection-Troubleshooting-Tips/m-p/1253575#U1253575
    Post the downstream power levels, downstream SNR and upstream power levels on all channels.   
    If you don't want to do a self diagnosis, then you should call Comcast support for troubleshooting, 1-800-266-2278.
    It could be your computer causing many of your issues.

  • Been Waiting for High Speed For 2 years

    I was hoping there may be someone here on the forum that may live in our area that can tell us if they have heard anything concerning high speed finally coming to our area.  It is Petersburg PA 16669....It is a rural area.  We have submitted petitions and it has been 2 years with no word.  I have written a letter to Verizon Imaging but get no response. If you are from my area or are knowledgeable in High Speed It would be great to hear. 
    Thanks

    Whenever I try to check for highspeed availabillity using my address, I get two results for my address, but the cities are not correct. The addresses verizon offers have the same street address though which makes me doubt that these are even valid addresses. I know where the two other towns are that come up and each is around 20 miles from where I live.

  • Buffer high speed capture

    when i use the Vi shown in figure uploaded ,the captured positions can read from the buffer either the the trigger is input or not.Is there anthing else to configure ? 

    This is the Final Cut Express forum, and no there aren't any tape deck that will do that.

  • Continuous, triggered, high-speed motion capture

    Hello,
    I'm attempting to perform a continuous triggered high speed motion capture independent of the motion, and it's not clear that this is possible. Before I spend a few hours on a wild goose chase, I thought I'd ask around.
    I have a digital pulse train coming in at about 100 Hz and I'd like to measure the position of my motion system in all 3 axes at each pulse. Having acquired the data, it should then get dumped to a file. This should happend continuously until the user exits the program. The continuous part of this seems unnecessarily complicated, involving on-board programming, if my reading of examples such as onboard-hsi-gpbuffer.vi and continuous_hsc.vi is correct. However, if that's the worst of it, I'll survive.
    Meanwhile, the system is undergoing random motion, including starting and stopping of the axes. This is the part that has me particularly concerned. All of the examples that I have seen, both bundled and otherwise, seem to include a single move as part of the program. Since my system will be undergoing multiple moves controlled by the user, I'm concerned that these moves (or the end of the moves) will cancel the capture operations.
    Does anyone have any insight into this sort of setup?
    Thanks,
    Jason

    This seems to do the trick. It's based on the "Onboard Program - Continuous High Speed Capture into General Purpose Buffer" which can be found in the online examples. It implements an on-board program which fills a general purpose buffer. Most importantly, it runs continuously and independent of the motion or stops of the various axes. Hope someone else finds it useful.
    Still curious if this is really the easiest way to accomplish this.
    Jason
    Attachments:
    ContHSCapture.llb ‏160 KB

  • Timeout errors when using high speed camera.

    Hi all.
    I'm currently trying to capture images using a Mikrotron EoSens MC1363 camera at high frame rates >500fps. The issue arises when the region of interest (ROI) is decreased in the microtron software (of which screenshots are attached). The ROI must be dropped in order to increase the fps. When MAX is opened and configured to match the camera settings, and grab is initiated, the timeout error occurs. I've attached screenshots of the mikrotron software, max settings, the error and PC used. The OS is windows 7 64 bit. We use the camera config file for the mono version of the camera which i've been informed will cross over to satisfy the colour version we use. Any questions feel free to ask. Thanks.
    Attachments:
    errors.docx ‏3016 KB
    997-EoSens 3CL-MC1362-Manual.pdf ‏1209 KB

    Hi Dom.
    As you said the maximum frame rate with the ROI set to 1280 x 1024 is 505fps but according to the general information for the camera series:
    The Mikrotron EoSens camera series features extremely sensitive high-speed
    CMOS sensors available in monochrome or in colour with a resolution of 1280 x
    1024 pixels and capture rates of 110 or 500 frames per second. Depending on
    the model the image data is transferred in 8 or 10 bits via either CameraLink
    (Base, Medium or Full) or Gigabit Ethernet.The region of interest (ROI) can be
    freely selected, and the cameras can achieve even higher capture rates up to
    120,000 fps when the ROI is reduced
    Therefore it was my thought that by reducing the width of the ROI increased frame rates may be reached. Realistically we're looking for as high frame rates as possible so that the camera has capability to pass between projects. Currently the moving object enters and leaves the ROI within a 4 frame window, so frame rates of up to 1000fps would generate more data. Naturally, a point will come where the data cannot be physically written as fast as it is generated (>600MBps). Therefore it would be useful to get a handle onto why the error occurs as well as methods to fix it. Hopefully the problem is being discussed between NI and Mikrotron and we may have some answers in the near future.

  • Early 2008 MacBookPro keyboard backlight off and fans run at high speed

    Hi!
    I wrote from Turkey.
    My Early 2008 MacBookPro 2.40 ghz 4 gb Ram OSX Mavericks machine's keyboard backlight off and fans run at high speed; it seems an exact smc resetting problem.
    So i tried the 2 ways of SMC restting procedure; both battery you can move and not, but nothings changed on the situation..
    On the way for removable battery; nothing changed but on the way for umremovable battery way; keyboard backlight flashes and gone, but fans are at high speed not changed. So nothing changed.
    What can i do right now? i'll wait for your advices
    Thanks

    Your Mac may need a new PRAM battery.  Once it is over 4 years old, that often is needed.

  • Help! Trying to record/render high speed movies (1/1000fps). Can I do this?

    I am trying to make high speed movies of the twitches. My camera can do up to 1/10000 fps analog but I cannot change the raw video fps. I believe it is 29.97, because of this each frame has 2 or more captures on it. No good! Can anyone help.

    What camera is this? How is it recording the footage?
    I had footage from a camera that shot at 2000fps to a hard drive..a high speed computer camera. That raw footage wan't something I could use in FCP, as it was some proprietary format. They needed to export it from their system as a Quicktime movie...Animation codec. And it being a computer camera, it captured with computer monitor dimensions, 800x600. So I had some resizing to do.
    How does your camera work?
    Shane

  • LabVIEW 8.5 high-speed camera

    Hi,
    I'd like to take many
    high-speed images with a camera, and save them to a disk, or my computer's hard drive. I congfigure the camera (it is a Pulnix TM-6740cl camera) with the Measurement and Automation Explorer (MAX.) I take the pictures with LabVIEW. I've found an example program in LabVIEW that is close to what I want; it was written by two members of this forum, N_Holmes and reut. The only differences between that program, and
    the program that I'd like to run is that I need to be able to change
    the shutter speed of the camera (although I believe that I can do this
    with MAX), I'd like to be able to change the target
    directory (for some reason, if I change the directory with the reut
    program, the camera only takes 1 "frame" and stops), and I'd like to be
    able to save a file for each frame taken by the camera (I can only get
    the reut program to save 1 file.) I have LabVIEW version 8.5. If you
    could help me out in any way, then that would be greatly appreciated. Thanks!
    Attachments:
    grab images and Save to FileReut-11.vi ‏67 KB

    Hi Bolin,
    I'm using an NI PCI 1426 with NI-IMAQ, 18MB. Thanks for your previous help. I've actually worked on the program, and I got the camera to take multiple pictures. I also incorporated a part in the program that decodes the raw bayer image that this camera outputs.
    I do have some other questions, though. First of all, I'm not entirely sure what you mean by "trigger." I use the computer to take the pictures; MAX configures the camera, and LabVIEW sends the signals to the camera to take the pictures, and then saves them on the computer. Also, I know this is probably a bad question, but I'm not 100% sure where in MAX I can look to find out what framerate I'm acquiring at. I'd like to acquire pictures at the camera's maximum framerate, which I believe is somewhere over 1000fps. I tried many different methods in order to capture at the maximum framerate, and the best option seemed to be at the settings: manual shutter, shutter setting 0, 4X4 binning. However, my pictures were of extremely poor quality, and they were very dark.
    Also, where can I go in MAX to change the shutter speed? I've tried changing the shutter control setting and the shutter setting number; I just want to verify that this is correct.
    Thanks again for your help! Once I can figure out how to make these pictures take at maximum speed, and at the best quality, then I can finally start on my project!

  • Help! data manipulation for high speed streaming to disk from multiple boards and multiple channels

    I am using Labview 7.1 and have been trying to capture data from 12 channels simutaneously sampled at 2MS/s each and streaming to disk for up to a minute or more.  The hardware I am using is 2 x PXI 6133 S series boards with a MXI4 link to a Pentium D 2.8 Ghz machine with 2Gb ram.   I have 2 sata drives set up in a raid 0 configuration which should give me hard disk write speed faster or equal to the MXI-4 transfer speed. 
    I have first started off by using the example code "multi device sync - analog input- cont acquisition" which has enabled me to sync the two boards and sample at the required speed. 
    To stream the data to disk, I have first merged the data from each board  together to save it to one file.  I have tried using the storage vi's but I end up with a Daqmx read error (trying to read data that is no longer available).  I have played around with the read data size to the point that I either get a insufficient memory error, or I get the "trying to read data that is no longer available"  error.  I have also tried using the file IO blocks with some success and have found that I have been able to stream to disk only if I configure the daqmx read block to output the data in "raw 1D I16" format and plugging it into the file-write block.  In doing this, I have noticed that using  multiple channels on one daqmx read task, I will get all the channels in one 1D array rather than a 2D array organized by channels.  This makes it messy to read at the end of this, and I also don't want to write another vi to separate the channels, due to the high chance of getting the data mixed or messed up if I happen to change the number of channels on a board
    Is there a cleaner way of streaming this data to disk and keeping the channel data separated from each other?, and/or is there a better way to capture and handle the data I need? 
    I have attached the vi which I have got to consistantly work streaming to disk using the raw 1D I16 format.
    Thanks in advance to anyone who can help.
    Attachments:
    multidevicesync_analoginput_streamtodisk.vi ‏197 KB

    Hi,
    i can suggest following
    Refer to an example VI called as "High speed data logger.VI"  in conjunction with "High Speed data logger reader.vi" in Labview examples. Alhrough the logger might be in Tradiditional Daq format, it can be quite easily converted to Daq Mx format to store data in Binary (I32 format) . I have used this for many of my applications and i have found that the data retrieved does not have any "messups".
    Why not keep a seperate file for each card? This way, you do not have to load your application with extra process. You only have to acquire and save. After saving in Binbary format, you can retrive it offline, convert it to ascii format and merge the data files of various cards to get one consolidated ascii data file.
    hope this helps
    Regards
    Dev

  • Urgent problem! please help. high speed digitizer, channel switch time too long!

    Dear all NI high speed digitizer experts:
     I post a question concerning the two-channel configuration using NI5154 digitizer (see Need help to configure a two-channel acquisition using NI5154 ).
     As we need to do some measurement using NI5154 very soon so purchase a DAQ board as suggested by Efrain is not a option for our coming experiment. So I try to configure the NI5154 a two channel acquisition. I configure the NI5154 to count pulse in two channels. Our experimental setup will send pulse to channel 0 for 400 ms and then stop. 100 ms later pulses from other source will be send to channel 1 for 2 s.  I thought the 100ms dead time in our setup would be long enough for the digitizer to switch from channel 0 to channel 1. But after some test I found the digitizer takes more time to switch between channels. 
    I made a test vi (NISCOPE-Timing.vi) just for count how many ms it takes for the digitizer to switch between channels. In the attached vi, if you run for only one channel one loop takes about 20 ms in my pc. If you run for two channels it takes about 130 ms for one loop. If you just run one channel twice the loop time is about 40 ms (I mean stop a channel and then restart the that channel).
    I don't understand why it takes so long to switch from channel 0 to channel 1.  As I tested the niScope Commit.vi consumes a lot of time for the second channel. Is there any way to avoid this? We can not extend the 100ms long dead time of out set up so I must get rid of this problem. 
    Solved!
    Go to Solution.
    Attachments:
    NiSCOPE-Timing.vi ‏34 KB

    Hi Lixin,
    There are a couple of different options that you may try. The first, which it sounds like you may not prefer, is to use the TRIG line on the 5154 and somehow find a way to route both sets of pulses to that line. You can either somehow connect both lines to the one input or use some sort of external switch since the signals will not come in at the same time.
    Unfortunately, what you re seeing in terms of the time it takes the board to reconfigure itself for a different trigger channel and re-inititiate is due to the settling time that is necessary for the board to be able to fully reach its specifications. The majority of settling usually occurs pretty quickly, but the board will wait for some time to get the best possible performance in terms of specs. If you are okay with reducing this settling time (and very slightly diminish the specified performance), then you can use an internal scope property to set the max settling time.
    I have attached a .rc file which must be placed in the LabVIEW directory for niScope to enable use of this property node. Please place the file in your ...\Program Files\National Instruments\<LabVIEW 2009>\instr.lib\niScope directory. Once the file is in that directory, restart LabVIEW, and you should be able to see a new category in the niScope Property Node tree titled "Internal". Under that category, you will have the Max Settling Time property, which gives the driver a maximum amount of time (in seconds) to wait for settling before beginning a new acquisition. Add this new property to your first property node at the beginning of your program. I tested this out with a value of 50 ms and found that my initiate went from ~125 ms to ~53 ms or so after reconfiguring the trigger channel and re-initiating.
    Hope this helps!
    Daniel S.
    National Instruments
    Attachments:
    niScopeMaxSettling.zip ‏1 KB

Maybe you are looking for