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 27th, 2017, 12:44 PM   #1
daveco
Supporting Member
United States

daveco is offline
 
Join Date: Sep 2013
Location: Colorado
Posts: 40
Converting LD to FBD

How would I create the following in Function Block?

I'm using Unity Pro but if you can show me an example in any logic software, I can build it in Unity.

Basically if EFV (Effluent valve) is closed, I want a ZERO value to be transferred. If it's not closed, I want it to show the NTU value but I need to work off of the same Input. In other words I don't have a EFV_Open contact to work with.

I'm having a hard time figuring out how to duplicate the NC contact portion.
Attached Images
File Type: jpg Capture.JPG (42.9 KB, 104 views)
  Reply With Quote
Old December 27th, 2017, 12:47 PM   #2
daveco
Supporting Member
United States

daveco is offline
 
Join Date: Sep 2013
Location: Colorado
Posts: 40
I'm in the process of converting LD984 to either LD or FBD and trying to figure out which will be the best way to convert it. I know the LD works, but just looking at my options.
  Reply With Quote
Old December 27th, 2017, 02:52 PM   #3
daveco
Supporting Member
United States

daveco is offline
 
Join Date: Sep 2013
Location: Colorado
Posts: 40
I found "A" way to do it, but it seems messy. If anyone has a cleaner/simpler way, I'm all eyes.
Used the XOR block that requires only one of the inputs will produce an output, if both have power (1) than no output.
Attached Images
File Type: jpg Capture2.JPG (55.9 KB, 92 views)
  Reply With Quote
Old December 27th, 2017, 03:05 PM   #4
daveco
Supporting Member
United States

daveco is offline
 
Join Date: Sep 2013
Location: Colorado
Posts: 40
In action
Attached Images
File Type: jpg Capture3.JPG (63.9 KB, 12 views)
File Type: jpg Capture4.JPG (61.0 KB, 9 views)
  Reply With Quote
Old December 28th, 2017, 11:23 AM   #5
daveco
Supporting Member
United States

daveco is offline
 
Join Date: Sep 2013
Location: Colorado
Posts: 40
I meant LL984
  Reply With Quote
Old December 28th, 2017, 11:30 AM   #6
Saffa
Member
New Zealand

Saffa is offline
 
Join Date: Feb 2012
Location: Bay of Plenty
Posts: 898
It looks like you're doing a Quantum LL984 conversion...

Unity now has MOVE instructions. No need to use SUB to put values into registers.

You don't need the XOR. Just use the "Valve Closed" bit on the EN pin, right click on the pin and select "Negate pin".

There is also a NOT function block if you want to make it more obvious.

I would personally take your Flow GT 100 and feed the result into an AND block with the valve closed input as the second input. Use the result as an EN for a MOVE block.
  Reply With Quote
Old December 28th, 2017, 12:12 PM   #7
daveco
Supporting Member
United States

daveco is offline
 
Join Date: Sep 2013
Location: Colorado
Posts: 40
That works! Thanks Saffa! I hadn't thought about the NEGATE option. I changed to the Moves yesterday after finding them.

The results:
Attached Images
File Type: jpg Capture5.JPG (60.8 KB, 64 views)
  Reply With Quote
Old December 29th, 2017, 02:55 AM   #8
Saffa
Member
New Zealand

Saffa is offline
 
Join Date: Feb 2012
Location: Bay of Plenty
Posts: 898
looking much better. Still one sub in the that can be turned into a MOVE.

We are doing an LL984 conversion to FB for a WWTP at the moment and getting rid of a few hundred SUBs has been almost therapeutic. I used to hate having to think about what each pin would do when i used to troubleshoot the old program
  Reply With Quote
Old December 29th, 2017, 01:28 PM   #9
daveco
Supporting Member
United States

daveco is offline
 
Join Date: Sep 2013
Location: Colorado
Posts: 40
We're on the uphill side of the water cycle from you :-)

As you're finding out, SUBs are used everywhere in the Modicon water world. I'll put some thought into how to replace that sub but I need a zero value when the contact is closed.

Oh... Simply use the EN pin and move the zero! Duh!
Thanks.
  Reply With Quote
Old December 29th, 2017, 06:33 PM   #10
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,035
Unity have different program scan than old modicons.

Unity have scan from left to right then down.

Old modicons from up to down and then to right.

This means that you probably also need to move your zeroing measrument by valve closing under GT block.

Otherwise you still have reading on Unity if input is over 100 but there is also close_valve input on "1" state.


Doh, there is negated input also

Last edited by Lare; December 29th, 2017 at 06:35 PM.
  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
Writing a ST compiler Peter Nachtwey LIVE PLC Questions And Answers 60 September 21st, 2012 03:27 PM
Omron S6 cpu jrojas12345678 LIVE PLC Questions And Answers 12 February 11th, 2011 06:21 AM
s7 200 gaannesh LIVE PLC Questions And Answers 10 April 20th, 2008 11:33 PM
OMRON C28 Instruction recycled_mind LIVE PLC Questions And Answers 7 May 26th, 2007 01:05 AM
Could you help me? Convert STL to Ladder Program with Omron PLC vnn LIVE PLC Questions And Answers 14 January 23rd, 2005 10:06 AM


All times are GMT -5. The time now is 05:13 PM.


.