APR instruction
Hi All,
Thanks in advance for reading this post.
I am not sure if it is allowed to post a similar question in a reply thread but here goes.
I am trying to debug an OMRON CJ1M PLC program which converts analogue pressure sensor, connected in Main Rack 001 (CJ1W-MAD42) and having the input (4-20mA) into the equivalent Bar pressure.
To do this, the attached APR(069) function is being used.
The control word (at D4090) is: &49152 (Binary: 1100000000000000) which means that extrapolation settings are: BCD input and output, f(x)=f(S), unsigned data, and number of coordinates (m)=1.
For the coordinates, the data is:
D4091 = &9999
D4092 = &0
D4093 = &7296
D4094 = &240
Given the discrepancy between the values in registers D4091 and D4093, would the Xm = 7296 or 9999. And would the straight (extrapolation) line start from BCD(x=0,y=0) and end at BCD(x=2280,y=150).
I should also mention that the main purpose of my debugging is that currently the PLC outputs pressure as a whole number value (e.g. 1Bar or 7Bar etc). What I am hoping to achieve is to convert it to a more precise floating point value by implementing the extrapolation line and real-time conversion.
Many thanks (and apologies for the long question)
FT