lookup-table data

danesh

Member
Join Date
Jul 2005
Location
Teh
Posts
88
Hi all
I have 2 analog signals that related with a table,

I have to reed this 2 analog input and than reed a value on the table and write it to display, any body help me?

I don’t know how reed data from look up table in plc programming.
 
Why use a look-up table in the first place? You should consider doing a scaling of the input value and write that to the display. Depending on what PLC you are using, there are many ways to accomplish this and it is much easier than messing around with look up tables.
 
randylud said:
Why use a look-up table in the first place? You should consider doing a scaling of the input value and write that to the display. Depending on what PLC you are using, there are many ways to accomplish this and it is much easier than messing around with look up tables.

Maybe his sensors are not linear.
 
I have to read 2 senseor(not 1 sensor) data (these are row and column of table) and then from table , looking up the result
 
...or it might be a case of measuring two properties two estimate a third unknown property. We often measure temperature and conductivity to estimate the concentration of detergent in a cleaning solution. In that case we use a special transmitter which can be programmed with a lookup table. The transmitter then sends a 4-20mA signal to the PLC to represent the concentration. I've never programmed a look-up table in a PLC before, but I am interested. What type of PLC are you using? Some PLC's have better instructions for manipulating lists of data.
 
very thanx
right , i need to estimate 3th unkown property,
1-if possibale let me know with what transmitter you done this task?
there are not plc, i might to select plc, in your point of view what is the best way to apporach this ?
 
I should imagine that there must be a reasonable (manageable) mathematical relationship between the two sensor readings thus producing the third piece of information.

Why not use a PLC capable of accepting analog inputs and then...
- read the inputs, then...
- scale those values to Engineering units, then...
- using the scaled values, do the calculation for the third piece of information, then...
- display the answer on the screen.

You shouldn't need to use a look-up table at all.
 
I might scale analog 1 say to 1 to 100 and then the same with analog 2. Then use indirect addressing to pull your data out.

SLC Example.

Analog 1, (Scale Values 1-100) Result Word Store in N9:0
Analog 2, (Scale Values 1-100) Result Word Store in N9:1

Have 2 files with your lookup data N11 & N12 each 100 words.

Then use indrect addressing for the lookup table.
N9:5 = N11:[N9:0) temporary storage for #1
N9:6 = N12:[N9:1) temporary storage for #2
 
It would help to know what two parameters you are measuring (eg temperature and humidity) and what third parameter you wish to derive (eg dew point). There may be a straight mathematical relationship eliminating the need for a look up table. The relationship may not be linear requiring a second or higher order equation.

If there is no mathematical relationship published then a lookup table will be needed. How big will it have to be? If each of the two parameters is measured from 0 to 99 then the table would have to be 10,000 entries. In other words the resolution of parmaeter1 times the resolution of parameter2.

Let's say that this relationship (each entry 0-99) is true. Then the location in the table of the third piece of data would be (table start address) + (parameter1 * 100) + (parameter2)

Does this help any?
 
Hi all
I have 2 analog signals that related with a table,

I have to reed this 2 analog input and than reed a value on the table and write it to display, any body help me?

I don’t know how reed data from look up table in plc programming.

Complete information on first post saves lots of speculation and ill advise!
 
I agree with Terry.... We have covered this before.

The solution is easy. Use the LINEST function of Excel to determine the function. Search this forum for the word LINEST. Then you can program this equation into the PLC using a compute block or something similar.

Tom Jenkins pointed this technique out almost two years ago. Since then LINEST has been mention serveral times.

This forum has a lot of information on it but what good is it if you guys keep forgeting that it is here?
 
I always thought LINEST was for y=mx+c only! I'll have to try this out and compare it with what our current methods. Thank you for refreshing our memories Peter!

I think there might be a case for adding a special section to PLCS.net. The "Everything you need to know, but can't be bothered to search for" section.
 
Oh dear I have jumped the gun slightly. LINEST only works for linear relationships. For example, if measuring the concentration of Sodium Hydroxide from conductivity and temperature. If you plotted a graph of concentration against conductivity at a fixed temperature, you would get a curve instead of a line. There will only be an approximate linear relationship at certain ranges of concentration. To be able to use the LINEST method it is necessary to restrict the measurement to only the linear sections.

Danesh,
What process value are you trying to measure? What analogue inputs do you have? Is there an approximate linear relationship between the values? Please give some more details so that we can help.
 

Similar Topics

Hello all, I am working on a project with an s7-1200 and I am controlling three stepper motors using this controller. I will be receiving input...
Replies
5
Views
2,388
Hi All, So I am using an Automation Direct BRX PLC (Do-More Designer 2.5), in which I need to calculate the Log Inactivation of Giardia. I am...
Replies
5
Views
3,594
Hello all, I need to do something and I'm not sure if it's possible.. some aspects I know how to do but not quite on the scale of this project. A...
Replies
5
Views
2,530
Hi guys, I want to program map tracking using factorytalk view site edition ver9. I have map which shows vehicle on it, the vehicle location...
Replies
1
Views
2,013
Hi all, I would like to generate a lookup table (Time vs Speed) or (Position vs Speed) in rslogix5000, and looking for some idea on how to...
Replies
20
Views
10,094
Back
Top Bottom