Sign in to follow this  
Followers 0
CoreyM

CP1W-AD041 test program

12 posts in this topic

I have wrote a extremely basic ladder program to test/troubleshoot if a analogue input card is properly functioning, it is only 2 lines of code, embarrassingly it doesn't seem to work... I am hoping by pure coincidence I just so happened to get a bad card to test my test program with The goal of this program is to input a voltage that varies between 1-4 volts to AI 0 and monitor the value change in CIO word 1 using the memory tool, all we want to verify is that the AI card is taking a analogue value and generating a corresponding digital value The second rung of my program is just to move that value to D100; so that the corresponding CIO word 1 value should be present in the D100 memory area as well I have verified that the voltage is in fact present at the terminals Vin1 and Com1 and properly varies between 1-4 volts I am using the CP1L-L14DR-D and the CP1W-AD041 for hardware Is there something wrong with what I am trying to do here? or do you think the card is bad? I have attached a copy of my .cxp file CP1W-AD041 Test Program.cxp

Share this post


Link to post
Share on other sites
I think your initialization words are invalid. For 0-10vdc the init word I am using is #80DD. Edit: I retract that statement! #80FF would be a valid initialization word for 0-5vdc/20ma. I looked at a couple of CP1L programs that I have here and I do not see anything obviously wrong with your test program. Maybe some something with the connections?? Edited by Mendon Systems

Share this post


Link to post
Share on other sites
What range do you want the analogue inputs to be setup for? +/-10, 0-10 or 1-5? I would recommend you setup for 0-10 if the source is a voltage. But, since it appears you have it setup for 1-5/4-20mA range, I would suspect that you need to link the Vin & Iin terminals. Also, as per the manual, you should wait min 200ms before trying to read after power up. I see you have used the 1sec bit, I would also put a timer in series with this that takes 200ms after power up to become true.

Share this post


Link to post
Share on other sites
Hey guys thanks for the replys the goal was to input a voltage from 1-4 volts to AI0 so it was intentionally set for 1-5v I verified with my fluke multimeter voltage was present at vin and com did not think to jumper the Iin as the manual said to do so for current inputs not voltage I thought.. I had the setup word tied to first cycle and I verified the proper hex value was registered perhaps I should of set a delay there but I did not think it was necessary though as I could see the value in the memory tool I thought the 1 sec would be enough with the mov command update: a engineer go his hands on it and got it working so the unit must work. He didn't tell me how though all he said was the wiring was fine...if someone could enlighten me as to were I went wrong would be greatly appreciated Edited by CoreyM

Share this post


Link to post
Share on other sites
One more thought on this issue ................... I believe you must wait about 250ms after the initialization word is set before you can read the analog inputs. It seems as though the P_1s clock pulse should inherently do that, but maybe it doesn't. Try adding a short time delay at startup before reading the input word. I include a startup timer in every program just to let things stabilize before making any rash decisions.
1 person likes this

Share this post


Link to post
Share on other sites
Silly question, have you enabled the input for the card in the I/O table?
1 person likes this

Share this post


Link to post
Share on other sites
Bob, It is a CP1L, it does not have to be enabled just the range code written & the 200ms delay implemented.
1 person likes this

Share this post


Link to post
Share on other sites
Ah - then it was a silly question - have not used one of those - assumed it was like the CJ card.

Share this post


Link to post
Share on other sites
Well, not exactly. The range code does enable it. If you don't turn on bit 3 or 7 in word (n+1) or bit 3 or 7 in word (n+2), the inputs are all disabled. So, in fact your question was valid and the answer is Yes, he enabled the inputs by writing the correct rage codes (and enable bits) into the addresses.

Share this post


Link to post
Share on other sites
Problem Solved The manual says to put a 200ms delay for initialization. I used the P_1s command thinking it is = 200ms * 5 so I should be okay This is not true even though the P_1s is greater than 200ms it will not work, as soon as I replaced the P_1s with a timer instruction it worked perfectly. The manual needs to be corrected, it should explicitly state that a timer function needs to be used specifically, not just a 200ms delay is required as that didn't work. They should have the foresight to realized there is more than 1 way to create a 200ms delay in their PLC and if there is only 1 correct use for the specific application they need to be more specific I emailed Omron's tech support twice and got no reply, this was the icing on the cake and what infuriates me most about the situation. I am very very upset the manual needs to be more specific and no one in tech support offered me ANY support at all, I got more help from this website than from Omron and you guys dont even make any money, it's their JOB to do this. I lost a MAJOR client over this debacle, Edited by CoreyM
1 person likes this

Share this post


Link to post
Share on other sites
This is unfortunate, but you only have yourself to blame.

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