LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with timing- increment rate

Solved!
Go to solution

please see the attachment.

 

i need to increment V2out every second. please suggest a better way of doing it.

 

can i use this statemaschine saved as a subvi in another while loop?

 

RENN 

Kudos always welcome for helpful posts 🙂
0 Kudos
Message 1 of 9
(3,564 Views)

Hi RENN,

you should use a shiftregister to store your value out instead of the local variable. What do you make with this value? Do you need to output it to a hardware?

 

Mike

Message 2 of 9
(3,562 Views)

yes Mike.

 

i have to output this value to a Valve. i need to control the valve with its 0-10v output.

 

i need exactly 60 increments in 60 seconds. please see the edited attachment. 

 

Renn. 

 

 

Message Edited by RENN on 02-02-2009 01:58 AM
Message Edited by RENN on 02-02-2009 02:02 AM
Message Edited by RENN on 02-02-2009 02:03 AM
Kudos always welcome for helpful posts 🙂
0 Kudos
Message 3 of 9
(3,558 Views)

Hi Renn,

if you have a output card which supports buffer, then you can create a waveform and send the entire data to your card. Which hardware do you use?

 

Mike

0 Kudos
Message 4 of 9
(3,548 Views)

Hi Mike,

 

i'm using PCI 6229 Daq and another profibus card for two valves v1 and v2 respectively.

 

i need to control the output of v2 which depends on output of v1. i have a subroutine for (1) incrementing v2out, then another (2)to convert the 0-100%unit to 0-10volts and then a (3)Daq subroutine.

 

all these run in a whileloop and i dont want to change the while loop execution rate. 

 

what i need is incrementing v2, 60 increments from 0-100%. i dont know how can i achieve this.

 

thanks in advance

 

RENN 

Kudos always welcome for helpful posts 🙂
0 Kudos
Message 5 of 9
(3,545 Views)
Solution
Accepted by topic author RENN

Hi Renn,

i think i don't really understand what you connect where, but maybe the attachment helps.

 

Mike

Message 6 of 9
(3,522 Views)
thanks Mike...
Kudos always welcome for helpful posts 🙂
0 Kudos
Message 7 of 9
(3,498 Views)

thanks a lot Mike...

i really wanted that code.

 

i have saved the code inside the while loop as subvi (please see the attachment), have to use this functionality to create ramp in another while loop, using shiftregisters.

 

is there any ways of doing this without shift register? if i use this subvi in a while loop in which many other subvis are used and if the loop execution rate cannot change? obviously in this vi it works. i want to know if i want such a functionality can i used event structure? 

 

can i programmatically make an event for any value change?

 

please reply

 

 

 

 

Kudos always welcome for helpful posts 🙂
0 Kudos
Message 8 of 9
(3,476 Views)

Hi Renn,

you can of course use an event structure, but then you should use two loops, one with the event structure and the other one with your ramp function. See the ProducerConsumer Design pattern for more information.

 

Mike

Message 9 of 9
(3,452 Views)