LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array element used in numeric indicator

Hello

I was wanting to design a VI where i have a case structure with roughly 20 different cases. In each case will be an array constant each with a different number of elements. What i was wanting to be able to do was select the case structure on the front panel and then in a numeric indicator it would show me the last element of each array.

I new to labview coding so any help would be greatly appreciated.

 

Thanks

Craig McMillan

0 Kudos
Message 1 of 5
(2,756 Views)

 


@Craig1988 wrote:

 

I was wanting to design a VI where i have a case structure with roughly 20 different cases. In each case will be an array constant each with a different number of elements. What i was wanting to be able to do was select the case structure on the front panel and then in a numeric indicator it would show me the last element of each array.

 


You are heading down a treacherous path, I will wager dimes to donuts that there will be a more elegant alternative to a case structure and 20 different constants if we knew a little more about the problem.

 

0 Kudos
Message 2 of 5
(2,751 Views)

I really don't know of any other way that i could do it. I take it wouldn't be plausible to do it this way. I am trying to output different voltages to make a design on a oscilloscope. I was going to use a flat sequence where the first part would be give a new origin to the voltage. Then it was going to design a letter which the co-ordinates are kept in the array. Once the the letter had been produced it would leave a new point on the oscilloscope. I figured from using the last element of the X-axis array it would be able to give me the new origin for the next letter without having to edit each array individually. Sorry I can't make this clearer it is quite hard to explain. If you have any idea of how to do this it would be appreciated.

 

Thanks

Craig McMillan

0 Kudos
Message 3 of 5
(2,748 Views)

 


@Craig1988 wrote:

I really don't know of any other way that i could do it. I take it wouldn't be plausible to do it this way. I am trying to output different voltages to make a design on a oscilloscope. I was going to use a flat sequence where the first part would be give a new origin to the voltage. Then it was going to design a letter which the co-ordinates are kept in the array. Once the the letter had been produced it would leave a new point on the oscilloscope. I figured from using the last element of the X-axis array it would be able to give me the new origin for the next letter without having to edit each array individually. Sorry I can't make this clearer it is quite hard to explain. If you have any idea of how to do this it would be appreciated.

 


 

It is certainly plausible to do it that way, it will be a maintenance nightmare, but perhaps you are willing to live with that.

 

Let's start with some very basic questions to describe the problem.

1) What makes up an element of your design (letter?)?  Is it a serious of x and y locations, just y locations assuming a sweep in x or what?

2) Do you plan on building up the entire design and then outputting the value to the scope?

3) How are you generating the individual arrays you plan on using?  How close are they in length?

 

Other LV questions:

1) Do you know what a shift register is and how to use it?

2) Have you looked over the LV tutorials, they provide a decent foundation.

 

If it is difficult for you to explain clearly, it will likely be even more difficult to code.  Nonetheless, give it a shot, if you get something partially working, or working yet inelegant, we may be able to give a better nudge in the right direction.

0 Kudos
Message 4 of 5
(2,739 Views)

1) The letters are made up of two 1D arrays. One for X-axis and the other for the y-axis. Each are then connected to a Daq assistant which outputs the voltages on the scope, when i do this it is able to be shown on the scope.

2) The final plan was to be able to input a word on the front panel, then the scope would show the letters with a tiny gap between the letters so that they aren't connected. In doing this i know that the arrays would have to be altered (depending on the size of the previous letter) so they won't overlap on top of each other.

3)I originally thought that the best way would have been to have the letters in a case structure and then using some sort of string input for selection. The letters have just been created from designs i have made on graph paper and then plotted in the arrays

 

I am unaware of what shift registers are. Do you think that they would be more relevant here? I have spent some time doing tutorials and such but it is hard to find stuff that is relevant to this situation.

 

Thanks

Craig McMillan

0 Kudos
Message 5 of 5
(2,733 Views)