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 October 18th, 2018, 01:04 PM   #1
eFisher0409
Member
United States

eFisher0409 is offline
 
Join Date: Oct 2018
Location: PA
Posts: 3
Need help with programming

Hello,
Iím currently working on a project using a unitronics samba plc,
I need to create a program with a touchscreen start and stop button, that spins a motor forward for X amount of time, then changes direction for X amount of seconds, direction canít be changed by button as I need to be able to be away and let program run for multiple hours. Please someone help.
Thanks
  Reply With Quote
Old October 18th, 2018, 01:20 PM   #2
gclshortt
Member
Canada

gclshortt is offline
 
gclshortt's Avatar
 
Join Date: Dec 2014
Location: Cobourg
Posts: 2,653
What have you written so far for your logic?

Regards,
__________________
Garry
https://www.accautomation.ca
Connect with us on Facebook: facebook.com/accautomation/
  Reply With Quote
Old October 18th, 2018, 01:31 PM   #3
eFisher0409
Member
United States

eFisher0409 is offline
 
Join Date: Oct 2018
Location: PA
Posts: 3
Nothing yet
  Reply With Quote
Old October 18th, 2018, 02:18 PM   #4
Saffa
Member
New Zealand

Saffa is offline
 
Join Date: Feb 2012
Location: Bay of Plenty
Posts: 914
Quote:
Originally Posted by eFisher0409 View Post
Nothing yet
Well have a crack mate, and come back with some screenshots of what you've tried.

This is a very simple state machine.

When started by pushbutton, set forward state using either a bit or an integer value, whatever you prefer.

Use a timer that is energised when in forward state.

When forward state timer finishes, set reverse state.

Use another timer which is energised when in reverse state.

When that timer finishes, return to forward state.

I prefer using an integer register and moving values into it for keeping track of my state. Then i don't need to remember to set / reset bits.
  Reply With Quote
Old October 18th, 2018, 02:23 PM   #5
Jeff23spl
Member
Canada

Jeff23spl is offline
 
Join Date: Jan 2010
Location: Canada
Posts: 807
Quote:
Originally Posted by Saffa View Post
Well have a crack mate, and come back with some screenshots of what you've tried.

This is a very simple state machine.

When started by pushbutton, set forward state using either a bit or an integer value, whatever you prefer.

Use a timer that is energised when in forward state.

When forward state timer finishes, set reverse state.

Use another timer which is energised when in reverse state.

When that timer finishes, return to forward state.

I prefer using an integer register and moving values into it for keeping track of my state. Then i don't need to remember to set / reset bits.
You should ask how much points will his/her professor gives you
__________________
Siemens Addict
  Reply With Quote
Old October 18th, 2018, 03:48 PM   #6
Ronnie Sullivan
Member
United Kingdom

Ronnie Sullivan is offline
 
Join Date: May 2010
Location: London
Posts: 474
Saffa, in your method you are reversing a motor while it is at full speed in the opposite direction.
Please allow the op to show some effort.
We don't do homework for free - we help.
__________________
I promise to get it right 3rd time every time.
  Reply With Quote
Old October 18th, 2018, 07:11 PM   #7
eFisher0409
Member
United States

eFisher0409 is offline
 
Join Date: Oct 2018
Location: PA
Posts: 3
So I did what you said and I got a program that works, Im using leds at the moment, and I have one lit for 5 seconds, then the next one comes on for 5 seconds then shuts off like it should. Everytime i try to implement another timer before they switch my second led is constantly lit, can someone help me with this middle timer? And also how could I make it run continuously switching between the leds or in the motor case forward and backwards?
  Reply With Quote
Old October 18th, 2018, 07:26 PM   #8
Firejo
Member
United States

Firejo is offline
 
Firejo's Avatar
 
Join Date: Jun 2008
Location: Redmond, WA
Posts: 1,005
Can you post your work (take a screen shot of the programming)?
__________________
Go Hawks!!!
  Reply With Quote
Old October 19th, 2018, 01:09 AM   #9
Saffa
Member
New Zealand

Saffa is offline
 
Join Date: Feb 2012
Location: Bay of Plenty
Posts: 914
Quote:
Originally Posted by Ronnie Sullivan View Post
Saffa, in your method you are reversing a motor while it is at full speed in the opposite direction.
Please allow the op to show some effort.
We don't do homework for free - we help.
I certainly didn't write any code. Just a pointer in the right direction.

I do this with some wastewater pumps on VSD for blockage removal. Obviously the drive handles the ramp from forward to reverse, and of course you'd add an intermediate delay if you were using a reversing DOL starter.. But first things first!
  Reply With Quote
Old October 19th, 2018, 05:10 PM   #10
Jeff23spl
Member
Canada

Jeff23spl is offline
 
Join Date: Jan 2010
Location: Canada
Posts: 807
A long time ago for my first job freshly out of school. i had to test and update an old machine. My supervisor ask me to check if it has an interlock between forward and reverse....Me: ok i will check it (Like a student would do in a test lab) I pushed forward button then i added the reverse one...No boss, there is no interlock built in the machine, we would need to add it+ new fuses and maybe.... new contactors.....
__________________
Siemens Addict
  Reply With Quote
Old October 20th, 2018, 05:01 AM   #11
Henny
Member
Netherlands

Henny is offline
 
Join Date: May 2008
Location: Gasselte(The Netherlands)
Posts: 98
Hello

Is it not possible to use a MI that you increase ( like mentioned by Saffa) and use the bitset instruction to set the correct output?

I once Made a programm with samba for controlling 5 valves on a dustfilter. These valves have to be opened an closed after each other. Then you could make this with two timers ( pause and run timer) that the operator can set on the samba touch screen.

But most important is that you first know exactly what the programm should do.

Kind regards
Henny
  Reply With Quote
Old October 20th, 2018, 12:27 PM   #12
Henny
Member
Netherlands

Henny is offline
 
Join Date: May 2008
Location: Gasselte(The Netherlands)
Posts: 98
Hello

Is it not possible to use a MI that you increase ( like mentioned by Saffa) and use the bitset instruction to set the correct output?

I once Made a programm with samba for controlling 5 valves on a dustfilter. These valves have to be opened an closed after each other. Then you could make this with two timers ( pause and run timer) that the operator can set on the samba touch screen.

But most important is that you first know exactly what the programm should do.

Kind regards
Henny
  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
Unity Pro XL Programming Questions (Timers & Input Activation) cnemeth LIVE PLC Questions And Answers 1 January 13th, 2014 06:16 AM
Best practice for programming in Step 7 glnassaf LIVE PLC Questions And Answers 10 January 3rd, 2013 04:03 AM
sequence programming seee LIVE PLC Questions And Answers 1 August 21st, 2012 10:14 PM
FB programming simulator 100 MOhm LIVE PLC Questions And Answers 3 December 1st, 2004 06:45 AM
SIEMENS S5 - Programming port damaged !! ayman metwally LIVE PLC Questions And Answers 2 August 19th, 2004 12:08 PM


All times are GMT -5. The time now is 03:04 PM.


.