Slwagner73

Another Dumb newb question

29 posts in this topic

So, again, I find myself asking a dumb question.      :-(

I am trying to figure out how to write logic to use a 1734-IT2I, with a type J thermo-couple.

I am not sure if I should try and figure out how to use a PID, or if there is some other function I should be using, something like scaling.

In the past, with RSLogix 500, I would have tried using the scaling, but it is not available in ladder logic with Studio.

I want to reference the first channel to monitor a temperature, and use it to control an output.

And for the record, I am using Studio and a CompactLogix controller. The module is in slot 4 of a 1734-AENT, and the program sees it, and says it is viable.

But for the life of me, I cannot figure out how to see it in the ladder logic.

This may really sound dumb to you engineers, but I am trying to learn this on my own.

I have attended a couple of Allen-Bradley classes, but they never touched on this.

Any help really would be appreciated.

Scott...

Share this post


Link to post
Share on other sites

To adjust the scaling, double-click the TC module in the project tree to open its properties dialog box. Go to the "Configuration" tab. There you can set up TC type, temperature units, etc.

In the project tree, under the controller, open up "Controller Tags" and scroll down to whatever you named the 1734 chassis. There will be entries for each module. Expand the one for your TC module. In my case, I called the chassis "test1" and the module "test2". The scaled temperature will be in the "~...Ch0Data" and "~...Ch1Data" tags. You can create a new tag with a meaningful name that is aliased to this hardware address.

1734-IT2I_1.thumb.JPG.cd0b6f365a08fd4d6c

Share this post


Link to post
Share on other sites

Joe, thanks for that information, but I would also ask, in the ladder logic, what instruction would I use to actually utilize it?

Like I stated before, with RSLogix 500, I would use scaling. But it’s not available in Studio for a CompactLogix in the ladder.

Thanks, Scott.

Share this post


Link to post
Share on other sites

There isn't a built-in scaling instruction in Logix 5000. You can use the CPT (compute) function and put the computation in that way. I use an SCP add-on instruction (AOI) that I got from a colleague years ago and have modified slightly. It mimics the operation of the SCP in Logix 500 and is much easier to use. It's basically the CPT function hidden inside an AOI with a couple of other features, but I like it. PM me your email address and I'll send it to you.

Share this post


Link to post
Share on other sites

You can download the SCP instruction from Rockwell: see KB Tech note 38090

It says it works for RSLogix 5000 version 16 project or greater.

I've used it myself in RSLogix5000 v20 and Studio5000 v30 and it works fine.

Looks like JRoss uses something like this too.

Share this post


Link to post
Share on other sites
16 hours ago, Slwagner73 said:

Joe, thanks for that information, but I would also ask, in the ladder logic, what instruction would I use to actually utilize it?

Like I stated before, with RSLogix 500, I would use scaling. But it’s not available in Studio for a CompactLogix in the ladder.

Thanks, Scott.

You don't need to scale it in ladder since it's already scaled in the module configuration. You would just use it as you need to use it, as an alarm setpoint, display, input to a PID control, etc. If your module is configured correctly, the temperature is in normal engineering units for you when it gets to the tag database.

So your SCP in 500 would have a destination field that you would set to some address, let's say F8:0. In my screenshot, instead of using F8:0, you would use test1:1:I.Ch0Data in your code.

Do you need to change the scaling at runtime?

Share this post


Link to post
Share on other sites

I got the AOI from a colleague, but I suspect he got it from Rockwell. I've tweaked it a little, but the guts are essentially the same. I modified it so that I don't have to assign separate tags for the min/max parameters and added an "In Range" bit. I'm also planning to add a clamping feature in a week or so.

Share this post


Link to post
Share on other sites

You gentlemen, are a huge help.

I have the AOI from Rockwell, and it actually works.

If I knew more about PID programming, I would do more with it, but for now, I have something to work with.

Again, THANK YOU.

Scott.

Share this post


Link to post
Share on other sites

There's a scaling function block. Works Great.

Share this post


Link to post
Share on other sites

So, gentlemen, as I once again admit, I don't have a clue what I'm doing.

I have installed the Rockwell AOI, and yes, I can see it in the ladder, but all it gives me is a CPT instruction. And I have not a clue how to use it.

If I use a LES, LEQ, GRT, or some such, I can input the Channel-Data, and by using a number for my Source B, I can control outputs, but this is just a number.

Is there some magic instruction to convert this number to a more logical value. More like a true temperature?

I am using the thermo-couple to control air louvers to open when a room gets to warm, and turn on a make up air fan.

The actual ladder logic is very simplistic, but it would be easier to actually know what my number means, other than a number I play with till I have the right setting.

As it is now, I have a thermostat that I am watching and when the room gets to the set-point, I adjust to match the number I am seeing.

Very crude, and not very efficient. Also, it doesn't help anyone else down the road.

Boy, this sure makes me feel DUMB having to ask, but I'm sure you guys know this inside out and upside down.

And once again: Thanks for your help:

Scott

Share this post


Link to post
Share on other sites

Once you install the AOI, you can use it in the ladder logic as if it were a regular instruction. In ladder, add an instruction and type in the name of the AOI, in this case it should be "SCP". You'll see the block appear with 7 arguments. The first is for a tag with a custom data type to match the AOI. I usually type in a name like "DeviceID_SCP", then right-click and create a tag on the spot. You shouldn't need to do anything in the create tag dialog except click OK. Then back in the ladder, you can enter the tags or constants for the rest of the arguments, just like in RS Logix 500.

Share this post


Link to post
Share on other sites

Well, I think I have come to the conclusion that a Thermo-couple is the wrong device for this process.

Either I had some really stupid numbers in the SCP, or they are just not the way to go.

I can't seem to get any kind of real response out of them.

I wonder if an RTD and an AI wouldn't be a better option.

Thanks for your help:

Scott

Share this post


Link to post
Share on other sites

Well...

An RTD and a thermocouple are both temperature sensors. Choosing one versus the other is a factor of the temperature range, accuracy, and the characteristics of what you are monitoring. But both give you the same piece of information. So you can change the type, but the PLC won't do anything differently.

Next, an SCP isn't a control algorithm, it's a scaling instruction. It's for taking one linear range of numbers (like 4-20mA) and converting to another (like 0-1000 degrees). It sounds like you want a PID instruction.

Share this post


Link to post
Share on other sites
On ‎3‎/‎4‎/‎2018 at 9:25 AM, Slwagner73 said:

Either I had some really stupid numbers in the SCP, or they are just not the way to go.

 

Can you post an image of your logic?

Share this post


Link to post
Share on other sites

Andrew, I will, just as soon as I figure out a way to take a screen shot.

I'm downloading Greenshot now.

Wish me luck?

Scott

Share this post


Link to post
Share on other sites

So, Gentlemen. Can anyone tell me just what I have wrong here?

Scott.

2018-03-08 22_45_15-Logix Designer - Wagner [1769-L24ER-QB1B 24.11] - [Scaled_Temps - Scaled_Temps].png

Share this post


Link to post
Share on other sites

Not without knowing what you are trying to accomplish. What is the process? Give as much detail as you are legally allowed!

Share this post


Link to post
Share on other sites

J, nothing secret about it.

I am monitoring thermo-couples, based on outside and inside heat, and turning a heater on in a shed, just to keep it from freezing everything up again.

I am however, adding this to an existing program, and using RIO.

Just being geeky!

I am a maint. electrician at work, and have to troubleshoot all the PLC issues there, and so at home, I play/practice with the programs and hardware. (i know, get a real hobby)

When I first got started with this stuff, I used RSLogix500, and it, to me, seemed pretty easy then. So, I just puttered and plinked around with it. Now, I have to be better at the troubleshooting, so I am trying to expand into the more difficult stuff, and boy, what an eye opener!

But I sure do like the help I get from all of you here on this forum.

Scott

Share this post


Link to post
Share on other sites

Looking at the first SCP: it looks like the actual Outdoor Temp will be between 32 degrees and 225 degrees. This looks Ok. But your raw values for your Thermocouple input look like they will be between -240 and 2000, this does not look right. Look at Joe E's post above where he explains how to set up the scaling in the TC module configuration. The minimum raw value is 0 and the max raw value is 7000 in his example.

Share this post


Link to post
Share on other sites

Yes, configure your card as Joe E states, then you'll get the actual temp reading in your input data. Then you can just use comparison intructions (LES, GRT, LEQ, GEQ) for off-on control of your heaters.

Share this post


Link to post
Share on other sites

Just so we all understand,  I put the thermocouple in a glass of ice water, and the thermometer reads 32, but trying to use those engineering numbers, my actual value was -480 degrees, so I played with the min and max inputs till it read 32 at those values. If I put in the 0-7000 values, I really have no idea what my scaled min and max should be set at. A type K thermo ranges from -270c to 1370c or -454 - 2300f. And that didn't work.

The 1734-IT2I is configured just as pictured in Joe's screen shot.

Again, thanks for reading and replying!

Scott

Share this post


Link to post
Share on other sites

Take a look at the help file. When you select the type and temp units on the configuration tab of the module properties, it scales to the published range of the thermocouple, and the value you get is the temperature. The 0-7000 you see is grayed out and doesn't apply unless you choose "custom range" instead of Celsius or Farenheit.

So if you have the thermocouple in ice water, you should see 32F or 0C depending on the units. If you don't, then there is a problem with the thermocouple, the card, or the wiring. Either that or you have a different type than you think.

Share this post


Link to post
Share on other sites

try this way with no scaling  setting J-type thermocouple to engineering units x10 that'll give you a true reading of the thermocouple to address there themocouple its I:x.X eg I:4.0

 

 

5afc4b3a058d8_2018-05-16(2).thumb.png.1c

2018-05-16 (1).png

Share this post


Link to post
Share on other sites
On 2/22/2018 at 9:25 PM, JRoss said:

There isn't a built-in scaling instruction in Logix 5000. You can use the CPT (compute) function and put the computation in that way. I use an SCP add-on instruction (AOI) that I got from a colleague years ago and have modified slightly. It mimics the operation of the SCP in Logix 500 and is much easier to use. It's basically the CPT function hidden inside an AOI with a couple of other features, but I like it. PM me your email address and I'll send it to you.

@JRoss Would you be able to send me that AOI function as well please.

Share this post


Link to post
Share on other sites

Here's a link to the KB article mentioned above:

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/38090

You should be able to download the SCP AOI for Logix 5000 from there. I rolled my own (since I didn't know RA had one already available) for scaling the analog signal from Flex IO, which doesn't allow scaling inside the module configuration. If  you're trying to scale the signal from an analog module that supports, it, it's a LOT simpler and cleaner to do the scaling in the module configuration. If your module doesn't support that, or if you're scaling something else, the AOI should work for you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now