05-12-2013 06:38 AM
Is there anyway that i can implement a look up table in my block diagaram that can't be shown in my front panel?:P
05-12-2013 12:35 PM
Just make the LUT a constant, and update it as it goes along the program. ...or am I missing something here.![]()
05-12-2013 12:40 PM
05-12-2013 12:41 PM - edited 05-12-2013 12:48 PM
Is the lookup table known at compile time or does it need to be recalculated at various other times during execution?
If it is fixed, just create a diagram constant. If you already have it as a control (or indicator), right-click the terminal and "change to constant". It will turn into a diagram constant with the same data.
If the lookup table is variable, keep the data in a shift register, action engine, or similar.
(Feel free to attach your code so we get a better idea what you are trying to do.)
05-12-2013 12:47 PM
@ben64 wrote:
Or use a property node to make the table invisible on the front panel.
Ben64
Why a property node? If you always want to hide it, just right-click the terminal and "hide control|indicator". (A property node is only useful if the visibility need to be changed during the run.)
The front panel is not the place to store data (hidden or not), also hidden items make the code hard to maintain. I would strongy recommend one of the other suggestions (diagram constant, shift register, action engine).
05-12-2013 09:04 PM
Hi all,
Basically what i wanted to do is that, after getting the values of my phase and grey level, i just want to have a look up table that i can see from my block diagram that shows the corresponding grey level value to my phase value:)
Thanks!
05-13-2013 12:41 AM - edited 05-13-2013 12:42 AM
Typically a lookup table is just data used programmatically. I don't understand what you want to "see" on the block diagram and how that should work. Data intended for the eye of the program operator belong in a front panel indicator, not on the diagram.
It would really help if you could attach a simplified example and maybe explain your reasoning.
05-13-2013 01:08 AM
Hi altenbach,
I was able to find phase and grey level of each pixels, and I'd like to see the value of grey level corresponding to value of phase in array constant at block diagram if it is possible. If not, could you show me simple example on how to see it in front panel?
I attached my VI that I'm currently working on.
Thanks
05-13-2013 01:34 AM
Indocators are on the front panel, never on the block diagram.
Both your phase and grey level arrays are 2D, but your table has only two columns. How do you want to map each 2D array to a 1D column? Something does not quite fit.
(also note that you can remove the second FOR loop and nothing changes, it is not needed)
05-13-2013 02:06 AM
Hi altenbach,
I've tried to implement it and you're right, it actually doesn't fit, so i'm just going to try implementing a look up table that is shown in the front panel:) but im having a difficulty on how it is supposed to be implemented:(