Teaching Analog basics

steelm

Member
Join Date
Jan 2004
Location
Ogden, UT
Posts
18
First off, great site!! I do have some expierence with PLC's and want more.
I am trying to find ideas for learning the basics of Analog control.I have a 5/03 processor and a 1746-NIO4I card.
Does anyone have any suggestions?
I origionally thought about using a variable resistor for input and a LED for out, but I would like to find other ideas.
Any help would be greatly appreciated.
 
This may help with some of it:
http://www.patchn.com/plc_analog.pdf

As far as a test system that should be simple, you will need a dc power source, a potentiometer and a dc meter. You use the potentiometer to send a 0-5vdc, 0-10vdc, etc or to the anlog input. Create the ladder to give a corresponding analog output for the dc meter to read. Example: 0-5vdc in, meter reads 0-5vdc out. 0-5vdc in, meter reads 0-10vdc. Change the input value and the output values around to learn ways to manipulate the data.

Just have fun with it and experiment BUT read the manuals and verify ALL wire connections and voltage sources are proper.
 
Last edited:
Thanks rsdoran for the quick response. In the logic, would you use the Scale with Parameters (SCP) instruction or...?
I hate to bother you with time, but a programming example would be great.
 
yes, use SCP, the numbers from the analog card will vary depending on resolution...ie 0 to 4096, 0 to 16767 etc. SCP allows you to convert this to whatever values you need in the program. Example: If using an HMI and want to show the input values from 0 to 10vdc then set it to scale to 0-10vdc.

Note: IN my example with the meter you may not need to scale the output to work with the input if the values are equal. If you are working with 0-10vdc input and output you can just move the incoming values to the output word file.

Give me an hour or so an I will post a picture example.
 
FYI: The SCP instruction doesnt work with all processsors, there is also an SCL instruction.

Example 1:
I have a 4-20 milliAmp analog input in slot #1 (3277 - 16383) for a process variable and I am trying to control a 4-20 milliAmp analog output (6242 - 31208) in slot #2.
My set point range is 0 - 200.

This rung will scale the input for the Process variable which must be
in a range of 0 - 16383
Code:
|                                                         +SCP---------------+ |
|---------------------------------------------------------+SCALE W/PARAMETERS+-|
|                                                         |Input        I:1.0  |
|                                                         |             16383| |
|                                                         |Input Min.    3277| |
|                                                         |                  | |
|                                                         |Input Max.   16383| |
|                                                         |                  | |
|                                                         |Scaled Min.      0| |
|                                                         |                  | |
|                                                         |Scaled Max.  16383| |
|                                                         |                  | |
|                                                         |Scaled Output N7:6| |
|                                                         |             16383| |
|                                                         +------------------+ |


 The PID instruction itself must be scanned all of the time.
 In this example it is in timed mode, so it is scanned by
 the ladder logic constantly.




|                                                    +PID--------------------+ |
|----------------------------------------------------+PID                    +-|
|                                                    |Control Block     N10:0| |
|                                                    |Process Variable  N7:6 | |
|                                                    |Control Variable  N7:50| |
|                                                    |Control Block Length 23| |
|                                                    +-----------------------+ |


 This rung scales the output of the PID to an analog output module.
 The Control variable is always in a range from 0 - 16383.


  
|                                                         +SCP---------------+ |
|---------------------------------------------------------+SCALE W/PARAMETERS+-|
|                                                         |Input        N7:50| |
|                                                         |             16383| |
|                                                         |Input Min.       0| |
|                                                         |                  | |
|                                                         |Input Max.   16383| |
|                                                         |                  | |
|                                                         |Scaled Min.   6242| |
|                                                         |                  | |
|                                                         |Scaled Max.  31208| |
|                                                         |                  | |
|                                                         |Scaled OutputO:2.0| |
|                                                         |             31208| |
|                                                         +------------------+ |


 
This rung scales the setpoint Min and setpoint Max and sends it to
word 2 of the Control Block in the PID instruction.


  
|                                                         +SCP---------------+ |
|---------------------------------------------------------+SCALE W/PARAMETERS+-|
|                                                         |Input        N7:80| |
|                                                         |             16383| |
|                                                         |Input Min.       0| |
|                                                         |                  | |
|                                                         |Input Max.    200 | |
|                                                         |                  | |
|                                                         |Scaled Min.      0| |
|                                                         |                  | |
|                                                         |Scaled Max.  16383| |
|                                                         |                  | |
|                                                         |Scaled OutputN10:2|
|                                                         |                  |
|                                                         +------------------+ |
 
I am not sure what slot etc you card resides in, it the above example the analog input was in slot 1 and use I:1.0 as the address for the first analog channel. I setup a system in RSLogix with a 5/03 with the card in slot 3, I:3.0 for the first analog input address and O:3.0 for the first analog output address.

If you have the option to connect a voltage source of 0 to 10 volts and use a meter to check the output then try just moving the input readings to the output, naturally they both need to use 0 to 10vdc for this to work.

I made a simple example to show this, note I do not have a 5/03 to play with so you may have to modify things. The first rung has a bit that is always ON, the bit does not have to be on if not needed to update the process all the time. The MOV should move the data from the input to the output and they be proportional, overall.

The SCP could also do this, in my example I scaled it to 0 to 10, maybe to display the input value on an HMI. Lets say you want the 0 to 10 input to output 0 to 5vdc, just change the Scaled max to 8383.

Anyway here is the very simple drawing:
Where are all the AB guys?

plcanalog.jpg
 
quick start ...

rsdoran has given you some excellent advice ... but here's a simple idea that might help you get started until you get a chance to hook up the potentiometer and meter that he recommended ... just use two wires to connect the output of the module “right back around” to an input on the same module ... that way you can start experimenting with the basics of analog signals right away ... you’ll definitely need more "toys" than this before long ... but it’s a quick way to get started ... once you've got it connected, go to the output address and send out a signal of a certain value ... it should show up at the input address ... now try to scale the values using the tips that rsdoran has been recommending ...

something to keep in mind about the 1746-NIO4I module that you say you have ... you're lucky to have a "combination" module ... this one has two analog inputs ... these can be individually set up for current or for voltage signals ... it also has two analog outputs ... these can ONLY be used for current outputs ... be sure that you wire accordingly ...

in case you haven’t found it yet, the book for this (and other SLC analog modules) is located at:

SLC 500 Analog I/O Modules User Manual

good luck ...
 
Last edited:
This is soo cool!!
I am not worthy ;)
I'll give it a whirl.
I also found a VFD to play with.

Thanks a TON for your help and time

steelm
 
If you also have an analog output card you could loop the output signal to the input provided the types are identical. I do this when I test analog processing and control strategies like PID processing or cascade and feedforward controllers. No need for additional hardware.
 

Similar Topics

In another thread, one of the forum members was threatening to 'throw his toys out of the pram' :-) . Translated, he got a bit upset because he...
Replies
35
Views
7,407
Hi, I am a college student on industrial instrumentation program. Learned Schneider PLC programming at school and trying to extend it to Allen...
Replies
19
Views
5,421
I know we have some full-time instructors in this group, and I'm sure many of you teach informally on the job, so I was wondering if there's any...
Replies
6
Views
2,943
I've been using an IAI Robo Cylinder RCM-T Teaching pendent for about 1.5 years.. suddenly, in the middle of setting some points, the screen...
Replies
0
Views
1,548
I've been using an IAI Robo Cylinder RCM-T Teaching pendent for about 1.5 years.. suddenly, in the middle of setting some points, the screen...
Replies
4
Views
2,834
Back
Top Bottom