From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get array elements

I have a VI that simulates the heatcycling of an oven. So far I was able to capture the powerconsumption and the temperature, everytime the heating starts or stops (with a lot of help from members of this board....).
Now I would like to do the following:
When the block temperature gets to a certain value (constant in the vi) the vi should check if the oven was heating or not. If the oven was heating at that time, I would need (lets say) the values of consumption and temperature at counter n-1 and n+1.
If the oven was not heating at that time, I would need the values at counter n+2 and n+3.
The counters here are only examples. I've tried a lot of things already. i.e. compare temperature > if true > get index of array, etc.
 
Anybody out there with a good idea???
 
Thanks a lot.
(I already found this forum really useful)
 
The German Guy
The German Guy
0 Kudos
Message 1 of 3
(2,466 Views)
I think I have a solution, problem is I don't know how to post an
attachement to this newsgroup....Send me an email and I will reply with
an atached file

BR
/Sture

the German guy wrote:
> I have a VI that simulates the heatcycling of an oven. So far I was able to capture the powerconsumption and the temperature, everytime the heating starts or stops (with a lot of help from members of this board....).
> Now I would like to do the following:
> When the block temperature gets to a certain value (constant in the vi) the vi should check if the oven was heating or not. If the oven was heating at that time, I would need (lets say) the values of consumption and temperature at counter n-1 and n+1.
> If the oven was not heating at that time, I would need the values at counter n+2 and n+3.
> The counters here are only examples. I've tried a lot of things already. i.e. compare temperature > if true > get index of array, etc.
>  
> Anybody out there with a good idea???
>  
> Thanks a lot.
> (I already found this forum really useful)
>  
> The German Guy
>
>
> Energy_consumption_simulation_one counter2.vi:
> http://forums.ni.com/attachments/ni/170/204685/1/Energy_consumption_simulation_one counter2.vi

0 Kudos
Message 2 of 3
(2,442 Views)

Hello Sture,

Thanks for the help. I found my mistake late on Friday evening. The case structure has a comparison attached to it which checks, when the temperature hits a given value (in this case it was 80). Unfortunately, I've set the counter of the heat-simulation to something in between 0 and 1 (which is added every time the loop goes). The value I had chosen made my heating so, that it never exactly hits 80. So there is never a true for the case. I changed that to an element, that lets me set an upper and lower limit. Now it works. If you anyway want to take a look at it, I've attached the vi again. (May be somebody else can use some of the ideas too).

Thanks anyway,

The German Guy.

PS.: To send an attachment, you only have to hit the grey button marked "Browse..." underneath the posting-box you're writing in. Then you can easily choose a file on your hard drive.

The German Guy
0 Kudos
Message 3 of 3
(2,392 Views)