thoresonr

cp1h analog to digital and back again

9 posts in this topic

Hello, im new to this forum. I've been messing around with OMRON plcs for 5 or 6 years, but never fully made a program from scratch. I'm using a CP1H-XA-40 (relay input/output). I cant quite seem to figure out what the actual input addresses are. I figured out that the outputs are Q100.00 and so on, but that's all ive gotten so far. I am trying to use a NB5W HMI screen to communicate when to program is finished but I never used NB designer at all, and frankly I dont know what im doing there either. I've been tasked to use the plc mentioned above to operate a hydraulic test stand. I have all the wiring completed. As far as the analog to digital, I have two inputs both 0-10vdc. I dont know what bit to use for these. Same for the outputs. Any help is greatly appreciated! Thor

Share this post


Link to post
Share on other sites
The CP1H-XA40 analog inputs are CIO addresses 200-203. The outputs are 210 & 211. The analog I/O description is in section 5-5 of the W450 manual

Share this post


Link to post
Share on other sites
Thanks, that helped. What type of function do i use to interpret the analog signal? it is 0-10vdc

Share this post


Link to post
Share on other sites
You could scale it using this function block: http://forums.mrplc.com/index.php?app=downloads&showfile=996 The input resolution for the built in analog input on the CP1H is 1/6000 or 1/12000.

Share this post


Link to post
Share on other sites
How do I make that function block? I've never made a FB before. Or is there one premade in CX-Programmer? I have the CX-lite version for this CP1H

Share this post


Link to post
Share on other sites
which one do I hook up the outputs to on the FB? I made it just like your example, but should it go to a MOV for the output? If so, is it the INT or WORD one?

Share this post


Link to post
Share on other sites
It depends upon what format you want the scaled result in. If you want an INT format, use the INT, if you want BCD, use Word. Not likely that you want BCD, so use INT. The other option is real format (or floating point) which can provide decimal values like 2.734 after the scaling.

Share this post


Link to post
Share on other sites
that FB really helped, thanks! New question. I finally got my servo valve to work (long story short, motor was wired backwards and no pressure). My Input to my FB and servo card reads 0-10 volts, but the servo card output needs a + and - to drive in different directions. So far I can drive it down, but have to shut it down and reverse signal wires to drive back up again. Is there a function block or parameter i can change that will give me a negative voltage output? Thor

Share this post


Link to post
Share on other sites
The CP1H analog outputs do have a +/-10v setting. You should be able to use that, but I don't know if the function block will support a negative output value. That setting will change the range from 0-6000 to +/-3000 (or 0-12000 to +/-6000).

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