RSlogix500 + SCP = ???????

bikerdude

Member
Join Date
Jul 2003
Location
Indiana
Posts
315
Hi All,
I'm new to this forum, so be gentle! HaHa
I have been working with AB SLC500 for a few years. I have only had the introduction course from AB. Our regular programmer died a few months ago and I have inherited the duties. So here goes....
I am attempting to setup a temperature controller on our can warmer. We make soft drinks. The product is filled as cold as possible. Then the conveyor carries it to the can warmer where it is warmed to room temperature so the cans won't "sweat" on the line. I have a SLC50/4 with a NIO4I module. I put in a rung with a SCP (scale with parameter) instruction. This is for the RTD temperature device that measures the tank water temperature. 4-20 ma device.
+--SCP---------------+
input = I:06.0
input min. = 3277.0
input max, = 16384.0
scaled min. = 0
scaled max. = 250
output = F10:0
+--------------------+
I want to save the scaled value to a file so I can do other things with it. ( Move,compare, etc..) Here lies the problem. The F10.0 value is always 0. Shouldn't the SCP instruction move the scaled value there? I had to create the F10 data file (floating point). Maybe I didn't do that right? Is F10.0 a 16 bit word? I can see the I:6.0 value change with the process. This is all I can remember about it. I am at home now, so I can't read the SLC from here. It is really buggin me! Any advice would be greatly welcomed.
TIA BD :)
 
First of all, the SCP must be executed to give you a result in F10:0. Make sure the rung that contains the SCP is coming true and that the LAD file that the SCP is in, is actually being scanned.

I haven't worked with an analog input card in a while, how did you come up with the input min and max values?

"F" files are 32-bit floating point registers, but that doesn't matter. It is legal to move integers (16 bit) into floating point destinations (32 bit) 250=250 whether in a 32 bit or 16 bit location.

When viewing I:6.0 in the data table, switch the "radix" to decimal and you will see the "real" value of the analog input (RTD).

If the SCP is being scanned and true, and the above values are accurate, then the actual data coming from I:6.0 is not even reaching 3277, it must be below that.
 
You have the scaling values correct. Here are the values for the manual.

Voltage/Current Integer
Range Representation
--------------- -----------------

–10V dc to +10V dc –32,768 to +32,767
0 to 10V dc 0 to 32,767±10V dc
0 to 5V dc 0 to 16, 384
1 to 5V dc 3,277 to 16,384
–20 mA to +20 mA –16,384 to +16,384
0 to 20 mA 0 to 16,384±20 mA
4 to 20 mA 3,277 to 16,384

You say you can see the input value changing. Are you looking at the value in I:6.0 in the PLC, or are you looking at the value on a meter.

The 2 analog inputs are selectable for voltage and current via dip switches. Have they been set up.

1746_nio4i.jpg
 
93lt1,
Thanks for the help!

"Make sure the rung that contains the SCP is coming true and that the LAD file that the SCP is in, is actually being scanned."

There are no conditions on this rung just the SCP instruction.
So I guess the rung is true.
I added a new LAD file (#3) just for this analog stuff. How do I tell if it is being scanned? Why would it not be? Does the previous LAD file (#2) need an instruction to make it "jump" to this LAD file?

"how did you come up with the input min and max values?"

I pulled them from the AB booklet for this series of analog modules.
i.e, 4-20 or 0-10v or 0-5v inputs need different input min. max values.

"When viewing I:6.0 in the data table, switch the "radix" to decimal and you will see the "real" value of the analog input (RTD)."

I did this. Value was around 8000 at 93 degree F. I put the probe tip in a cup of ice and got a value of 5000. I held a cigarette lighter on it and got a value of 10,000. Seems to work on the input table.


Thanks again BD :)
 
Kim Gold,

Great info!
I was looking at the data table while "online" with the laptop computer. I use RSLinks.

SW-1 set to "ON"
SW-2 set to "ON"

I did get that far in the install manual, Hee Hee!
BD :)
 
bikerdude said:
I added a new LAD file (#3) just for this analog stuff. How do I tell if it is being scanned? Why would it not be? Does the previous LAD file (#2) need an instruction to make it "jump" to this LAD file?

Bingo!... :nodi:

You need to add a JSR in File #2 to call file #3. This JSR instruction can be unconditional, but it has to be there regardless. Otherwise your File #2 is just sitting there doing nothing (as you've noticed)... :p

Add that and you should be all set! (y)

beerchug

-Eric
 
Erik,
BINGO! We have a Winner !
I am such a bonehead! I have lots of SLC's with multiple LAD files. I
I never noticed the JMP thing. So The JMP needs to be right before "END" rung of previous LAD file.
I can handle that, I think.

Thanks BD :) Great Forum!!! I am off to watch a movie. My mind is at ease now.
 
Last edited:
why JSR when JMP valid?

JSR is for use with subroutines?...correct? Cant they be within any file?...ie in file 2 but only run when certain conditions are met?

JMP would make it "goto" wherever the "file" or "routine" is correct?

In this case he put the analog in its own file...file 3 and needed the main file (file 2) to goto it...correct?

I am just looking to clarify when one is better than the other. Personally the JSR instruction is very confusing.

The following is a quote from RSLogix Instruction Setfor JMP:
Use with processors
All SLC and MicroLogix processors
Example of Instruction (Parameters shown are examples only, your data will vary.)
Description

When the rung condition for this output instruction is true, the processor jumps forward or backward to the corresponding label instruction (LBL) and resumes program execution at the label. More than one JMP instruction can jump to the same label. Jumping forward to a label saves program scan time by omitting a program segment until needed. Jumping backward lets the controller execute program segments repeatedly.

Note Be careful when using the JMP instruction to move backwards or loop through your program. If you loop too many times, you may cause the watchdog timer to time out and fault the processor. Use a counter, timer, or the program scan register (S:3, bits 0-7) to limit the amount of time you spend looping inside of JMP/LBL instructions.

Entering Parameters

Enter a decimal label number from 0-999. You can place:

Up to 256 labels for SLC controllers in each subroutine file (not to exceed 256 labels in entire project).
Up to 1,000 labels for MicroLogix controllers in each subroutine file (not to exceed 1,000 labels in entire project).



Rockwell Software 2000
 
Last edited:
My Opinion:

The JSR is a subroutine call...Jump To SubRoutine.
I think that any need to scan a subroutine should be done with the JSR. If I was troubleshooting and needed to know if a LAD file were being scanned the first thing I would do is search for JSR's. It would take a little extra thought on my part to search for the JMP's.

The JMP instruction requires the use of a label. I see it being more for JMP's within a particular LAD file.

I don't believe it makes much difference how you do it. The JMP/LBL seems to be a little more flexible, because you can jump forward or backwards in the same routine. Both can be conditional and both can be in any LAD file.
 
93: Yes, typo... 🙃

Ron: Don't start confusing bikerdude with facts!... :D

bikerdude: Use a JSR, not a JMP. When you get around to learning about the JSR instruction you'll see that it doesn't always go "right before the END rung", but go ahead and put it there anyway (in File #2 of course!).

beerchug

-Eric
 
👨🏻‍🏫
Great POST so far. Last step CALIBRATE

Cause an 4ma signal to the Analog input card. Use signal injector if you have one, if not there are other ways.

4ma input is the lowest reading and shoud match the value stated in other Posts. The Output value should be 0 (zero). by the way just use and N file for the output because there is no need for the floating point F file it is way to much resolution for temperature.

NOTE-- I am assuming you want the range to 0 to 250 deg F.

then input 20ma which should then match the value for MAX input,
and the Output value should read or be 250.

*** A good way to do this is with a resistance decade box in place of the RTD. Find a table which will list the Resistance for your RTD at 0 deg F and 250 deg F. Dial those two value in one at a time and this should cause your Transmitter to output the 4ma and 20 ma signal.

Hope you can follow what i am saying, If not I'll clarify.

Example for a 100 OHM Platinum Bulb RTD:

0 deg f = 92.94 OHMs 250 deg F = 147.11 OHMs

beerchug
 
Hi Everyone,
Did I mention this is a GREAT forum?

Anyhow.. I put the JSR in and it works well. I looked at some of the other programs and they all had the same instruction. I just never noticed before. john is right about the N file instead of the F file.
I was on line and reading the F value, 121.67345 degree. Who needs all that resolution. Not me! There is an analog thermometer a few feet away in a pump discharge line, it read 121 degree. Close enough. I have a 4-20 signal generator I could calibrate with if needed. The normal operating temperature is 120, that is right in the middle of range. I am currently using a "Accu-Trim"< spelling, controller. It regulates 0-25 psi of air to a steam valve actuator. Some sort of a bulb sensor,bi-metal spring thing? Anyhow it performs in a lousy manner, (too much variance).

Now for the PID, whew.............. haven't been down that road yet. I CAN DO THIS!! Do you think if I repeat the above statement over and over it will work? I have a 4-20 I/P transducer I'm gonna hook up tommorrow. I have read some of the threads here on PID. I am very dangerous! NO WAIT, I CAN DO THIS!!

Later BD :)
 
Why?

rogerhollingsworth said:
...and make sure ALL your JSR instructions are in file#2.

For simplicity?
I agree, I like to see all subroutine's called all together from file 2.
but...
Technically you can have a JSR anywhere, in any LAD file. The "instruction set reference" manual goes into detail about limitations for "nesting subroutines".




bikerdude-
Here is a link to AB's SLC500 Instruction Set Reference Manual . It will come in handy for most questions you will have working with RSLogix500.
 

Similar Topics

So here's my situation, I have been tasked with modifying the logic to mimic a button press in the PLC. I have two identical machines however one...
Replies
6
Views
513
Hello, I'm new to programming. I'm using RSLogix500 to modify an existing program for a SLC500. My plan was to use one of the existing inputs...
Replies
26
Views
1,906
So i have an allen bradley rack (2080-LC50-24QWB), i have it connected through ethernet. I dont have an offline program so im trying to upload...
Replies
6
Views
622
Hi Everyone, I am supporting a system which runs on a SLC 500 (1747-L532). A fault has developed whereby the output state of some digital outputs...
Replies
10
Views
957
Hello, I am currently taking a course on plc programming and in the course rslogix 500 is being used. I am however having a problem since it keeps...
Replies
4
Views
1,637
Back
Top Bottom