Addition doesn't work until both inputs are initialized?

I'm using a Logitech web camera to take pictures. I want to operate in either of two modes:
1) Overwrite - each picture taken replaces the previous one
2) Accumulate - each picture taken is added to the previous one (pixel by pixel)
The attached .doc shows a simplified version of the VI
It's working fine except for one thing ... I can't start out in "accumulate" mode. I have to take one picture in "overwrite" mode before "accumulate" mode will begin to work. If I try to begin in "accumulate" mode, the display just sits there blank regardless of how many pictures I take, until I take one in "overwrite" mode.
Does this must mean that the addition function doesn't work until both inputs are initialized? If I initialized the shift register to an array of zeros would that fix it? I tried it and it didn't seem to help, but maybe I need to make sure the initialization array is the same size as the picture array?
Thanks
Eric Coppock
[email protected]
Ball Aerospace & Technology Corp
Attachments:
accumulate example.doc ‏47 KB

Look up the rules for addition and you will find that when you add two arrays, you can only add elements that exist(in both arrays). Otherwise, there is nothing to add. If your shift register is uninitialized, then that's your problem.
Two solutions:
1... If you know the size ahead of time, then initialize an array of that size with zeroes, and wire that to the outside of your shift reg.
2... You could detect I = 0, and replace the array with your new data on the 0th iteration, regardless of the mode switch. In other words do not perform an ADD if there's nothing there yet.
Either one of these is preferable to using the data from an uninitialized Shift reg. The data might not exist, or it might be leftover from your last run an hour ago.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks

Similar Messages

  • Rear input become low audio if both inputs are used in Inspire 4.1 4400

    Hi, I am having a problem with my creative 4 in . if you test the front input without connecting the Rear input the sound is OK and vise versa, but if you use both inputs the Rear input become low sound and the front input is ok. i check my source and there is no problem in left and right audio output. i checked the cables and interchange it also the same problem. any help is highly appreciated.

    hella wrote:
    I've come to these forums out of desperation as i am a complete armature in knowledge when it comes to audio stuff. Basically i have the Creative Inspire 4. 4400 speakers, had a long time now back when i got my pc. However recently i've got a new hdtv the Samsung LE23R7BX lcd, and what i wish to do is hook my speakers up to this television. Now the problem i'm having is this. The 4. creative speakers, the main lead the comes from the sub then connects into the pc, ends with two audio jacks, a green, and a black. Im sure you guys know what im on about, i don't know the proper name for this you see. Anyway s my tv doesn't have green/black audio ports like on my tv. Im guessing this is because its not a p, i also read something about the black/green being stereo inputs. Anyway s the type of connections my tv allows (audio connections) are av in (audio l/r), dvi in (audio l/r),pc in (however this only has port(audio) component in (audio l/r) etc. I have no idea if there's like adapters or anything yo can buy, if there is, if anyone can postt them, or give me a rough idea what i need to look for, buy etc. Would be much appreciated, as i like to watch my films though half decent speakers and not the crappy tv ones.
    cheers
    ps.
    sry for long post.Message Edited by hella on 04-24-200708:36 AM
    Hella,
    Unfortunately, you have to buy two seperate "Y" mini stereo (that's what those green and black cable jacks are called) to Left and Right RCA jacks. You use one for the Front Audio and the other for Rear Audio.
    I am no sure where you are from but you should be able to buy them from local electronics and audio store such as Radio Shack, Best Buy, Circuit City and/or Fry's Electronics if you happen to be lucky enough live near one. It should not cost more than 10 dollars a piece and you should not need it to be longer than 3 feet long.

  • MacBok pro Audio line in port  doesn't work for microphone input Why?

    I turn line-in port  on in System preferences/sound but no reaction. Using within third party applications like Hear or Amadeus the recording via head set microphone is without problem. What is wrong with the Mac os ?

    Actually, I've found the following problem with mine:
    If the jack is stereo jack, the computer is in "line in" mode, where you need higher signal level (approx. 500mV afaik) which no passive microphone will provide. If the jack is mono, it "looks" for an external microphone and it works.
    Both sockets (in and out) of the MBP are intelligent, in the sense that they detect what's connected based on the jack configuration.
    I have a headset with a stereo pink jack (the microphone) and it is not working. Another microphone that I have, with a mono jack works flawlessly.

  • Changing sound preferences doesn't work until I restart?

    So the new mail sound for a particular mail account, I want to change. I change it to "off" (no sound) and when I get an email it still makes the sound it used to. If I restart the phone then it works correctly and I won't hear a sound when I get a new email. Is this how it should work? Changing a setting in preferences doesn't work till you restart the phone?

    Well, the 'chirping' certainly isn't a hard drive! I don't know what it could be... the only thing that I can suggest is that you take your computer to your local Apple Store and have them diagnose the problem. The diagnosis should be free as will an estimate for repair (if you're out of warranty).
    Something's obviously not right but as the only moving parts in the retina models are the fans, you may have a problems with the fans. As to the problems with the keyboard, let the Apple techs figure that one out.
    Good luck,
    Clinton

  • HT5622 What do to when you buy app and it doesn't work even though you are billed.

    What to do when you buy an app and it doesn't work after you were billed

    Start a ticket here: http://expresslane.apple.com
    Go to iTunes, iTunes Store.

  • My iphone5 has a keypad issue of getting stuck and blinking of display the phone doesn't work until it's turned off and turned on

    my iphone5 has keypad issue which is getting stuck and the display starts blinking the phone doesn't respond until it's turned off n switched on what might be the solution ???

    Close all open apps by double-tapping the home button, then swiping up and off the screen with the app window (not the smaller icon).
    Reset your device: hold down the home button along with the sleep/wake button until the screen goes black and you see the Apple, then let go. (No data loss)

  • SetMaxInactiveInterval() doesn't work fine when there are a few sessions

    I'm using setMaxInactiveInterval() to set different values for sessions in
              program. When I test it, it works fine if there are only one or two
              sessions. But if there are more sessions, say nearly 10, they will be
              expired randomly such as at around 2 minutes when set to 3
              minutes(setMaxInactiveInterval(180)). BTW, my server is WLS6.1
              Any suggestion? Thanks a lot.
              Hattie
              

    Why not keep things simple and create a shortcut on the user's machine that uses this target command:
    \\SRV2\d$\dir1\subdir1\subdir2
    Simply because dir and subdirs are no constants.
    Just imagin you have a webpage that looks like this :
    Proj. #   Custommer    directory                                                bunch-of-other-stuff
    4538      Microsoft        \\SRV2\Big_contracts\US\2014\software   etc
    4539      Nokia             \\SRV3\Prototypes\EU\2012\hardware      etc
    4540      So-else          \\SRV3\Big_contracts\EU\2013\software    etc
    Instead of the full path you have a small folder icon (to save space). And clicking on this icon will bring you directly to said path.
    It was extremely convenient, very user-friendly. And it has been working for over a decade, and today my users are frowning...
    I think you are pushing psexec.exe beyond its limits.
    No, it's working perfectly on Win XP. I just find it too sad that it no longer works on Win 7. I view this as a regression.
     When you run it the way you do it you actually do open a further Explorer process but it remains invisible to you because it runs in the background.
    No, the user does get a new explorer windows that pops to the foreground. The
    only trouble is that it opens in "My Documents".
    Of course I could (try and...) teach them to right-click, copy the link, paste it in an explorer and so on, but they are going to hate me.
    Thank you

  • Client VPN doesn't work until reload; all other services are fine

    We have a 1800 router running 12.4.x that is acting up.  Every week or 2, client vpn connectivity stops working on it (clients receive a ' reason 412; the remote peer is no longer responding' when trying to connect).  All other traffic running through that router continues to work fine (site to site, nat, etc).  If we run a 'clear ip nat translation', then ONE client can reconnect, but any subsequent clients cannot.  So, basically one at a time.  the only 'fix' is a reboot of the router.  any suggestions on where to start troubleshooting?
    thanks!                  

    Matt,
    Did you disable NAT-T on this device?
    http://www.cisco.com/en/US/products/ps6120/products_tech_note09186a00807e0aca.shtml#solution01
    Thanks,
    Tarik Admani
    *Please rate helpful posts*

  • DLL created with LV 7.1 Application Builder doesn,t work when analysis subVIs are present

    I'm looking for a solution of the following problem.
    The DLL created by the "sum1.vi" source works properly, while the DLL create by "sum2.vi" always gives a zero result.
    The "sum2.vi" source contains an additional "Hanning Window" VI (not wired), that seems to be the cause of the problem.
    If I delete the Hanning VI and re-build the DLL, the same works fine
    Is there a solution or is it not possible to make Labview DLLs when containing analysis VIs as filters, windows, FFTs, and so on?
    Thank you for your answers.
    N. Roberto
    Attachments:
    sum1.vi ‏12 KB
    sum2.vi ‏14 KB

    Roberto N. wrote:
    Thank you Jordan, I'm using Labview 7.1.
    Anyway I've resolved the problem by adding the "lvanlys.dll" file (present in "..\Labview 7.1\resource\lvanlys.dll" path) as support file in the building process. Now the DLL containing the analysis functions works correctly.
    Natalino Roberto
    Ok, you probably got lucky since the lvanlys.dll seems to implement that function directly. However most Advanced Analysis functions are just redirected by lvanlys.dll to the Intel Math Kerneal Library that gets installed with LabVIEW 7.1 and higher. The only way to get that properly installed with your LabVIEW executable or DLL is to create a LabVIEW installer in your Application Builder and make sure to select under "Installer Settings->Advanced" the "LabVIEW Run-Time Engine" and the "Analyze VIs Support". Then use that installer to install your DLL on another computer.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Script doesn't work, if GUI subscreens are collapsed

    Hello all,
    I am to code some scripts to automate some boring, but necessary steps in trainings. Unfortunately my scripts don't work ("The control cound not be found by ID"), if the GUI looks different compared to the reording phase (e.g. other tabs are selected or subscreens are collapsed).
    The problem with the tabs could be solved by clicking on the needed tab regardless whether it is already open or not.
    But I was not able to solve the problem with the collapsed subscreens. Clicking on the "Open subscreen"-button without looking at the current status doesn't help. The state just toggles and noone can say, whether its closed or open afterwards. Furthermore, according to the API-Doc, there is no possibility to check, whether a control is available or not. Is that true? If there was a method, I could make use of an if-clause to click on the "open subsreen"-button conditionally.
    Has anyone good advise for me?
    Thx a lot!
    Klaus

    I found another possible issue while looking at a similar problem. I was unable to execute a PowerShell script as a Task Scheduler action, even though the script ran correctly when logged into Windows as the target user and running within PowerShell.
    Task Scheduler would consistently display the 0xFFFD0000 error when I nominated the script in the task's action arguments using what I believed to be normal PowerShell quoting rules:
    -ExecutionPolicy Bypass -File 'D:\full path\to\script.ps1'
    PowerShell acquiesced and Task Scheduler fired off the task immediately and without issue when I changed the quotes I used from single to double:
    -ExecutionPolicy Bypass -File "D:\full path\to\script.ps1"
    Dropping to a command prompt and executing the full command immediately revealed the problem:
    D:\>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File 'D:\full path\to\script.ps1'Processing -File ''D:\full path\to' failed: The given path's format is not supported. Specify a valid path for the -File parameter.
    Notice the strange use of two single quotes before the path and one single quote after.
    The moral of the story: When feeding the full path of a script to PowerShell as a command line parameter,
    use double quotes!

  • ESS 50.4. doesn't work - Which T-CODES are contained in ESS?

    Hi guys!
    I have troubles with my ESS 50.4.(ITS based version).
    When I click some links (for example My Qualification Profile), the ITS screen of the ESS iView shows the message: "The Internet Transaction Server could not start the transaction "MY_QUALIS" because of the following error: transaction MY_QUALIS ios unknown."
    So I want to try create Transaction iView for these error screens.
    Can you help me, where to find the list of these TCODES?
    Thanx a lot!
    Peter

    Peter,
    It should work without you having to create a transaction iView.  There are basically two different types of transactions in that ESS package - one requires the service file and html templates to exist on the ITS (which I suspect are the ones you are having trouble with), and one which doesn't.
    Have you tried publishing the MY_QUALIS service from the backend system to your ITS instance via IACOR?  Or you could just run report W3_PUBLISH_ALL_SERVICES in R/3 to publish everything to the ITS...
    Regards,
    John

  • I am new to Windows 8 and would like to view my .pdf's (like I could in Windows XP) on a window I can shrink so I can open additional software and shrink so both pages are open next to each other on the window.   I am very frustrated at this point with Wi

    PLEASE HELP!

    Many people have this experience with Windows 8, which is becoming a byword for unpopularity.
    Still, a bit of basic understanding is important. People have got used to just getting a new version of Windows and using it, without training or study. Not any more, thanks to Microsoft's bright ideas.
    Here are some very crucial things about Windows 8.
    1. Windows 8 has a new kind of app (program). These new kinds of apps take over the whole screen. Microsoft thinks these are the future. I won't tell you what I think. Except, if this new world is so great, why don't Microsoft use it for their own Office apps. A
    2. The old world of Windows 7 and before is still available with most Windows 8 computers, except some cheap tablets and phones. Microsoft like to call this an app called "Desktop" which is really all of the old-fashioned, windows-can-be-resized, apps together.
    3. Most apps are "new world" or "old world". Everything in the App Store is new world - that's the rule. A few apps (like Internet Explorer) can run in either world.
    4. Windows 8 comes with a PDF reader "out of the box". This runs only in the new world and it's called "Microsoft Reader". Don't bother with it.
    5. Adobe produce a "new world" PDF reader called "Adobe Reader Touch". Marginally better than Microsoft Reader, it's just not a patch on the old one; there are loads of things it doesn't do, and worst of all it's always full screen because Microsoft said so. No need to use it. Just download the old world Reader from http://get.adobe.com/reader as usual. (Be sure to turn off the unwanted "free offers"!!)

  • Why does home sharing not work endless both itunes are open?

    Why doesn't it?
    I was orginally asking how to fix it, but I saw those other posts on the right hand side and I guess It was always opened on both.
    Why's it have to be like that? It can't just send a signal or something?

    Winston Churchill wrote:
    Welcome to the Apple Community.
    I'm not sure it's all that realistic to expect something to work when it's turned off. Both devices need to be running iTunes in order for homesharing to work.
    Mavericks server app not only doesn't need to be running, the account its on needn't even be logged in.  Ideally, iTunes would use some kind of helper app to feed the data without the iTunes interface running, which is not then needed.  But I can see from Apple's perspective how it might create user confusion.

  • Username search doesn't work properly if there are spaces in the username

    I was experimenting with the watch user widget and you have to select a user from a list of users based on a search.
    The problem is that spaces are not respected in the search so that you can't easily set up a watch on a user name with spaces.
    Two examples that I tried were b noir and katrina s.

    I actually just set up my watch user for you, p, saw your post title and wondered if you were looking for me. I have the same sort of trouble.
    My workaround for this (and also constraining discussions search on my posts) is to not refer to the drop down list. Instead, I click the wee blue "Select People" link next to the field. In the Username Lookup thingy that comes up, I type b noir into the Username field, and then click Lookup. That'll bring me up.
    I agree it's not easy. Took me quite a while to work out the procedure.

  • Now my MS Office doesn't work because powerpc applications are not supported by Lion.  what now?

    Does this mean that I have to purchase a new version of MS Office that is supported by Mac chipset?  Wish I'd known that before purchasing Lion.  Is there a way to work around this? 

    There are already plenty of threads on this subject. Just search PowerPC or Rosetta and Lion.
    Yes, you have to upgrade the nearly decade-old software.
    No, there isn't a workaround, although there are alternatives to Office.

Maybe you are looking for