You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old October 6th, 2012, 03:22 AM   #1
sovad
Member
Australia

sovad is offline
 
Join Date: Sep 2012
Location: melbourne
Posts: 6
Another Analogue Input Problem (Sorry) Omron CX-Programmer

Hi there,

PLC in question: 240VAC Omron CP1E-NA20DR-A
Features: 12 inputs 2 of which analogue, 8 outputs 1 of which analogue

My question is in regards to using an analogue input.

Starting with the manual procedure for installing an analogue input:



1) So I began with setting up the analogue input; AD 0CH, Range 0 10V, Use averaging (as suggested):



2) Wire up device, this is my current wiring diagram:



3) Write the ladder diagram, I have a more sophisticated program prepared but I thought Id simplify things in order to check everything is working properly:



In this program I am trying to read an analogue input from an ultrasonic sensor with a 0 10 VDC output (AD#0 Raw Hex) and convert it to floating point so I can do additional arithmetic. The source word address should be correct as it specifies in the manual that AD0 data is stored in CIO 90. Then I want to store this initial reading in memory D5.

This is what the program looks like when it is running:



As you can see the source word is 0000 Hex but it should have a reading between #0000 and #FFFF. I have checked the ultrasonic sensors output with a multimeter and I do get a reading between 0 and 10.25 VDC depending on the distance.

I have tried a number of things to make this work but Im out of ideas. If you have any suggestions as to whats going on and why this is not working please let me know.

Thanks in advance
  Reply With Quote
Old October 6th, 2012, 03:32 AM   #2
BobB
Lifetime Supporting Member
Australia

BobB is offline
 
BobB's Avatar
 
Join Date: Jun 2002
Location: Sydney
Posts: 4,420
Silly question, did you transfer the settings to the PLC?
__________________
The Old Pfhaart

  Reply With Quote
Old October 6th, 2012, 03:34 AM   #3
BobB
Lifetime Supporting Member
Australia

BobB is offline
 
BobB's Avatar
 
Join Date: Jun 2002
Location: Sydney
Posts: 4,420
Another thing - conversion will not take place unless the PLC is in run or monitor mode.
__________________
The Old Pfhaart

  Reply With Quote
Old October 6th, 2012, 03:36 AM   #4
sovad
Member
Australia

sovad is offline
 
Join Date: Sep 2012
Location: melbourne
Posts: 6
If this is what you mean by transfer Bob



Thanks anyway
  Reply With Quote
Old October 6th, 2012, 03:38 AM   #5
sovad
Member
Australia

sovad is offline
 
Join Date: Sep 2012
Location: melbourne
Posts: 6
I also have the PLC in Run Mode. Ta.
  Reply With Quote
Old October 6th, 2012, 03:43 AM   #6
sovad
Member
Australia

sovad is offline
 
Join Date: Sep 2012
Location: melbourne
Posts: 6
The input led is not lighting up when the analogue input is connected, I don't know if that helps but I would think it should light up upon applying a voltage.
  Reply With Quote
Old October 6th, 2012, 05:11 AM   #7
BobB
Lifetime Supporting Member
Australia

BobB is offline
 
BobB's Avatar
 
Join Date: Jun 2002
Location: Sydney
Posts: 4,420
You need to transfer the analogue configuration settings from the PLC settings screen as per your first post.
I always set the mode to monitor in settings as well before downloading to the PLC as if the PLC is re-powered it will then run in monitor mode and allow online programming changes.
__________________
The Old Pfhaart

  Reply With Quote
Old October 6th, 2012, 04:33 PM   #8
Lancie1
Lifetime Supporting Member
United States

Lancie1 is offline
 
Lancie1's Avatar
 
Join Date: Jul 2003
Location: Alabama
Posts: 9,999
Quote:
The input led is not lighting up when the analogue input is connected,...
As you can see the source word is 0000 Hex but it should have a reading between #0000 and #FFFF.
These are indicators that your analog input is not connected correctly to the PLC (or is not working but you tested for that). Double-check your wiring instructions for the ultrasonic sensor. You could have 2 of the 3 wires switched. Make sure that the Ultrasonic sensor +Vin terminal has not accidently got swapped with +Signal Out.

Last edited by Lancie1; October 6th, 2012 at 04:36 PM.
  Reply With Quote
Old October 6th, 2012, 08:30 PM   #9
mendonsy
Member
United States

mendonsy is offline
 
mendonsy's Avatar
 
Join Date: Feb 2009
Location: Western NY
Posts: 783
Quote:
Originally Posted by sovad View Post
If this is what you mean by transfer Bob



Thanks anyway
After you select "transfer", another screen will pop up with a list of what to transfer. Be sure that the "settings" check box is selected. After you do the settings transfer, you must cycle power to the PLC before the settings will take effect.
  Reply With Quote
Old October 6th, 2012, 11:48 PM   #10
sovad
Member
Australia

sovad is offline
 
Join Date: Sep 2012
Location: melbourne
Posts: 6
Hi there,

I have checked that the settings are being transferred through both the setting screen and the PLC transfer sub menu. I have also done a transfer from the PLC and the settings have been changed. After any changes I always turn the PLC off then on again. As for the wiring, I'm quite sure it is correct because I have been checking the voltage output at the PLC terminals and I do get a change in voltage between 0 - 10 VDC depending on the distance.

I'm not sure if it is an addressing issue or some settings issue or what really. It seems that the analogue input on the PLC is just not activated.

Thanks again
  Reply With Quote
Old October 7th, 2012, 02:24 AM   #11
BobB
Lifetime Supporting Member
Australia

BobB is offline
 
BobB's Avatar
 
Join Date: Jun 2002
Location: Sydney
Posts: 4,420
Post a shot of your I/O table - that will show the addressing.
Also enable 'break detection' for the input and if there is a perceived break the error light will come on on the card.
__________________
The Old Pfhaart

  Reply With Quote
Old October 7th, 2012, 09:50 AM   #12
sovad
Member
Australia

sovad is offline
 
Join Date: Sep 2012
Location: melbourne
Posts: 6
I got it working. I'm not sure exactly what it was but I re did everything from scratch and it starting working (yes!). One thing I did notice though was that the MOV function does not work how I thought. I thought it moved and stored a word in a particular location in memory until told otherwise but instead it only moves the location. I think this can be changed by putting an @ symbol in front of it but it was just something I noticed.

Thank you for your time everyone, it's good knowing I have some back up.
  Reply With Quote
Old October 7th, 2012, 11:56 AM   #13
Banker
Member
Denmark

Banker is offline
 
Join Date: Dec 2005
Location: aarslev
Posts: 81
Hi
Use movf or movl ( move 32 bit ) as you hav a real.
  Reply With Quote
Old October 11th, 2012, 12:05 AM   #14
_Woody_
Member
New Zealand

_Woody_ is offline
 
_Woody_'s Avatar
 
Join Date: Jan 2008
Location: Auckland
Posts: 118
You cannot use the move function for floating point values in the CP1E.
The MOVF (which would be perfect) is not available in the CP1E instruction set.

The best way I have found is to use the floating point ADD function and add the value of 0 to store the variable in a new loacation.

Capture.JPG

Hope this helps.
__________________
The answer exists - to truly understand it first understand the question - PLATO.
  Reply With Quote
Old February 12th, 2014, 01:46 PM   #15
mamentozz
Member
Indonesia

mamentozz is offline
 
Join Date: Nov 2013
Location: palembang
Posts: 30
Quote:
Originally Posted by Lancie1 View Post
These are indicators that your analog input is not connected correctly to the PLC (or is not working but you tested for that). Double-check your wiring instructions for the ultrasonic sensor. You could have 2 of the 3 wires switched. Make sure that the Ultrasonic sensor +Vin terminal has not accidently got swapped with +Signal Out.
this is the same problem with me lancie
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
1762-IF2OF2 Analog Input Problem davidgay LIVE PLC Questions And Answers 22 August 14th, 2013 05:25 AM
Omron Analog input problem abot LIVE PLC Questions And Answers 4 April 16th, 2012 05:05 PM
Omron cx programmer DIFU and DIFD, one-shot instruction kokomel LIVE PLC Questions And Answers 4 June 24th, 2011 12:14 AM
Blown analogue input... Siemens cpu userxyz LIVE PLC Questions And Answers 2 December 14th, 2010 07:59 PM
having hard time on cx programmer addressing:( theripley LIVE PLC Questions And Answers 10 August 7th, 2008 04:12 AM


All times are GMT -5. The time now is 06:00 AM.


.