Timing of Piezo and Camera

Hi,
I'm trying to control the movement of a piezo transducer and the acquisition of images from a camera with exact timing. Firstly, I'm trying to drive the piezo in a sinusoidal manner at a frequency, f. Secondly, I want to acquire images with my camera at a frequency of 2*f. i.e. I want to acquire when my piezo voltage is at the maximum and minimum values.
I'm relatively new to LabVIEW but I have figured out how to control my piezo and acquire images independently. However, I'm running into problems with timing when I try to do the two things in unison.
At the moment, I'm using a loop and the 'Simulate Signal' function to generate my voltage output to my piezo. I then have a second loop in parallel to drive my camera acquisition. I've gone to a bit of effort to make sure that the two loops start executing at the same time using 'Rendezvous'. I have my current VI attached. It kind-of works but I'm sure there's a better and simpler way of doing it. If one of the loops runs slightly off-time for some reason, the loops will fall out of sync after many iterations. Would I be right in saying that I'm going about the process the wrong way in not using just one loop? I've thought about this but I don't know how to implement it? If I put the image acqusition loop into the piezo loop, won't the process of acquiring an image knock out the timing of my piezo?
If anyone could offer any advice it would be great!
Thanks in advance,
Paul
Solved!
Go to Solution.
Attachments:
LabViewForum.vi ‏97 KB

Hi PaulNap,
Thanks for attaching your code along with your query!
Looking at what you want to achieve I think using two parallel loops is a good call. It means you can seperate the execution of the signal generation and the timing of the camera.
Of course, what you really want is to achieve some kind of co-ordination between the loops, such that the camera acquisition loop only runs when the signal generation loop generates a peak value.
I've written and attached a simple bit of code that illustrates this idea. I am using notifiers to co-ordinate the loops. The top loop only writes a value into the notifier when it generates a peak value. Since the bottom loop is waiting on the notifier, it will only ever run once the top loop has written a value into the notifier. In this way, the bottom loop will only ever run when the top loop generates a peak value.
Please let me know if you have any questions about this.
Kind regards,
Josh E
Applications Engineer
National Instruments UK & Ireland
Attachments:
Example for Forum.vi ‏24 KB

Similar Messages

  • Generate new interface and camera

    i have installed niimaq 251. How do i create a camera that meets my specs?. the ones i see, the fields are
    grayed out and can not be modified. How can i enable grayed out fields in the camera file?....
    My camera is parallel interface and uses 12 bits. I can not change these in the camera files i open.
    Habib

    Habib,
    If you can not find a camera file for your camera that ships with the IMAQ driver, try looking at out camera advisor for any support we may provide for the camera:
    http://sine.ni.com/apps/we/nipc.specs?action=search&asid=1102
    This will incude Camera Files, Support Files, Cabling etc...
    If you are unable to locate the file for your camera, we typically will attempt to create one in house. You will need to fill out the attached questionnaire and return it to [email protected] (IMAQ/Motion). We will also need the timing diagrams, pinouts and any other instructional information from the camera. It is also benefical if you can send in the camera so we can verify the file works properly. Once our engineers have more info ont eh camera they can give you a time
    line for completion.
    I hope this helps!
    Best Regards,
    Chris D.
    NI Applications Engineer
    Attachments:
    Digital_Camera_Questionnaire.xls ‏384 KB

  • Chart display and camera trigger

    Hello,
    I’m new to Labview and using it for my thesis to acquire data and initiate the image capturing of a camera. But I came across some problems with the data display and camera trigger, if anyone could offer some advice
    My Hardware consists of a MC-USB-2404-UI DAQ-device (including MCCdaq-Drivers with Ulx-Libary and an extra LV vi pallet), a thermocouple type K and a TEMATEC pressure sensor MAP350-S / F (0-10V/0(4)-20mA). Since the DAQ-device supplies itself through USB with just 5V Power, I connected the pressure sensor in series with an additional 10V power supply unit.
    The VI that I am constructing should read the measured values (pressure and temperature) and display them in a chart and on a numerical indicator. Above 200°C and 200bar the data logging should be manually started and a high-speed camera simultaneously triggered. Apart from the camera trigger, the VI is almost complete except for a few problems with measuring the value display.
    Here are my problems:
    1) How can I initiate the camera simultaneously with the data logging? Since the hs camera will capture more than 1000fps, I would restrict the image acquisition to a simple trigger that initiates the capturing. The appropriate VI’s IMAQ and IMAQdmx are already available. Should I create a new loop and connect it to my case-structure through a Rendezvous?  And what kind of vi’s do I need for a simple trigger?
    2) Also I couldn’t figure out how to convert 1D-Array of Waveform to DBL or at least how to connect the data wire with a numerical indicator. The indicator is crucial for the manual start of the data logging.
    3) Another problem is with the chart display. As soon as I start the data logging, the graph disappears and the chart displays only n-samples of the currant loop pass. The enlargement of the chart length history brings no improvement. Before the data logging is started the charts are showing the all points from the start. So what changes when I Press “Aufnahme starten” (start acquisition)?
    Any ideas would be much appreciated.
    Attachments:
    Blockdiagramm.png ‏153 KB
    Frontpenal.png ‏172 KB
    Temp+Druck_daqmx.vi ‏595 KB

    Hello annaei,
    thanks for your quik help... the numeric indicator is now implemented. thanks to you.
    Explaination:
    1) I have construkted an experimental vessel, which builds up pressure through a stamp. There is a heating jacket around it and on the bottom is a sight glass to capture the intirior with a highspeed camera. The starting conditions for the experiment are 200bar and 200°C. So I will need to monitor the current state of the intirior to know when i can start the actual data logging. With the data logging i want to start my image acquisition silmutaneasly. 
    3) For the Chart problem i attachted two pictures... After experimenting with the sample clock, reading vi and timing of the loop, i figured out that the greatest influence is the loop timing.
    At 250ms (wait Xms multiple for loop pass) there is all data displayed even if i press the data logging button. At 100ms i was logging the data from 5s on and as one can see in the picture below the graph disappears after 28s. At 20ms loop pass interval the graph disappears randomly and with the data logging activated it is just a single point displayed.
    In general the 250ms loop pass interval is a totally suitable solution for me, but i just can't help the feeling that the problem is not resolved. And i would like to know what i am doing wrong or what i could do better.
    Thanks, Tobi.
    Attachments:
    mit 250ms multiple loop pass.png ‏171 KB
    with 100ms multiple loop pass.png ‏160 KB
    Temp+Druck_daqmx.vi ‏600 KB

  • My LR 4 suddenly no longer recognized my memory cards. I am using the same cards and cameras but consisitently get the error message:"files not imported because the files could not be read. they are jpg and nef files...I am stuck without my workhorse! Any

    My LR 4 suddenly no longer recognized my memory cards. I am using the same cards and cameras but consisitently get the error message:"files not imported because the files could not be read. they are jpg and nef files...I am stuck without my workhorse! Any advice is helpful. This has never happened in 6 years

    answered in your other thread LR 4 suddenly no longer recognizes files.

  • I have a iPhone 5.  In usage, it says i have 2.1 gigs used because of photos and camera.  I have deleted all my photos via iPhoto and now reset the phone back to factory settings in order to try to solve this problem, to no avail. Help!

    I have a iPhone 5.  In usage, it says i have 2.1 gigs used because of photos and camera.  I have deleted all my photos via iPhoto and now reset the phone back to factory settings in order to try to solve this problem, to no avail.   Both iTunes  and the phone say that 2.1 gigs are being used, even though the phone now has nothing on it.  What is going on?

    Yeah it works fine over wifi the problem is when I try to use it over my 3G. It's really stressing me out now.

  • What is the optimum core configuration for a new Mac Pro to process and manipulate very large (80 megapixel) images using PhotoShop and Camera Raw?

    Hello:
    I will be using creative techniques to process and manipulate a large number (hundreds) of very large (80 megapixel) images captured using a medium format digital back (Phase One IQ180).
    Final output will be digital fine art imagery printed using an Epson 11880 at large sizes (up to 60 inches x ?), retaining the highest possible quality and resolution. I will be using Adobe CC PhotoShop and Camera RAW as well as Capture One software. PhotoShop filters will be used extensively.
    The Mac Pro needs to be optimized for the above purpose and be useful for at least five years. I plan to max out all the other options (RAM, graphics cards, storage). Performance is more important than cost.
    The few discussions I have found that mention optimum core configurations seem to lean toward 6 or 8 (but likely are not taking into consideration my need for manipulating a large number of very large files), so I am looking to this foum for opinions.
    Thank you,
    Kent

    See if this helps
    http://macperformanceguide.com/index_topics.html#MacPro2013

  • I cannot open photos in my Photoshop CS 6.  I have been able to open Browser and Camera Raw, but not

    I cannotg open photos in Photgoshop CS6.  I can open them in Photoshop Browser and Camera Raw, but cannotg open them in Photoshop.  Blue circle comes on for about three seconds, then changes to a plus sign, and nothing else happens.  Please help.  Adobe Photoshop is either unwilling or unable to help me with this problem.

    Nobody can help you without some exact system info and details on what photos exactly.
    Mylenium

  • "Edit In" Photoshop CC not working for RAW or DNG files after applying LR 5.3 and Camera Raw 8.3

    I just applied the Lightroom 5.3 and Camera Raw 8.3 updates and now am no longer able to open RAW or DNG files into Photoshop CC. When I select a file and choose "Edit In" Photoshop, photoshop will launch, then nothing will happen. After 2 to 5 minutes, an error will popup in Lightroom saying "The file could not be edited because Adobe Photoshop CC could not be launched." An error I've never seen before. When I click "Ok", Lightroom will show that it's "preparing a file for editing" in the upper left, it will create and save a psd to disk and in the catalog (another new behavior), then it will open in photoshop. All other file types (jpgs, tiff, psd) seem to work/open fine between applications. No difference if I open photoshop prior to selecting "Edit In". Selecting "Edit In" other applications, like Viveza, work fine.
    I tried first deleting preference files in both applications. No luck. Ditto for plugins. Notta. Eventually I completely uninstalled and fresh installed Photoshop, Lightroom, and Bridge from the cloud. Same deal...can't open raw/dng files into Photoshop.
    I'm at a complete loss, dead in the water, with a mountain of editing work piling on top of me. Kicking myself for applying the upgrades, which I had been delaying for some time to avoid just such a cluster%#$. Ugh.
    I'm on a PC running Windows 7 64bit.
    Any suggestions would be greatly appreciated.

    In the normal situation, LR needs to see a PS installed for it to detect the Edit In PS option is possible, so if you uninstall both, then install PS, first, then LR.  Of course with this release there may be some hiccup that requires installing either one or the other, again, but if you've uninstalled both and are reinstalling both, then install PS, first.

  • I can't open CS5 in windows 7 it tells me "Programm is locked or you are not legitimated". Bridge and Camera draw are working ok

    I can't open CS5 in Windows 7. It tells me "application is locked or you don't have legitimation". Bridge and Camera Raw are OK.

    Hi,
         thank you for your answer.
         The original Text photoshop showing me is the following:
         Konnte ein Arbeitsvolumen nicht öffnen, weil die Datei gesperrt ist
    oder Sie keine ausreichende Berechtigung haben. Heben Sie den Schutz
    der Datei mit Hilfe des Befehls 'Eigenschaften' im Windows Explorer
    auf.
         Sorry I can tell you this only in German. 
         After Installation the Version 64 Bit couldn't work because of this
    sentence (Windows 7 has 64 Bit Version). The 32 Bit Version worked
    without problems. The next day both versions didn't work because of
    this Informatiom. Bridge and Camera raw workinjg perfect but photoshop
    (CS 5) is blocked.

  • Lightroom will not import my photos.   It did up to a week ago.   I have changed cards and cameras (both worked two weeks ago).   I can import the photos to Picasa and iPhoto

    Lightroom will not import my photos.   It did up to a week ago.   I have changed cards and cameras (both worked two weeks ago).   I can import the photos to Picasa and iPhoto.   I get the following error message:  
    Some import operations were not performed.
    The following files were not imported because they could not be read  [followed by a list of the files I wanted to import]
    Thumbnails show up.  LR just will not import them.
    Any idea what is going wrong?

    If the Import button is not clickable, that means that Lightroom thinks you have no new photos to import (one possible reason is that they are duplicates)
    So, you need to figure out why Lightroom thinks that. The way I would do this is to search your Library module for at least one of the photos, by file name. To do this, you would follow all 4 of these steps in sequence:
    Click on All Photographs in the Catalog Panel on the left of the Library Module
    Turn off all Filters (Ctrl-L or Cmd-L once or twice)
    Expand all stacks: Photo->Stacking->Expand All Stacks
    Search for one or more of the photos using the Filter Bar (press backslash), search by File Name

  • Share Screen and Cam doesn't Work in Goup Chat,

    In in private chat 1 on 1 i can use share screen and cam but in Group chats now i can;t use them.... from what i know you can't use those if you chat with more than 9+ or something like this..... but in 2-3 you can use share screen and webcam.... but now i can't.

    same issue here.
    not sure how to debug, runnig the applet with plasmoidviewer didn't gave me anything usefull...
    btw. I'm on acer laptop and "fn + left" & "fn + right" works (with that nice brightness OSD)
    Last edited by marvn (2012-11-08 21:06:53)

  • My audio and cam is not functioning anymore.my laptop model is Satellite A200-130.what shall i do?

    im having a problem with my laptop.the audio and cam is not functioning.i dont know why/
    please help me what to do.do you think program files about these were deleted?

    Probably best to post in the Toshiba Support Forums Europe.
    -Jerry

  • Mic and cam not working

    hi, my unit is hp pavillon Dm4-2070us window 7 OS. i already did system restore, tried also record audio and turn on the cam but the problem still exist, it says cam not detected

    I also have an hp pavillon and I am having the same problem with mine. The mic and cam just stopped working. I have tried everything I know but nothing has worked.

  • Mic and Cam won't work on iChat

    Hello
    I have a new mac pro, so I am a beginner! However, I know that the cam is working and that there is a function mic because when I can see it on My Display iSight. I see me, and I see the audio. But on iChat the camera and phone icons are not green and I cannot use them.
    Moreoever, in google talk I do have a camera icon, but when I try and call people on google talk they cannot hear me! I can't find anything about the mic anywhere.
    Please, anything you can do to help would be awesome.

    Hi Cathjoy,
    IF in System Preferences > Sound you can see the Sound Blue Bar in the Input Tab move at least half way (preferably 3/4) - then you need to check ichat in a couple/three of places.
    1) In the View Menu of iChat make sure "Show Video Status" (And Audio) is selected (Ticked). (this shows the green Audio and Video Icons)
    2) In the Video Menu of iChat again both Mic and Camera Enabled item should have a tick next to it (Selecting toggles it On or Off)
    3) In the iChat Menu > Preferences > Video section there should be a Microphone drop down and your choice here should match the one in System Preferences > Sound > Input tab and you should see the Green bar here move when you talk.
    When doing 1) make sure the correct Buddy List is the "Front" Window (Your own icon may still display as a Video one if another Buddy List is set to Video in iChat 4 and iChat 5)
    7:56 PM Friday; December 4, 2009
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • Sound and cam can't work in this old lenovo note book computer model 3000 N100

    Fatory said support window XP and vista ,I allow mircosoft test vista and  window 7 ,everythink can work, but now I install window 7 only ,sound and cam des't work, .I don't know why?How can my notebook sound and cam can work?

    what?
    you are asking about issues in windows on a lanovo laptop in the appletv forum on apples support site?
    is that not a bit like asking for support for a boing 737 on philips discwaster forum ?

Maybe you are looking for

  • Capture Excise Invoice for Returns delivery

    Dear friends, Once the returns sales order is created and followed by returns delivery, we need to capture the excise invoice for it. Can anyone kindly guide this process. What will be the T.code for capturing excise invoice in this scenario and pls

  • File save as pages

    Trying to File save as in pages, i dont want copy and I dont want template any help , very frustrating the new version of pages lost the file save as choice.

  • Viewing Pages Thumbnails in Pages 1.0.1

    I Have been looking at pages 2 recently and noticed that it uses thumbnails on the left hand side Is this possible in Pages 1.0.1 Would be nice but I can't find a shortcut to it Rob

  • Disable file browsing

    Hi, i have this kind of problem. I need file chooser which will not have file browsing. I need this for using in specific way, like open directory and collect file from there. User must not be able to change current folder in that file chooser. I kno

  • Import bug in linux oracle 8i

    Hi, i do an export(red hat6.2 o8i) with user level successfully, however the following error occur while i import the dmp file into another db on other machine (red hat 6.2 o8i) : IMP-00009: abnormal end of export file Import terminated successfully