Sign in to follow this  
Followers 0
ddevins

PLC5 SCP

23 posts in this topic

OOPS!!! I just went to do a mod to a PLC5 and no SCP instruction. I need to control a valve opening and closing amount with 4-20ma from a panelview 550. Enter amount open on PV and have valve move that amount and stay there til next PV entry. What's best or easiest way to do this??? Thanks,

Share this post


Link to post
Share on other sites
Two Approaches you can take. 1. Let the Panelview Scale the 0 to 100 percentage number into 0 to 4095 and send to PLC. 2. Let the PLC accept numbers between 0 and 100, then multiply by 40.95 in a CPT instruction to get 0 to 4095, Feed this to your OFE card. Small PLC 5/40 sample attached. DEVINS_SCP1.zip Good Luck - I made it into real small simple subs for ease of understanding. And if you do the IO layout it will even write your BTR/BTW logic. Was Cool.

Share this post


Link to post
Share on other sites
Thanks much, I'll be giving this a shot next weekend. Looks OK to me as I'm not much with Block transfers. Appreciate the help.

Share this post


Link to post
Share on other sites
The ControlLogix family also does not have an SCP instruction, you use the CPT instruction instead. The SCP instruction uses the line formula y = mx + b. y = scaled output m = slope = (scaled MAX. - scaled MIN.) / (input MAX. - input MIN.) x = input value b = offset (y intercept) = scaled MIN - (input MIN. x m) The SCP insturcion calculates slope and offset every time it is scanned, but since slope and offest are almost always constants the CPT equation can be greatly simplified. Edited by Alaric

Share this post


Link to post
Share on other sites
<quote> Two Approaches you can take. 1. Let the Panelview Scale the 0 to 100 percentage number into 0 to 4095 and send to PLC. 2. Let the PLC accept numbers between 0 and 100, then multiply by 40.95 in a CPT instruction to get 0 to 4095, Feed this to your OFE card. Small PLC 5/40 sample attached.

Share this post


Link to post
Share on other sites
Hello guys, I still need help as I'm not a BTW and BTR person. Using PLC5/40 and 1794-OF4I controlling the valve, here's what I'm trying to do. Start cycle on PV 550 (Existing), 4-20ma valve opens to percent open from setting on PV screen. When Stop is pressed on PV, valve closes fully and opens purge valve 100% (2nd analog valve). Is this enough info. Thanks for reading and any/all assistance appreciated.

Share this post


Link to post
Share on other sites
Since you are not using a "standard" 1771 series analog output card, you will not be able to use the built in I/O configuration screen. I have not used the 1794-OF4I, but the manual for that module should have all the configuration data, such as number of setup words, what each bit signifies, and on the reads, number of words, what is stored where etc.....

Share this post


Link to post
Share on other sites
Okay I downloaded, the manual for the Flex I/O analog modules, I don't think it will be that hard to configure. But, there are a lot of choices, that only you know the answer to. It's not the old standard 0-4095 of the 1771's. You have to make alot of decisions about the fail/safe state configuration. I recommend that you down load the manual here: http://literature.rockwellautomation.com/i...um008_-en-p.pdf Chapter 4 covers using RIO to read and configure. If you provide a little more information, maybe someone can help. Which PLC-5? Rack, group, slot address of the Flex I/O?

Share this post


Link to post
Share on other sites
I still have many questions on this subject. I have attached the program from above reply with some mods. The Channel config and I/O config are from the original program. I am adding a 1794-OF4I Flex I/O analog out card. PLC is 5/40 with multiple racks. Panelview 550 is setting %open of valves. When blower starts, I want valve to open to PV setting. When blower stops, I want to move 0 and close the valve 100%. Would someone look at addressing on the MOV in the controls logic.?? Also how do I add the additional flex I/O rack to the channel config and I/O config?? I really appreciate your time, comments, and assistance. I remaned the file extension to pdf from rsp to upload it. Hope it works and will open. DEVINS_SCP_4.pdf Edited by ddevins

Share this post


Link to post
Share on other sites
Can't download the file because of the .pdf extensio, browser tries to open it and then faults because it's not a pdf file, try it again with a .zip extension. Now... Secret stuff: you do not have to configure the I/O on a PLC-5, the way you do on a SLC. All that you have to do is use BTR/BTW to the correct rack, slot, group. Plus you will also need to know what addressing type your ASB is configured for. However it is much easier to setup if you add the it. The rack slot group information will have to match the configuration of your 1794-ASB module (you have two switches on the front lefthand side underneath a cover that determine your settings), you can download the ASB manual here: http://literature.rockwellautomation.com/i...um009_-en-p.pdf

Share this post


Link to post
Share on other sites
Here it is with a zip extension. Thanks for the info on config. That's what I'm looking for right now. DEVINS_SCP_4.zip

Share this post


Link to post
Share on other sites
Okay this is not the program of the running plc, right? There isn't a Flex ASB listed under the different chassis. Can you post the real program? Are you adding a Flex ASB or just adding an I/O module?

Share this post


Link to post
Share on other sites
The I/O and channel config for this program is from the real program. I did delete all the program files except what apply to the scaling and controls. I need to add a 1794-ASB, 1794-OF4I, and 1794-TB3 to this config. If you would like the entire program, I can attach it. Thanks for the help Ken. I went ahead and attached the entire original program. The other program I need to get the hardware configured correctly into this one. devins_scp_real.zip Edited by ddevins

Share this post


Link to post
Share on other sites
It would help, the program you posted, re-uses existing files, that's a big no-no. You already have data file 14 as a timer file, so you can't use N14 in your block transfers. Open your program file, click on I/O configuration, then right click on chassis 6, select new chassis. You can then add select the Flex I/O. Then under the adapter column double click the Flex ASB, you can then select the series etc.... Then under the chassis type double click the Flex I/O , you can then add your Flex I/O modules, you can then enter in the CORRECT addresses for the block control and data files, then have the Block transfer logic placed into the ladder. Once you get all that post back with more questions. You really should download and read the manuals I linked to, you have some hardware and software configuration decisions to make. While we can assist, only you know what your process requirements are.

Share this post


Link to post
Share on other sites
I think I have that much done as you described. In the devins_scp3 program, I plan on putting program file 2 in the program file 2 for the attached devins_scp_real program file 2. The program files 3 & 4 from devins_scp3, I plan on using empty program files 8 & 9 in the devins_scp_real program. I think I have configured the NEW chassis, analog card, and ASB as much as I can. Don't know if it's correct. Also I have cleaned up both programs. The controls for program file 4 of devins_scp3 is not complete, but just need some timers and proxes added, so I can handle that. On the BTW and BTR I cannot put in the correct card (1794-OF4I) for some reason, so I must have something wrong. As you will see, theis PLC has several racks and I;m adding a 1794-ASB, TB3, and OF4I to get the 3 analogs I need for the valves. Just cannot seem to get hardware configured and BTW and BTR correct so I'll be able to see the hardware when I go online. I sure have a lot to learn. Thanks so much. DEVINS_SCP3.zip devins_scp_real.zip

Share this post


Link to post
Share on other sites
You have the Flex chassis configured for only 1 slot, change that to the correct number and you can then add your I/O. Goto I/O configuration, double click on the ASB, then choose the chassis tab, change the number there. Once you've done that you can have the BTR/W placed by the software. The reason your current BT are wrong is that the rack slot group numbers do not match the Flex I/O module.

Share this post


Link to post
Share on other sites
Good Morning, I have down loaded the manuals and printed them. I believe I have followed the instructions above and still I cannot get the 1794-OF4I to be a choice in the BTW and BTR. I have attached the program and they are located in program file 8 and 9. I also question whether or not the addressing in the same files is acceptable. Thanks in advance for any assistance. I get to try this out tomorrow on site. devins_scp_real.ZIP

Share this post


Link to post
Share on other sites
I added the module to the I/O configuration , I have it in slot 0, you can change as needed. The setup screen for the Block Transfers works now. Just change the extension from .zip to .rsp The CPT instruction you are using is for a 1771 module 0-4095, the Flex module is different. I can't tell you what the value is because there a lot of choices, one of them is 0-10000. DEVINS_SCP_REAL_ken.zip

Share this post


Link to post
Share on other sites
I tried the attached Saturday and couldn't get it to work opening analog valves. The program file is #9 and is only 12 rungs. I must have wrong address which I suspect or hardware configed wrong. Am adding flex I/O which is chassis 7. Any suggestions??????? Thanks for looking and your time. DEVINS_SCP_REAL_MDC.zip

Share this post


Link to post
Share on other sites
You need to click on the BTW setup and select the output range.

Share this post


Link to post
Share on other sites
I wonder if he ever got it working or not?

Share this post


Link to post
Share on other sites
Ken, Yes I got it working late yesterday afternoon and got home late last night. Your assistance was priceless. Had a couple of the switches that needed changing and the analog wiring by the electricians was changed to be correct and away it went. The 0-10000 scaling for the 4-20ma signal was perfect and the valves open and close very quickly and accurately. Thanks much again. ddevins

Share this post


Link to post
Share on other sites
Glad to be of service, perhaps you can help someone else out, and the cycle will continue.

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
Sign in to follow this  
Followers 0