03-11-2013 04:06 AM
Hi,
I have two vi s which I want to connect through case structure.
I have 2 cases; true and false, in the case structure. I wanted to use a boolean button to control the case selection. If the boolean LED is turned on then true case should be selected and the first vi is connected to second vi. If the boolean LED is off then false case should be selected and first vi alone runs without connecting to the second vi. How to program it. Any suggestions please. I am new to programming and I am not sure whether my logic is correct. Please help. Thank you.
03-11-2013 04:14 AM
03-11-2013 04:25 AM - edited 03-11-2013 04:25 AM
Thank you for your response. But I did exactly the sam way. When I execute the program it does nothing. So I kept excute highlight and run the program. The highlight execute comes only till first vi and continues only there even after selecting the case. So I dont understand how to proceed .I attached the program code. Please check it and tell me where I am doing wrong. Run the Vi named "save image on event"
03-11-2013 04:35 AM
Hi ymadhuri,
next time you should name your "main VI" so I don't have to search for it in your ZIP file...
The VI "save image on event" contains the other two, so I suspect it's your main VI. It also contains a lot of IMAQ functions which aren't installed on my computer.
So I can't say what is happening before your "Save" case structure is called.
The highlight execute comes only till first vi and continues only there even after selecting the case.
I really don't know what you're trying to say here...
03-11-2013 04:53 AM
The left portion of the block diagram before the case structure is used to acquire real time images using my laptop webcamera , process it and display. When I select the boolean LED "save" then the processed image is sent for pattern matching which is inside the case structure. When I execute the code with highlight execution I observe that only the code outside the case structure is executing, The case structure is not running. How to make my program function properly.
03-11-2013 04:58 AM
Hi ymadhuri,
when using highlight debugging you also should note when your LED is read! You should use some DATAFLOW when you need the LED read after the IMAQ stuff is processed! Right now that button is read just when the VI starts - switching the button later on has no effect! THINK DATAFLOW! As a simple solution to your problem you should use a sequence structure to read the button within...
03-11-2013 05:05 AM
Sorry I do not know about sequence structures. This is my first programming experience. So I am not sure about my logic also. Kindly help me in achieving my output. the code which I have attched is developed by modifying existing programs available in discussion forums and example codes.Am I proceeding in the correct way?
03-11-2013 05:09 AM
03-11-2013 05:38 AM
I kept a flat sequence structure in the code. I found that there is an option of "stacked sequence structure". Which one would be suitabl for my application?
03-11-2013 05:40 AM - edited 03-11-2013 05:41 AM