omron cp1e read analog

tid_champ

Member
Join Date
Mar 2011
Location
bkk
Posts
30
hi everyone
i have CP1E CPU it have analog 2 CH I want to read the analog input and scaling to 0.0-200.0
please give examples of what to do.
Thank
 
The analog value comes in as 0-6000 so you need to divide it by 30 to get 0-200. Unfortunately the CP1E series has a very limited instruction set so there's not many options. Here's what you need to do.
1) Convert the analog point value to floating point using the FLT instruction.
2) Divide the converted value by 30 using the /F instruction.
 
you need to confirm what analogue you are using mA or V.
Also you are right Mendonsy
but I recomend you work out the calculations in fractions
as you said the smaller PLC's dont have much to offer.
so by simplifing to a fraction you can work around the Over Flow issue.
6000/200 = 60/2 = 30/1
I know thaat is the same but some equations will come down to
5/8 or 8/5
the PLC maths is easier
 
you need to confirm what analogue you are using mA or V.
Also you are right Mendonsy
but I recomend you work out the calculations in fractions
as you said the smaller PLC's dont have much to offer.
so by simplifing to a fraction you can work around the Over Flow issue.
6000/200 = 60/2 = 30/1
I know thaat is the same but some equations will come down to
5/8 or 8/5
the PLC maths is easier
4-20ma
 
the normal analogus input allows for 0 ~ 20mA
so you may need to ofset the 4mA it=nitil value
 
The CP1E also supports the APR function which is very good for scaling once you get your head around it.
This is a lot simpler that writing code to scale your inputs and then applying an offset, especially if you are converting from integers to real values (floating point) and back again...
 
Wonderful! Someone else who understands the APR function - I did not think there was anyone else around that did. Have searched for it ion other brands of PLC and never found it. Another of my very favourite functions is BCNT - bit count - great for alarm routines. Hard to find in other PLCs too.
 
Wonderful! Someone else who understands the APR function - I did not think there was anyone else around that did. Have searched for it ion other brands of PLC and never found it. Another of my very favourite functions is BCNT - bit count - great for alarm routines. Hard to find in other PLCs too.

Thanks BobB, I've written a couple of posts here probably about 2yrs ago in an attempt to explain the APR function as I don't think Omron has made it easy to follow in the instruction ref manuals. Yep, like the BCNT function for alarms also and an old favorite of mine is the STEP / SNXT state machine feature, again a little tricky to get started but marvelous when implemented.
 
Hi Woody - I used APR extensively on fuel tanks - on their side - belled ends - until there were some decent level sensors hit the market all programmed up and with Modbus RTU comms - have not used it for a while now. The linear approximation has saved from doing a heap of maths many times.
I do not use Siemens much so I am not aware of the functions you mentioned - it is always what you get used to.
 
The CP1E also supports the APR function which is very good for scaling once you get your head around it.
This is a lot simpler that writing code to scale your inputs and then applying an offset, especially if you are converting from integers to real values (floating point) and back again...
Please show an example.
 
In CX Programmer if you call up a function do net enter one - click on details - click on instruction help. this will bring up all the instructions available in the PLC.
Look for Special Maths - APR - click on APR - this will bring up pages of help for the instruction.
It does Sine, Cosine and Linear Extrapolation - you need Linear Extrapolation.
There are pages of help and explanations for different word types.
It is better than the manual.
Basically, you put together a table and the APR function performs a Linear Extrapolation.
 
It came from the old C200HS series - hard to find in most PLCs. I am sure people do not know how useful it is.
I cannot remember seeing an equivalent function in any other PLC but there may be one out there.
 

Similar Topics

Hello. I have a problem with omron sysmac cp1e controller delayed start. The controller has been working on the punch press since 2016. Recently...
Replies
1
Views
755
Hi, I need to communicate omron CP1E PLC with SCADA to get the status of the machine. There is no etherent port available but an empty expansion...
Replies
2
Views
1,593
Hello... I remove one CP1E from old useless machine and I would like to use it with something else....but it is locked/have no pass/....How can I...
Replies
0
Views
1,436
hi all i have used a real time clock to turn on a bit after 1 month. the plc was off for this whole month and when i turned on the plc after a...
Replies
2
Views
1,414
We had a CP1E go bad (power issue). Installed spare and could not get it to communicate to our motion drive via add on RS485 card. Tried...
Replies
5
Views
1,480
Back
Top Bottom