05-25-2013 01:42 AM
@carmen84 wrote:
Hi,
I am presenting one out of two different pictures ( in a case structrure) on the control panel, based on some processing that is done sample by sample, by outputting a boolean variable(call it X).
What I would like to do is this:
If X is true --> display PIC1
If X is false --> display PIC2, and maintain it for, say, half a second, no matter what is the actual value of X in this time range.
As of now, I managed to do basically this:
If X is true --> display PIC1
If X is false --> display PIC2
And this is not good enough for my VI, since there is an annoying flickering between images
There should not be any annoying flickering, ever. Make sure to update the image only whenever it changes and not as fast as the loop allows. If the two pictures are always the same, easiest would be use a picture ring with two images. Why don't you attach the VI you have now so we get a better idea what you are trying to do. Where does the boolean signal come from and at what rate? Also, what is your LabVIEW version?
05-25-2013 01:49 AM - edited 05-25-2013 01:49 AM
Yes sir right.
Can you modify that ?
One more thing how to do that, as in your reply it appears,
-----------------------
ABC wrote:
abcdefghijklmnopqrstuvwxys
----------------------
Is there any shortcut method for that ?
05-25-2013 01:55 AM - edited 05-25-2013 01:55 AM
Sir altenbach ,
As you said 100% of a CPU core, I tried to see in task manager but not able to see that. Can you please tell me how you saw that ?
I am using LV2011 win-7(In case you need this info ).
Thanks
05-25-2013 01:58 AM
Sir altenbach ,
I tried to modify the code. Please give me the feedback
Thanks.
05-25-2013 02:36 AM
@Ranjeet_Singh wrote:
I tried to modify the code. Please give me the feedback
Where is the modified code?
05-25-2013 02:42 AM
Ranjeet_Singh wrote:As you said 100% of a CPU core, I tried to see in task manager but not able to see that. Can you please tell me how you saw that ?
Sorry, it happens when the LED is TRUE and the VI is running. Try again.
05-25-2013 03:02 AM - edited 05-25-2013 03:11 AM
I am sorry, Here it is.
Thanks.
05-25-2013 03:49 AM
05-25-2013 03:49 AM - edited 05-25-2013 03:55 AM
@Ranjeet_Singh wrote:
I am sorry, Here it is.
There is still way too much code!!! Why so complicated? Let's look at your code:
Here's code (still bad!) that is identical to yours except it uses much less stuff!
Still there are problems, for example the loop might still have to spin at a higher rate, e.g. to do other stuff, so delaying everything by 2 seconds might not be good. You are still writing the same properties almost all the time.
Try to implement a solution that uses a constant loop rate (e.g. 50ms) and still provides the desired functionality. 🙂
05-25-2013 05:57 AM
Nice one sir,
What does it mean ?
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Try to implement a solution that uses a constant loop rate (e.g. 50ms)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I agree with all the points just needs to ask something,
Why this ?
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Your boolean should be TRUE by default with a mechanical action of "switch until released".
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
But I think this 50ms can be 1 sec or 500ms. Checking in the interval of 50ms is very quick.
One more thing sir,
I asked you one question in the starting how you reply with that format ?
-----------------------
ABC wrote:
abcdefghijklmnopqrstuvwxys
----------------------