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 July 27th, 2003, 06:41 PM   #1
bikerdude
Member
United States

bikerdude is offline
 
bikerdude's Avatar
 
Join Date: Jul 2003
Location: Indiana
Posts: 315
Hi! RSlogix500 + SCP = ???????

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 :-)
  Reply With Quote
Old July 27th, 2003, 08:11 PM   #2
93lt1
Member
United States

93lt1 is offline
 
93lt1's Avatar
 
Join Date: Apr 2002
Location: Mount Pleasant, Iowa
Posts: 994
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.
  Reply With Quote
Old July 27th, 2003, 08:33 PM   #3
Kim Gold
Member
Canada

Kim Gold is offline
 
Kim Gold's Avatar
 
Join Date: Jun 2002
Location: Stoney Creek, Ontario
Posts: 241
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,76710V 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,38420 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.
Attached Images
File Type: jpg 1746_nio4i.jpg (41.7 KB, 619 views)
  Reply With Quote
Old July 27th, 2003, 08:49 PM   #4
bikerdude
Member
United States

bikerdude is offline
 
bikerdude's Avatar
 
Join Date: Jul 2003
Location: Indiana
Posts: 315
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 :-)
  Reply With Quote
Old July 27th, 2003, 08:55 PM   #5
bikerdude
Member
United States

bikerdude is offline
 
bikerdude's Avatar
 
Join Date: Jul 2003
Location: Indiana
Posts: 315
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 :-)
  Reply With Quote
Old July 27th, 2003, 08:59 PM   #6
Eric Nelson
Lifetime Supporting Member + Moderator
United States

Eric Nelson is offline
 
Eric Nelson's Avatar
 
Join Date: Apr 2002
Location: Randolph, NJ
Posts: 4,346
Quote:
Originally posted by bikerdude
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!...

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)...

Add that and you should be all set!

beerchug

-Eric
  Reply With Quote
Old July 27th, 2003, 09:14 PM   #7
bikerdude
Member
United States

bikerdude is offline
 
bikerdude's Avatar
 
Join Date: Jul 2003
Location: Indiana
Posts: 315
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 by bikerdude; July 27th, 2003 at 09:17 PM.
  Reply With Quote
Old July 27th, 2003, 09:25 PM   #8
93lt1
Member
United States

93lt1 is offline
 
93lt1's Avatar
 
Join Date: Apr 2002
Location: Mount Pleasant, Iowa
Posts: 994
Quote:
Originally posted by Eric Nelson
Otherwise your File #2 is just sitting there doing nothing (as you've noticed)...

file 3
Oops...typo, I suspect?

And by the way bikerdude-

Its JSR, not JMP as both are valid instructions!
  Reply With Quote
Old July 27th, 2003, 10:28 PM   #9
rsdoran
Lifetime Supporting Member
United States

rsdoran is offline
 
rsdoran's Avatar
 
Join Date: Apr 2002
Location: Birmingham, AL
Posts: 7,372
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
__________________
http://www.patchn.com Industrial Electrical & Maintenance @ www.patchn.com "Tell me and I forget, show me and I remember, involve me and I understand."

Last edited by rsdoran; July 27th, 2003 at 10:37 PM.
  Reply With Quote
Old July 27th, 2003, 11:20 PM   #10
93lt1
Member
United States

93lt1 is offline
 
93lt1's Avatar
 
Join Date: Apr 2002
Location: Mount Pleasant, Iowa
Posts: 994
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.
  Reply With Quote
Old July 28th, 2003, 01:34 AM   #11
Eric Nelson
Lifetime Supporting Member + Moderator
United States

Eric Nelson is offline
 
Eric Nelson's Avatar
 
Join Date: Apr 2002
Location: Randolph, NJ
Posts: 4,346
93: Yes, typo...

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

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
  Reply With Quote
Old July 29th, 2003, 04:56 AM   #12
johnhopps
Member
United States

johnhopps is offline
 
johnhopps's Avatar
 
Join Date: Oct 2002
Location: Jackson, TN--HomeTown is Metro Detroit
Posts: 27

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
__________________
ILBCNU
  Reply With Quote
Old July 29th, 2003, 09:42 PM   #13
bikerdude
Member
United States

bikerdude is offline
 
bikerdude's Avatar
 
Join Date: Jul 2003
Location: Indiana
Posts: 315
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 :-)
  Reply With Quote
Old July 29th, 2003, 11:47 PM   #14
rogerhollingsworth
Member
United States

rogerhollingsworth is offline
 
rogerhollingsworth's Avatar
 
Join Date: Nov 2002
Location: Southern Ohio.
Posts: 385
Use the JSR and make sure ALL your JSR instructions are in file#2.

Roger
  Reply With Quote
Old July 30th, 2003, 09:37 AM   #15
93lt1
Member
United States

93lt1 is offline
 
93lt1's Avatar
 
Join Date: Apr 2002
Location: Mount Pleasant, Iowa
Posts: 994
Why?

Quote:
Originally posted by rogerhollingsworth
...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.
  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
RSLogix500 Activation File problem Chakija LIVE PLC Questions And Answers 12 February 3rd, 2005 01:12 AM
RSLogix500 vs ICOM Software Scooter LIVE PLC Questions And Answers 11 January 13th, 2005 09:03 AM
rslogix500 w/sp2 jimpad LIVE PLC Questions And Answers 7 December 19th, 2004 08:48 PM
Silly AB Programming Question about scp outputs Russs LIVE PLC Questions And Answers 20 August 6th, 2004 10:59 PM
RSView and RSLogix500 BigMac LIVE PLC Questions And Answers 12 December 2nd, 2003 03:56 PM


All times are GMT -4. The time now is 02:31 AM.


.