making something linear that isnt

Liam 28

Member
Join Date
Nov 2008
Location
Dublin
Posts
53
Hi all Im currently trying to use a a/d and a d/a on fx2n plc to turn on lights in a room when dark.Im using a ldr and a op amp and wheat stone bridge to convert the the change in light to a voltage.I know how to program the plc and a/d and d/a card but my problem is the scaling factor in the plc .I was asked to display the ouput from op amp on a display so im using sacda graph work32.My problem is that the lux or light which gives a change in resistance is not linear so when i try to compare counts in the plc to say voltage and display this on a screen im not sure how to approach this. there is a non linear realonship. This is where im stuck converting lux/counts to a voltage that is proportional to the change in light.Any guidance would be great.I had taught of tryinhg to implement chebychev in the plc to try and make it linear . but i think there is a better way as this will be diffcult to implement by math in the plc.I have graphed lux against resistans and the graph is in the shape of a L.Which has me thinking how can i make this linear.
 
Collect data points, put them in excel, create a graph, & use the trendline to generate a formula that approximates the data. Excel does fairly well at this, then use that formula in the PLC to calculate the light level.
 
I have points collected but when grahed it looks like a L not sure how to approamate that do i just pick part of the L if i do how will this be proportional to the lux changing.
 
Right click on the graph, & choose add trendline.
If you post the excel file, I can give you a hand.
 
Thanks ill upload what iv done . I have added trendlines to two seperate graphs one linear and the other expotential if im assuming it to be linear wiil this effect the scaling of the lux to voltage. I cant upload the file i select the file and it says invalid file when i pres upload i had this problem before i could not upload files is it because im using the site outside the USA.
 
I have not used Mitsubishi for years. Do they have a linear approximation function? Makes life really easy if they do - just set up a table and linearise it.
I work with tanks a lot and I reckon every PLC should have that function.
 
Hey Bob im not sure if it does but ill look in to it. I did not realize that a PlC could do that sounds like really handy function to have. Do you have any advice to approach it if it does not have the function.Any help would be great.
 
Liam, I use Omron and they have a function APR - it is a multi purpsoe function and does the linearisation really well.
I have never used any other method and would be unable to assist with how to do it unfortunately.
Love the function, made me lazy and I have never had to look for any other way of doing it.
 
No problem thanks for the info on function block its something I didnt know about before but i do know. It something I must look in to.
 
Liam it is not a function block but a fixed function that is provided in the PLC by the manufacturer.
 

Similar Topics

Hi, I have seen a few post with similar topics and I have tried contacting the authors however I have not had any luck so I am posting this new...
Replies
14
Views
1,010
Hi everyone I've created an FC that includes the blocks TCON, TDISCON, TSEND and TRCV. This block has to be as generic as possible across...
Replies
15
Views
1,511
Hi all, I have been working on a tool for my company that handles a specific task our company runs into often related to PLC's. This is a tool I...
Replies
15
Views
2,874
Hi, i need to make: 1- A PLC Program on Omron PLC CP2E-N using high speed counter E6C3-AG5B 360P/R 2M(Absolute) ,to Reject bottles on Conveyor...
Replies
4
Views
877
I was taught to go to Combined > Make Change > go to Offline > will prompt to save > Save > Exit out of program > will prompt to save again >...
Replies
0
Views
678
Back
Top Bottom