LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to make a color box blink at a certain frequency.

I'm currently stuck trying to make a color box blink red at a 10hz frequency and I'm not really sure how to fix my code to work with it. I currently have a while loop with a shift register setup with a case structure inside that outputs red (255,0,0) when true and black (0,0,0) when false. Problem I'm having is I can't seen to get the boolean value to change between true/false in the shift register to do this.

0 Kudos
Message 1 of 4
(154 Views)

Well, you forgot to attach your code!  So, nobody can see your loop, your Shift Register,  yor control terminal,  your logic or your timing.

 

However,  I am certain that at least one of those is the cause of your problem. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 4
(132 Views)

@ignoic wrote:

I'm currently stuck trying to make a color box blink red at a 10hz frequency and I'm not really sure how to fix my code to work with it. I currently have a while loop with a shift register setup with a case structure inside that outputs red (255,0,0) when true and black (0,0,0) when false. Problem I'm having is I can't seen to get the boolean value to change between true/false in the shift register to do this.


Obviously, you made a mistake, but given the sparse information, there are millions of ways that could explain your symptoms.

To select between exactly two possibilities, a "select" would seem much more appropriate compared to a case structure.

If your colorbox only has exactly two states ever, why not use a square boolean with the true an false colors defined as needed.

 

Please show us your code as already requested so we can narrow down the possibilities.

 

Are you sure you are wired to the output of the shift register and not to a tunnel underneath it? What is supposed to change your boolean (a NOT operation, perhaps? Something else?). What keeps the loop running? How do you define the loop rate? Is the color terminal inside or outside the loop?

 

I also recommend the learning resources listed at the top of the forum.

0 Kudos
Message 3 of 4
(121 Views)

See if this can give you some ideas....

 

altenbach_0-1731173079208.png

 

0 Kudos
Message 4 of 4
(113 Views)