G Web Development Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Lookup table

Solved!
Go to solution

Hi.

 

Is it possible to create a lookup table which can be inplememted into a webvi. I have created one using a unsigned array with a cluster made with two elements which are called x and y. When i create this and had a further 127 columns the same number i changed in x and y get created i  the further 127 columns. Is there a way of them being diffrent numbers?

 

Thank you

Matt

0 Kudos
Message 1 of 7
(2,030 Views)

You probably need do explain your problem (and what you are doing) in much more detail. For example it is not clear at all what you mean by e.g. "same number" or "different number", etc..

0 Kudos
Message 2 of 7
(2,008 Views)

Hi,

 

Sorry for not explaining more. What i am trying to acheive is:-

I have a created a webvi which requests data from a database using HTTP request. I am wanting that data stored in the database to represent another figure in the webvi. So changed from one figure into another figure and i thought that a lookup table would be the simplest. I can create something where i have a cluster with 2 elements in it x & y and then add that to an array with 127 columns in it but it seems that each of the columns always as the same figures in it.

 

Regards

 

Matt

0 Kudos
Message 3 of 7
(2,000 Views)

Still not clear:

 

Why not say e.g. "number" or "value"? The word "figure" is very ambiguous.

What is "add that to an array"? (the add operation? Append element? Insert element? Replace element?)

So you have an array of clusters. Is this correct? Where do you keep it?

 

Maybe things would become clear if you show us your code?

 

(sorry, I currently don't have access to the web development environment, so somebody else will hopefully help you. Just trying to understand what you are actually asking)

0 Kudos
Message 4 of 7
(1,996 Views)

Hi altenbach,

 

I will start from the begining again. I have numbers coming from a mysql databse which a request using the HTTP GET Node via a URL which links to a PHP script. the PHP script get the data fromthe Table in the database which converts it to JSON. I then unflatten that data using the flatten from JSON node in my webvi. I then use the cluster properties node to then distribute the numbers to each numeric box on my webvi, which are of millivolts numbers. What i am wanting to acheive is to then change those numbers into a diffrent number. The number that i want it to change into represents Newton meters. I have created a list in excel which for every newton meter of torque i have a millivolt value against it. I want to create a lookup table with both the millivolt number and the Newton Meter number. i.e 3260 millivolts represnts 27 Newton Meters so in the lookup table x values would be the millivolts number and the y values would be the Newton meter numbers.

 

I have created this in a normal vi file but it was using labview 2014 and it worked.  i have tried this in Labview NXG but when i changed the numbers in the x and y boxes it get copied to the other 127 boxes. Is there a way of stopping the copy from happening or is there an alternative solution.

 

 I am very thankful in the replie i am receiving.

 

Kind Regards

 

Matt 

0 Kudos
Message 5 of 7
(1,928 Views)
Solution
Accepted by Matt14122017

I have created this in a normal vi file but it was using labview 2014 and it worked.  i have tried this in Labview NXG but when i changed the numbers in the x and y boxes it get copied to the other 127 boxes. Is there a way of stopping the copy from happening or is there an alternative solution.

 


Hi Matt, can you provide screenshots or example VIs? For example, in the following I am able to create an array of clusters of x,y numerics and give them different values:

 

arraycontent.gif


Milan
0 Kudos
Message 6 of 7
(1,915 Views)

Hello Milan,

 

Thank you for showing me a Demo. This is exactly what i was looking to acheive. I have implemented this into my Webvi and it is working.

I am getting to know labview NXG quite abit now and didnt know there was a seperate pallete for the diagram panel.

 

Thank you to yourself and all the other members of the coimmunity on helping me with my conumdrum.

 

Kind Regards

 

Matt

 

Message 7 of 7
(1,895 Views)