LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically on and off Boolean switch

Hi,

 

My program needs to ramp up to a particular value and then ramp down, and this has to go on forever. I can use a switch to manually do this. If this switch works automatically, then my program will work continuously. Can someone tell me how to make automatically on and off switch?

 

 

 

Regards,

0 Kudos
Message 1 of 10
(4,718 Views)

Fortunately, LabVIEW is a real programming environment, so this can be done easily. The solution depends on how you do the ramping, so show us your VI.

0 Kudos
Message 2 of 10
(4,711 Views)

Instead of a button, store a flag in a shift register and you can do just a little analysis to set or clear the flag so you know which way you are ramping.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 10
(4,708 Views)

hi,

 

I need to make ramp(Boolean) on and off forever. True case in the case structure is a ramp up and false is a ramp down.

Regards,

0 Kudos
Message 4 of 10
(4,699 Views)

hi,

 

sorry for not uploading the vi.

0 Kudos
Message 5 of 10
(4,697 Views)

Sorry, I don't quite understand the code. Apparently this runs under RT. Why these bewildering constant conversion between datatypes (FXP, SGL, I16, etc). What the reason for the +1followed by -1 in the outer false case?

 

I'll have a look....

0 Kudos
Message 6 of 10
(4,680 Views)

Here is a quick draft. I would probably pre-compute the ramp and then simply index into it.

 

 

0 Kudos
Message 7 of 10
(4,674 Views)

I can't open in LabVIEW 16.0

 

0 Kudos
Message 8 of 10
(4,531 Views)

Saved back to LV 14.

 

 

0 Kudos
Message 9 of 10
(4,522 Views)

Thanks,

0 Kudos
Message 10 of 10
(4,504 Views)