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 February 5th, 2018, 06:11 PM   #1
Jim_cz
Member
Australia

Jim_cz is offline
 
Join Date: Sep 2011
Location: Sydney
Posts: 16
Help please with programming a timer value that depends on a conveyor speed

I have a conveyor whose speed varies between 20 and 50Hz through a PLC (HMI). I need to program a code with a timer whose value will vary between 10 and 4 seconds inversely proportionally to the speed of the conveyor. That means, when the speed will be 20Hz the timer will need to start timing from 10s and when the speed will be 50Hz the timer needs to have 4s.


Any tip please how I can program it with Omron PLC?
  Reply With Quote
Old February 5th, 2018, 06:44 PM   #2
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,287
It is simple maths you could "roll your own".

I don't know the Omron instruction set, is there something like a "Scale with Parameters" or just a "Scale" instruction.

Most (from other manufacturers) will work with inverse parameters.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old February 5th, 2018, 07:02 PM   #3
JaxGTO
Member
United States

JaxGTO is offline
 
Join Date: Apr 2009
Location: Kalieefornia
Posts: 564
If its linear then just do scaling where 20-50=10-4. Lookup a standard scale block online, in AB land it's a SCP (Scale with Parameters) instruction. But the math is simple.
  Reply With Quote
Old February 5th, 2018, 11:04 PM   #4
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 6,203
Or just divide 200 by the hz.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old February 6th, 2018, 12:47 PM   #5
Dirt
Member
Sweden

Dirt is offline
 
Join Date: Apr 2008
Location: Stockholm
Posts: 153
Quote:
Originally Posted by bernie_carlton View Post
Or just divide 200 by the hz.
+1

And maybe add limits to not be less than 4 or more than 10?
  Reply With Quote
Old February 6th, 2018, 10:46 PM   #6
Jim_cz
Member
Australia

Jim_cz is offline
 
Join Date: Sep 2011
Location: Sydney
Posts: 16
Thanks guys, you've given my invaluable advice. I should be able to pull it off now.
  Reply With Quote
Old February 7th, 2018, 10:05 AM   #7
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 6,203
Just as a note, the Scale With Parameters suggestions probably would not have worked since this is an inverse relationship, as Jim_cz noted, and not a linear one.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old February 7th, 2018, 05:35 PM   #8
Geoff White
Member
Australia

Geoff White is offline
 
Join Date: Oct 2005
Location: Brisbane
Posts: 253
Here you go.
Attached Files
File Type: zip PresetScalerDINT.zip (1.1 KB, 11 views)
  Reply With Quote
Old February 8th, 2018, 06:31 AM   #9
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,287
Quote:
Originally Posted by Geoff White View Post
Here you go.
It's an Omron PLC, Geoff....
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old February 8th, 2018, 06:41 AM   #10
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,287
Quote:
Originally Posted by bernie_carlton View Post
Just as a note, the Scale With Parameters suggestions probably would not have worked since this is an inverse relationship, as Jim_cz noted, and not a linear one.
It would still be linear, Bernie, even though it is "inverted".

Also I would suggest that the math involved with "rolling your own" SCP (if you had to), would most likely work in any processor that can handle negative numbers. Certainly works fine in Allen-Bradley controllers.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old February 8th, 2018, 08:27 AM   #11
gclshortt
Member
Canada

gclshortt is offline
 
gclshortt's Avatar
 
Join Date: Dec 2014
Location: Cobourg
Posts: 2,425
http://www.plctalk.net/qanda/showthread.php?t=97825

The above will help you with the Omron scale instruction.
Use the output as the timer set value. (SV)

Regards,
__________________
Garry
http://www.accautomation.ca
Connect with us on Facebook: facebook.com/accautomation/
  Reply With Quote
Old February 8th, 2018, 10:04 AM   #12
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 6,203
Re: it's still linear, plot the result of y = 200/x with x varying from 20 to 50. Then check the results provided by a scale instruction.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old February 8th, 2018, 11:20 AM   #13
Dirt
Member
Sweden

Dirt is offline
 
Join Date: Apr 2008
Location: Stockholm
Posts: 153
Quote:
Originally Posted by daba View Post
It would still be linear, Bernie, even though it is "inverted".

Also I would suggest that the math involved with "rolling your own" SCP (if you had to), would most likely work in any processor that can handle negative numbers. Certainly works fine in Allen-Bradley controllers.
I think you missed the words "inversely proportional" in the topic?

If it'd be linear (directly proportional), it would look like this

y=-0.2x+14
x=Hz
y=seconds

inversely proportional isn't linear:
y=200/x
  Reply With Quote
Old February 8th, 2018, 11:37 AM   #14
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 6,203
The OP was obviously looking for a timer preset such that the conveyor would travel the same distance as timed by the timer for various speeds. Check for that relationship with the output from a scale function. Multiply the output by the input for all the settings and see if you get a constant.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old February 8th, 2018, 12:02 PM   #15
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,287
Quote:
Originally Posted by Dirt View Post
I think you missed the words "inversely proportional" in the topic?

If it'd be linear (directly proportional), it would look like this

y=-0.2x+14
x=Hz
y=seconds

inversely proportional isn't linear:
y=200/x
Of course it is.....

I didn't miss anything.

"Linear" is to do with the scale factor value, which can be positive or negative, and if that scale remains constant, then the relationship is "linear". If the scaling factor changes in any way, the relationship becomes "non-linear".

Linear means "straight-line" and a straight line is produced if m is kept a constant in the scaling equation y = mx + c

If m is kept a constant, it can be positive, to give "proportional", or negative, to give "inversely proportional".

The "proportional" part of the description is the scaling, and if you don't say "inversely" y increases as x increases. When you add "inversely", y will decrease as x increases.

Proportional and Inversely Proportional are both Linear.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  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
Reset Timer Dilemma dskplc LIVE PLC Questions And Answers 20 December 2nd, 2014 12:06 PM
AB SLC-500 Beginner Questions 2k1Toaster LIVE PLC Questions And Answers 37 April 15th, 2014 05:05 PM
programming a timer for a dosing pump oyster LIVE PLC Questions And Answers 6 November 24th, 2006 05:59 AM
Good programming practice Rhonda LIVE PLC Questions And Answers 83 August 17th, 2006 02:52 PM
Automation Direct DL05 problem david bron LIVE PLC Questions And Answers 16 February 2nd, 2004 08:52 PM


All times are GMT -5. The time now is 07:53 AM.


.