Omron CJ2M and MAD42 analog card help

James Mcquade

Member
Join Date
Oct 2007
Location
Nashville, Tennessee area
Posts
3,683
Hi all,

While i am not new to omron, i'm totally new to the analog part and lost.
i have a CJ2M cpu 33.
then there are 4 i/o cards
card 5 is a MAD42 Unit 00
card 6 is an ETN21
my i/o config for the analog card indicates word D20000 as word 0
what i am trying to do is this.
Analog outputs 1 & 2 are enabled. Analog inputs 1 & 3 enabled, 2 & 4 are Disabled
Output 1 is 0-10 volts. Output 2 is 1-5V/4-20ma.
Input 1 is 0-10 volts. input 3 is 1-5v/4-20ma
i need to move 83 decimal (53 hex) to word D20000
i need to move 8457 (2109 hex) to word D20001.
how do i move 8457 (2109 hex) into word D20001? everything when i go online says 083D hex in the bottom.

also, what is the next steps to get the analog card working? i have the mad42 manual, but i'm getting confused.
do i also download and click the the special Unit Setup button?
when i do, i get the error message "Failed to download the Special Unit Setup" and then download failed

thanks in advance,
james
 
Is this a new or old setup.?
Are the first 4x cards discrete IO.?
What is not working.?
You don’t have to do the moves as the same can all be set via the IO table, is just a legacy practice (and what is in the manual..)

Can you post you CX-P file (without code if a problem)..
 
Failed to download unit setup I can’t recall why that occurs, but the download does not usually fail.
You should be able to download program, then go online & go to the IO table, create, transfer unit setup (assuming the parameters have been set)
 
lostcontrol,

this is a plc trainer board in my office that we test on. the actual machines are in the plant and i cannot post the code. the first 4 cards are basic inputs and outputs. I took a lunch break and started over and I am using the book example and hope to find the issue.
Analog outputs 1 & 2 are enabled. Analog inputs 1 to 4 are Enabled. This is unit 1
So the first config word is D20100 and contains 0000000011110011 decimal 243 hex F3. this is the i/o usage word if i understand things correctly
Output 1 is 1-5 volts, Output 2 is 4-20ma
Input 1 is 0-5 volts, Input 2 is 0-10 volts, Input 3 and 4 are 4-20ma
So the second word D20101 contains 1010011000001001 which is decimal 42505 hex A609. Thus is the usage config word.
I am keeping the conversion resolution to 4,000 so word D20118 is 0
Word D20135 sets the voltage and Current ranges for the i/o. it contains 0000000011000010 which is decimal 194 hex C2
My program is this
Power_ON mov &243 D20100
Mov &42505 D20101
Mov &194 D20135
I have no errors.
Do I have to do this or can I use the config block in the i/o setup section for the card?
My questions now are what the CIO registers are for and how to use them, How to get data into registers that I can see and use, then getting the outputs to work.
The manual is very scattered and not in order in my opinion and I am struggling. Yes, these are newbie questions and I do apologize, but we are needing to make changes to the production lines asap.
I am going to read and study in the mean time, but i hope to hear back from all members.
thanks,
james
 
@James, Download failed usually occurs when you try to download and have incorrect firmware revisions of cards.
First thing to do would be go online to processor. Open the "IO Table and Unit Setup". Then transfer the setup from the PLC to your computer. After this you can open up the analogue card setup and make the required changes then download back to the PLC.
From the IO Table setup you will see the CIO locations of the relevant cards in the [] Square brackets.
 
i cannot post the code
If it is a trainer board, why not ? Why not remove all the routines etc & just the basic config.


Do I have to do this or can I use the config block in the i/o setup section for the card?
you should be able to use the IOSetup section of the card.

My questions now are what the CIO registers are for and how to use them
They are for some of the setup & also the raw data.
In you setup, CIO2015-2018 will be the input values & CIO2011-2012 will be the output values
Ive just noticed some scaling parameters which am unfamiliar with as have not used a MAD in some time but will check the manual.

we are needing to make changes to the production lines asap.
What sort of changes, are you adding analogs hence this specific line of enquiries?
 
Last edited:
ok, so scaling can be performed on the card for the MAD42.

When upper and lower limits (within a decimal range of −32,000 to 32,000)
have been preset in 16-bit binary data (from 8300 to 7D00) in the CPU Unit’s
DM Area, analog input values can then be automatically converted into a
user-specified unit following A/D conversion, with the upper and lower limits
taken as full scale based on that resolution value. (See note 1.) This scaling
function eliminates the previous need to provide programs for numeric conversion into specified units. It is only enabled, however, for a conversion time of 1
ms and a resolution of 4,000 (and not for a conversion time of 500 µs and a
resolution of 8,000)
My take on this is that if the limits are <> 0, then scaling will be applied.
If == 0, then the raw value 0-4000 will be used.
 
no drama, just trying to help as much as possible.
If i was more competent, I would be pasting screen shots etc.
What values are in the CIO2015-2018.? Have you verified the analog value with a meter?
You should also be able to write 2000 to 2011 & get +5V on the module.
What about the DIP switchs on the back?
If this is a new setup, then perhaps they were overlooked?
 
switch 1 & 2 are for voltage, 3 & 4 are for current.
was doing trial and error at the end and really guessing.
here is the program, and i really appreciate your help.

i tied an ultrasonic sensor to input 2 and it worked, you can see my monitor page when you open the program.
what i have not understood is what the CIO registers do, i am still reading.
also what registers are used for other analog cards. we have them defined as unit 3,7, and 9.

then next thing i need to do is the scaling and then the offset part.
i wished that omron would put an entire example in their manual that had voltage and current. that would save everyone a lot of grief. i watched a lot of youtube videos in various languages, none in english.

again, thanks for your help
 
Looks ok to me.
i tied an ultrasonic sensor to input 2 and it worked, you can see my monitor page when you open the program.
You mean there was a signal on the terminals & a value registered in CIO2016/D101?

what part is still not working?
 
Function block doesn't include ability to clamp high/low on disconnection. Most Omron analogue modules output 0x7FFF on disconnection.
You are correct - I write code for all that stuff including numbers going in reverse if the input is below 4ma.
 

Similar Topics

Has anyone done SMS messaging from an Omron CJ2J-CPU31 PLC? If so could you help please. Omron here in Oz have not had any experience doing this...
Replies
5
Views
145
I have an old plc in the system I have, moxa nport was used to communicate with scada, I want to replace the plc with cj2m cpu33 and eliminate...
Replies
1
Views
63
Hi all, i have 8 CJ2m plc units that show different numbers on the plc display and i am stuck on reading the info. my unit has an ip address of...
Replies
3
Views
102
I have PLC Omron CJ2M with OD211 module. I want to use the pulse output and PWM output and this module. But i confuse how to activated this, i...
Replies
0
Views
113
I have a project to control the speed of motor DC using PWM Output on PLC and when im on working i have a several trouble and of of them is the...
Replies
6
Views
220
Back
Top Bottom