Sign in to follow this  
Followers 0
PlcPopper

Omron CX-Programmer

5 posts in this topic

Hi guys and gals :), I am working on a CVM1-V2 processor. The programme as written uses the APR(142) function for scaling. I am confused as to the way the data is entered: - Example; The intention is to convert 0 - 100% (BCD) to 0 - 4095 (Hex) The control word used is nD290 with #4000 moved in to it. The data moved is as follows; #64 to nD291, #0 to nD292, #64 to nD293 and #FFF to nD294. This appears to function correctly, but if the manual is to be followed it would be like this; #0 to nD291, #0 to nD292, #64 to nD293 and #FFF to nD294. What am I missing or is there a quirk with this function? Ta Edited by PlcPopper

Share this post


Link to post
Share on other sites
APR is an arithmetic function that is normally used for sine and cosine calculations. It is also a linear approximation function and I have used it for that purpose quite a few times from an analogue input. Is that what you are trying to do? Not sure.

Share this post


Link to post
Share on other sites
yes Bob, I'm scaling the analog inputs for display on SCADA and scaling setpoints from SCADA for control etc. It appears the scaling function is not available in the processor I'm using.

Share this post


Link to post
Share on other sites
Not sure but might be worth looking if you have expansion function slots where you can map the SCL instruction. Else, do it the old fashioned way. Y = mx + b Scaled value = (input value x rate) + offset Rate = (scaled max. - scaled min.) / (input max. - input min.) Offset = scaled minimum - (input minimum x rate)

Share this post


Link to post
Share on other sites
The manual has always been wrong. The CS/CJ documentaion show the correct table for Control Word Table. D290=4000 Bit 14 determines whether the output is BCD or binary: OFF specifies BCD and ON specifies binary. Bit 15 determines whether the input is BCD or binary: OFF specifies BCD and ON specifies binary. D291=0064 0100 BCD D292=0000 0000 BCD D293=0064 0100 BCD D294=0FFF 4095 BCD

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0