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.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old December 4th, 2014, 01:46 PM   #1
1010101
Member
United States

1010101 is offline
 
Join Date: Oct 2014
Location: XX
Posts: 46
Ramp Using FB should I use Ramp, Integrator or Scale?

What is the easiest way to make a ramp with function blocks? No specific values need to be maintained or reached. I was able to create the ramp signal using ladder logic now I need to do it using function blocks. I've read a lot of users not recommend the ramp function block and I'm also not sure how to use the integrator block.

would the scale function block do what I need?
  Reply With Quote
Old December 4th, 2014, 03:54 PM   #2
GeoffC
Member
Australia

GeoffC is offline
 
GeoffC's Avatar
 
Join Date: Aug 2006
Location: Newcastle
Posts: 683
The easiest way to make a ramp is just use an ADD block
ie RampValue = RampValue + SomeValue
__________________
Geoff C
______________________________________
  Reply With Quote
Old December 4th, 2014, 05:11 PM   #3
TConnolly
Lifetime Supporting Member
United States

TConnolly is offline
 
TConnolly's Avatar
 
Join Date: Apr 2005
Location: Salt Lake City
Posts: 6,147
The SCL FB works. You can also import and use the SCP AOI in either FB or ladder. Both use the same line equation that a ramp computation would use.

See these threads:

http://www.plctalk.net/qanda/showthread.php?t=91071

http://www.plctalk.net/qanda/showthread.php?t=89381
__________________
True craftsmanship is only one more power tool away.

That's the beauty of processors, they don't have emotions they just run code - The PLC Kid.
  Reply With Quote
Old December 4th, 2014, 06:39 PM   #4
1010101
Member
United States

1010101 is offline
 
Join Date: Oct 2014
Location: XX
Posts: 46
Thanks for the info Tconnelly. You're and advocate for SCP and SCL lol How do I import the instructions for the ramp so I can use them with the SCL function block?
  Reply With Quote
Old December 14th, 2014, 10:06 PM   #5
1010101
Member
United States

1010101 is offline
 
Join Date: Oct 2014
Location: XX
Posts: 46
Hey guys I ended up using a timer and SCP instructions like Tconnolly suggested.

I am now doing the same thing in structured text. This is what I have so far...
I have the timer go from 0-60 and ramp scales from 0-100
ramp up is 0-100 in 0-30 seconds and ramp down is 100-0 in 30-60 seconds. In the end my ramp up + ramp down is what I want to trend hopefully creating a pretty smooth ramp up and ramp down. I am using RsLogix 5000, but I only have RSLogix Micro to practice on and I do not see anywhere to use structured text so I have no way of testing this code until tomorrow when I am on campus.

Tags are
scaled Max=100
scaled Min=0
input Max=30
input Min=0

scaled Max2=0
scaled Min2=100
input Max2=0
input Min2=30

Quote:
My_Timer.Preset := 60;
My_Timer.Reset := reset;
My_Timer.TimerEnable := not My_Timer.DN;
TONR(My_Timer);


IF My_Timer.DN Then
Ramp_Up=(scaled Max-scaled Min)/(input Max-input Min)
Ramp_Down(scaled Max2-scaled min2)/(input Max2-input min2)
Ramp=Ramp_up+Ramp_Down
End_if;
  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
How to use UDT as inout in a FB xyz102 LIVE PLC Questions And Answers 4 June 22nd, 2012 11:33 AM
Siemens FB dev mon/mod values in VAT for debug... and other FB dev questions. Nick Birke LIVE PLC Questions And Answers 51 October 27th, 2011 06:57 AM
Pass ANY Pointer to FB inside FB bara_hence LIVE PLC Questions And Answers 12 October 1st, 2010 08:58 AM
Ramp requirement in PID Block in AB Controllogix asim_rana LIVE PLC Questions And Answers 0 February 13th, 2006 01:50 PM
Exact SP reached at end of heating ramp time JustDaveIII LIVE PLC Questions And Answers 12 October 17th, 2003 05:07 PM


All times are GMT -5. The time now is 01:05 AM.


.