SCP Instruction?

Yoyofred

Lifetime Supporting Member
Join Date
Jun 2018
Location
Illinois
Posts
2
This is my first time using this instruction in school we used engineering units to scale our analog signal. However, it is not available for me to use. Can anyone explain why? The rest of the analog IO is scaled in the program using an SCP instruction, so I just followed suit. I have included an attachment of a screen shot of the task, but I will do my best of explaining it for those that do not care to download it. I created a SCP tag. My input is off of slot 4 ch2 and is setup as a DINT the input min is at 0 and max is at 32767. The output tag is also setup as a dint and scaled min is 0 and max is 30000, but I am not getting any value for my output. Do I have to use a different data type for my tags or what else could I be doing wrong?
Thanks in advance,
Fred

Capture.JPG
 
For whatever reason, Rockwell decided not to include the SCP instruction in the standard instruction set. You can download it and import it as an AOI (add on instruction). It is such a commonly used and handy instruction, I almost always make use of it.

If your program already has that AOI, you should be able to add an instance of it. Just make sure that the tags you use for the instruction as well as the destination are of the correct data type.

In your screenshot, it looks like the logic is live (green power rails), but not being called (Whey_Silo_Gallons should be close to the scaled max, unless it is overwritten elsewhere). Make sure the routine is being called.
 
Last edited:
Welcome to the forum!

I think you have worded your question in a misleading manner, suggesting that the SCP instruction "is not available for me to use". If I understand you correctly, it's available for you to use and you have used it just fine - it's just not giving you an output.

I'd bet that you've fallen for one of the classic blunders:
1- Never get involved in a land war in Asia
2- Never go in against a Sicilian when death is on the line
3- Never forget to call your subroutine
 
Thanks guys, and sorry for the original post. I meant the engineering units were not available. You guys nailed it I did not have a JSR in there for they whey silo "DUH!" rookie mistake.
Thanks
Fred
 
Last edited:
There is a scale instruction in FBD if you a) pay money for FBD programming license AND B) want to use FBD for scaling analogs.

Only certain cards give you the "scale in the card properties" option. Personally I prefer unscaled units coming from the card and doing the scaling in the code like you have now done.
 
There is a scale instruction in FBD if you a) pay money for FBD programming license AND B) want to use FBD for scaling analogs.

Only certain cards give you the "scale in the card properties" option. Personally I prefer unscaled units coming from the card and doing the scaling in the code like you have now done.


I use the FBD and make a whole routine usually named "Scaling Analog". I saw it a couple years ago in a reference I was given to create a new program, and I really like it now. I can change all kinds of parameters in the SCL instruction while on line, and it shows cool little values near the inputs and outputs on the instruction, so I can look at them while commissioning. To each his own, I guess. Have a great rest of your week, folks.
 

Similar Topics

Hello, I am replacing a pH probe that was determined to be bad in a waste water treatment system. I am replacing it with a 2-wire Aqua Metrix...
Replies
8
Views
1,449
Hello everyone, I am using SLC 5/03 (1747-L531) CPU. My CPU gives an error. BATT led is active and it is always in solid red . Firstly I...
Replies
11
Views
4,090
Where can i find this aoi for slc 500?
Replies
9
Views
2,718
I have been using a SCP instruction in my program, but I only want a "slice" of the total range scaled.... hence, the SCP instruction. However, I...
Replies
12
Views
5,971
I am using Rslogix 500 for programing my PLC. I have analog input module. And i am using SCP instruction for scale my analog input. But in AB...
Replies
6
Views
1,750
Back
Top Bottom