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 26th, 2018, 10:53 PM   #1
Beau79AU
Member
Australia

Beau79AU is offline
 
Join Date: Feb 2018
Location: NSW
Posts: 11
SoMachine Basic Loop

Hi, can anyone please help with logic for looping in SoMachine basic? I have a hopper that i need to open and close a valve until it reaches a certain weight.

Thanks.
  Reply With Quote
Old February 26th, 2018, 11:06 PM   #2
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is online now
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 14,291
Welcome to the PLCTalk forum community !

In general, most PLC operating systems run designated programs repeatedly, in a constant "loop" or "scan". You don't have to do jumps or GOTO statements, but rather simply configure the routines to be executed by a repeating operating system task.

What model of Schneider controller are you using ?

My understanding is the SoMachine Basic is essentially a re-skinned version of CoDeSys, so you're going to have Tasks, and you're going to put your ladder logic routine (POU, in CoDeSys terminology) into one of those.

Describe your programming challenge in as much detail as you can, and practice with making screenshots with the Windows Snipping tool, then cropping them and attaching them to your posts as PNG files.
  Reply With Quote
Old February 27th, 2018, 12:34 AM   #3
Beau79AU
Member
Australia

Beau79AU is offline
 
Join Date: Feb 2018
Location: NSW
Posts: 11
Im using an M221 controller. I have a hopper on load cells, receiving a 0-10v signal. I need to open the valve to release a bulk lot of material until it reaches a slow feed weight, then open and close the valve on 3 sec intervals until it reaches the final weight. I have the bulk section sorted i just need to do the last slow feed. I have attached what i have for the bulk side. Please note MF0 is just a dummy for the analog input for using in the simulator.
  Reply With Quote
Old February 27th, 2018, 12:37 AM   #4
Beau79AU
Member
Australia

Beau79AU is offline
 
Join Date: Feb 2018
Location: NSW
Posts: 11
Sorry didnt upload screen shot
Attached Images
File Type: jpg SNIP.jpg (36.3 KB, 56 views)
  Reply With Quote
Old February 27th, 2018, 02:15 AM   #5
Beau79AU
Member
Australia

Beau79AU is offline
 
Join Date: Feb 2018
Location: NSW
Posts: 11
I have come up with the attached. When i do not have the Final Dumps POU, it works. The valve opens until i get below the weight it is set for. But as soon as the Final Dumps POU is added the valve wont open at all.
Attached Images
File Type: jpg SNIP1.jpg (8.9 KB, 10 views)
File Type: jpg SNIP2.jpg (35.2 KB, 9 views)
File Type: jpg SNIP3.jpg (22.7 KB, 8 views)
  Reply With Quote
Old February 27th, 2018, 07:07 AM   #6
Beau79AU
Member
Australia

Beau79AU is offline
 
Join Date: Feb 2018
Location: NSW
Posts: 11
I have managed to get it to work with the attached, however i am having to use 2 outputs to open same valve, one output to open and close in the bulk dump and then another output to open and close on the light dumps. When i try to use the one output it does not open and close. Is there any way to use the one output?

Thanks.
Attached Images
File Type: jpg SNIP1.jpg (18.1 KB, 13 views)
File Type: jpg SNIP2.jpg (36.1 KB, 11 views)
File Type: jpg SNIP3.jpg (33.2 KB, 9 views)
  Reply With Quote
Old February 27th, 2018, 08:13 AM   #7
Dravik
Member
United States

Dravik is online now
 
Join Date: Jun 2008
Location: New York
Posts: 1,378
You can 'branch' your logic to use just 1 output.
Lots of ways to do this, here's a really simple example.
Attached Images
File Type: jpg branch.jpg (8.4 KB, 47 views)
  Reply With Quote
Old March 8th, 2018, 05:16 PM   #8
Beau79AU
Member
Australia

Beau79AU is offline
 
Join Date: Feb 2018
Location: NSW
Posts: 11
Thanks Dravik, being new to PLC world, i didnt even think about branches. Works a treat now.
  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
SoMachine Basic, Comparison problem Qulu Quliyev LIVE PLC Questions And Answers 4 June 27th, 2016 11:56 AM
Toshiba EX100 Programming Access Help daleroe LIVE PLC Questions And Answers 102 December 23rd, 2015 05:59 PM
Flow loop and pressure loop ddeshi2 LIVE PLC Questions And Answers 9 November 16th, 2011 12:29 PM
Loop Consequences Narlin LIVE PLC Questions And Answers 7 November 15th, 2011 12:40 PM
How to simulate a FOR..NEXT loop? New2PLCs LIVE PLC Questions And Answers 26 May 9th, 2002 01:36 PM


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


.