Sign in to follow this  
Followers 0
Daine

CJ1W-MAD42

22 posts in this topic

Hi All I am having some issues trying to get some of my analogues working on this card. I am using a CJ2M-CPU12 cpu. Input 1 is Temp(0-10V) which seems to work alright. Input 2 is Level(4-20mA) which bounces a lot and does not settle on a value Output 1 is Speed(0-10) which I just can not get working. Regardless of the Value I enter I get 0.499V on the output. I have tried to setup output 2 the same way and still have the same problem. I have attached a sample of the code I am writing for you to view. Please, if anyone could assist. I need to urgently finish this machine now. Thanks guysAnalogue Test.cxp

Share this post


Link to post
Share on other sites
What values do you have in D110 and D111??? Is it wired correctly??? Terminal A1 (+) and terminal A2 (-) for voltage output. Also try changing the mean value processing setting to 64 buffers in the unit setup to calm down your noisy input.

Share this post


Link to post
Share on other sites
D111 is an HMI input value and is used when I do manual tests on the machine. I use D110 as the register to output my speed. I have checked my wiring over and over and it is correct. I will try the buffer. Surely if I disconnect the cables on my output, I should get some reading?

Share this post


Link to post
Share on other sites
Did you set the Voltage / Current Switch properly? See below: I am obviously referring to the Input side of your question (input 2 bouncing around and never settling).

Share this post


Link to post
Share on other sites
You are not getting an output because your are moving your Speed command into D2001. You should be moving it into 2001 in the CIO area (not the Data Memory area).

Share this post


Link to post
Share on other sites
Sorry. This is just a little program I wrote for my example. In my actual Program, it is MOV D110 2001. As for My inputs, the V/I switches are set accordingly

Share this post


Link to post
Share on other sites
Put a line of code in to turn on CIO2000.00. In other words, use the P_On bit to turn on output 2000.00. This is the analog output 1 enable bit for the MAD42.

Share this post


Link to post
Share on other sites
CIO Word 2000 should be set by the I/O Table & Unit Setup settings. You can check it by opening the Memory tab and monitoring CI0 2000. The value should be F3 hex to enable everything.

Share this post


Link to post
Share on other sites
Only the data memory addresses associated with the module (D20000 - D20099) are set in the I/O table. 2000.00 is the Conversion Enable output and does indeed need to be turned on in ladder. It is like the analog output "on/off" command.

Share this post


Link to post
Share on other sites
I put in a CIO2000.00 with a P_On but still no change in the output

Share this post


Link to post
Share on other sites
Restart the PLC as in cycle the power?

Share this post


Link to post
Share on other sites
Yes. Can you post your code (the actual code that you are currently testing)?

Share this post


Link to post
Share on other sites
Here is the actual Program. Please don't be to overly critical. First time writing code with Omron and self taught. The value of the output is in the Analogue sub-section of the code. It is speed output and the machine only does like a max of 10rpm and that's only at the end of the program. Also not to sure if I did my scaling correctly for both Input 2 and Output 1. My Input 1 seems to be working fine. The value that I use when in manual test comes from the HMI.PandL.cxp

Share this post


Link to post
Share on other sites
First of all, are you positive that you have downloaded the settings for the MAD42 to the PLC in the I/O table and then cycled power? The settings in the I/O table have the output scaled from 0 - 50. That is if you put a 0 in 2001, you will get 0 VDC and if you put a 50 in 2001, you will get 10 VDC. It looks as if you are moving the following values into 2001: #3 #6 #10 These three values should result in the following voltage outputs: #3 = 3 (integer), so 3/50 = 0.06. 0.06 x 10 VDC = 0.6 VDC #6 = 6 (integer), so 6/50 = 0.12. 0.12 x 10 VDC = 1.2 VDC #10 = 16 (integer), so 16/50 = 0.32. 0.32 x 10 VDC = 3.2 VDC If you had intended to use integer values of 3, 6 and 10, I would recommend using the & sign rather than the # sign. The # sign means constant BCD or HEX (therefore, #10 really means 16 (integer) in this case). & means unsigned integer constant. You have the Conversion enable bit turned on (2000.00), so it should be outputting the voltages above when each value is moved into D110. I am also assuming that your PLC is in Run (or monitor) mode and that the code that moves values into D110 is active and that a value is getting set to D110. From what I can tell, everything looks correct. That just leaves wiring. Are you checking / connected to the terminals highlighted below?

Share this post


Link to post
Share on other sites
Hi Daine Don't mix integer with real and remember that real take up to word ex. D150 and D151. And also MOV 70 d151 => moves the bits in CIO 70 to D151, MOV &70 d151 moves the 70 into D151. Hope this will help you Banker

Share this post


Link to post
Share on other sites
I have managed to get the Output working, eventually. My other issue. Input 2, constantly bounces in value. Possibility of faulty sensor as I goes no higher than 5mA. I am trying with a 0-10V Pressure sensor now but it goes all the way to 14.18V. I can not remember my voltage divider circuits in order to 0-14.18V to 0-10V. Please help.

Share this post


Link to post
Share on other sites
A 1K resistor in series with 420 ohms will get you really close!! Connect your 14 volt input across both resistors and connect the junction to your analog input. You should be able to get 1% (or better) resistors from an electronics supply.

Share this post


Link to post
Share on other sites
Tsk! Tsk! http://hyperphysics.phy-astr.gsu.edu/hbase/electric/voldiv.html

Share this post


Link to post
Share on other sites
For those of you that have had a look at the setup off my MAD-42 in the IO Table. Is my Input 2 setup correctly for 4-20mA

Share this post


Link to post
Share on other sites
Yes, but ..... I suggest that you change the mean value processing setting to 64 buffers. That should calm down your erratic readings somewhat by averaging 64 samples instead of just 2. 4-20ma is actually reading a 1-5 vdc level across a 250 ohm resistor. Noise on the incoming signal can cause erratic readings. Averaging a larger number of samples will calm that down.

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