01-11-2012 04:31 AM
hi,
I am facing a very peculiar problem in my project. I have written the code,thing is it is not working properly to the mark when i give that particular command to run. but it is working in debugging mode, if there is any timing problem, what is that i have to do to make it work normally when i run the program without debugging. Can anyone help me in doing this
01-11-2012 04:47 AM
01-11-2012 05:08 AM
hello,
Here is my vi just have a look at it. Unable to understand how to sort the problem
01-11-2012 05:09 AM
hi,
forgot to post my vi
01-11-2012 06:24 AM
Hi Samineni,
sorry, I'm missing all the subVIs, so can't help.
I would suggest:
- enforce dataflow by use of error clusters
- use subVIs for the ever-repeated same functions in nearly every frame of your sequence(s) of building a file path and saving a file
- race condition can occure due to the reference characteristics of the IMAQ image control...
Btw:
Why use AppendString when you can do the formatting entirely with FormatDateTimeString?
And please, stick with your original thread next time...
01-11-2012 06:46 AM
I fully agree with Gerd and says that with error in-outs on your sub-vi's you dont need those ugly sequence frames. 🙂
/Y
01-11-2012 08:59 AM
You really need to give more detail. You say it is not working properly unless you are in highlight mode. But you never say what is going wrong versus what you expect it to do. Are there problems with the images? Are you getting an error message? Does the computer crash and catch on fire?
01-11-2012 09:36 AM
There are a couple of things really wrong with your VI. Let's have a look at frame 1 of the outer sequence:
I recommend clean, flat code with defined dataflow and your problems will go away.
01-13-2012 12:59 AM
hi,
Problem i am facing is my autofocus code is working perfectly in debugging. For suppose if i disturb my live image and if i want to have focussed image,it is working perfectly well if i disturb the image in clockwise direction(without debugging) and it is not working if i disturb the image in anticlockwise direction,it is getting stopped after few steps,without completing all the steps. I,myself feeling strange with this problem but it is very important for me to solve this. I have given a delay 0f half second,should there be any rectifications,can you guide me in doing this.
01-13-2012 10:27 AM
You already said that it works under debugging, but not under regular execution, no need to repeat that.
Did you at least try to fix the existing race condition? I clearly identified the most likely problem in my point (2) above. Simply make sure that the two independent code fragments don't talk to the instrument in parallel.
Where did you add a delay? It is really difficult to understand what you are actually doing unless you show us some new code. Thanks!