LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with a loop array

Hello, I need your help to solve a problem that I can´t find the solution..

I need to create a way to :

 

From an array of values, (previously chosen by the User), of a measurement system that read the current temperature value and compares the measured value with the value already defined, if it´s if greater than the value pre-defined it will send true to a digital line. Or false otherwise.

Array pre-defined.:  [A | B | C | D ]

 I´m using Labview 6.1 and BNC2120, Pci-6024E

thanks

0 Kudos
Message 1 of 10
(3,622 Views)

Assuming that you are reading a channel that corresponds to each limit and you want a digital write for an equal number of digital lines, you could do something like what is shown below. If this is not what you are doing, provide some real details.

 

 

 

Message Edited by Dennis Knutson on 12-18-2009 12:55 PM
0 Kudos
Message 2 of 10
(3,614 Views)

Right Dennis, Thank You very much for your atention.

You sent me the simple concept of the project.In the fact I need to compare the input signal and choose the task to do.

 

My project is based on a climatic camera, that makes climatics tests of temperature and humidity on a X product.

the temperature regulator is based on a simple controller On/Off.

On is use to warm the temperature, and Off is used to cool.

 

It´s a temperature value that will be compared of a set of some temperature values pre-defined in a 1d array.(this pre-defined array is choosen by the user).

in each time interval this sample of temperature will be compared, but I need an 1d-array with n elements, because  the user can choose how many cycles of temperature it will be.

 

The main detail is: The Process of to warm and to cool is very slow, it can warm up 1° in a hour.

 

So when a value of temperature is equal of a choosen value for a long time as about X minutes, the next value of the 1d array pre-defined will be compared. This is my great doubt. How can I do this?

0 Kudos
Message 3 of 10
(3,587 Views)
In whatever you are using to acquire the temperature, you would index the array. That's probably as much detail as I can give without seeing your code.
0 Kudos
Message 4 of 10
(3,583 Views)

Right, I alread did it, (index the array), I need to save the values in an array, after this I get the element and compare it to..... after this action is my doubt.

I don´t have the code yet.

0 Kudos
Message 5 of 10
(3,579 Views)
From what I can tell, the way Dennis told you to do it sounds like the simplist way to do it. But what exactly are you trying to define true as? Does true mean that the current temperature is greater than the user-selected temperatures or the exact opposite? If the former is what you want, do exactly as he said. otherwise replace the GreaterThan function with the LessThan function and use that.
0 Kudos
Message 6 of 10
(3,562 Views)

Ok guys, understand that what I ask you is not about the output. (For the output, if the temperature is greater than the X value that I want it will send "1" true to the output. Otherwise I will have the "0" that I will do other task. It´s not the main doub because i Know how to do it)

 

What i mean to know with this question is...

From a specific value that must be reached, saved on a 1d array, How can I implement this function using a loop or other struct but it needs to go for the next position the 1d array.

0 Kudos
Message 7 of 10
(3,513 Views)

Does anybody have a sugestion for my problem?

I need to change the value of a 1d array of n-elements, and for each iteration or for each time completed, i change the value for the next value of this array.

 

Sorry guys for this confused message. but I need your help.

 

Thanks.

 

Merry Christmas! God bless you.

0 Kudos
Message 8 of 10
(3,464 Views)
A very basic way is just with a for loop. If you have an array outside of the loop and wire it through, the array will be autoindexed. What that means is that every time the loop iterates, you automatically get the next element in the array.
0 Kudos
Message 9 of 10
(3,459 Views)

Thanks Dennis, I am understanding what you said. It´s the most simple idea, and I think it´s a great idea. I´m gonna make this code, when i finish this I will reply this topic with the correct code.

Thanks.

0 Kudos
Message 10 of 10
(3,436 Views)