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 March 3rd, 2018, 04:03 AM   #1
AivisNewBie
Member
Czech_Republic

AivisNewBie is offline
 
Join Date: Mar 2018
Location: None
Posts: 9
Question Beginner starting out need advices on creating library

Hello all,

The company that I worked for had their own libraries for process automation. I'd like to create my own library for automation (to get better understanding) so my question is what should I consider when creating function blocks for motors, valves, hydrochloride, PID controllers, Frequency converters and so on (what kind of function blocks I did not mention that are used frequently?).

For example FB_Motor:
what inputs/outputs are necessary like Statuses, command bytes, modes and so on,
should I make small delays before alarm is activated?
how to create good simulation mode?.
(these are some questions that bothers me).

Or maybe there is some kind of standard that I could use to create them?

I want to make universal Function blocks so all advices I can get would help me a lot.

Thanks you all in advance
  Reply With Quote
Old March 3rd, 2018, 05:26 AM   #2
Toine
Member
Netherlands

Toine is offline
 
Join Date: Nov 2016
Location: NL
Posts: 188
There is no generic answer to what is necessary. It depends on your requirements. Write down your requirements for one or more function blocks and make it. If it does not work as intended, if you need more or less functionality, then add/update.

You will not get it right first time. Don't worry about that. After a while the dust will settle down on one or more of your function blocks. If that means things are stable and robust, they do what you need them to do, all aspects tested and proved to work as intended, then you can move things into a library for re-use.

Speaking for myself: if a block gets too big, that is a sign that I am cramming too much into one box. So I tend to separate things as I go along. I have separate logic for buttons, then some for control, and yet again different blocks for display/presentation.

E.g. suppose I have a bunch of conveyor belts working together, one feeding onto another. The belts can be run both manually and automatically. I want a color lamp in the HMI for the motor, which is grey when off, blinking green/grey when starting/stopping, green when running, red on thermal failure (see what I'm doing here? I'm writing specs as I go).

Then I have one block for the manual button. One block for automatic operation (typically depending on other conveyors hence separate bool inputs for upstream and downstream). And a third block that takes things like status bits in and spits out a color variable for the lamp in the HMI.

Logic for both manual and automatic operation dictates that a you don't want one conveyor to drop product onto another that is not moving. So a conveyor keeps running as long as the upstream conveyor is running. A conveyor can only start once it's downstream conveyor is running. Only in case of things like thermal errors do you stop a conveyor right away. In that case all upstream items should also stop there and then, in order to avoid a mess. All downstream conveyors can shut down one after the other with a programmed shutdown time so they run empty. And so on. Write things down like this until they make good sense to you, sound logical and will also not fail under unusual circumstances. Think thermal error, E-stops. The latter should not be handled by your PLC code but your PLC code should recover from this in an orderly and graceful way.

Start writing down how you'd like things to operate. From there you move on to writing down all inputs and outputs. Note that this goes for your PLC as a whole as well as for anything you'd want to encapsulate into a function block. Specify the logic in detail. Then write code and test.

Remember: you will not get it right first time. Don't worry, repeat the above and improve until you are satisfied.

This can be useful to keep in mind:
http://accautomation.ca/five-steps-t...m-development/
  Reply With Quote
Old March 3rd, 2018, 05:26 PM   #3
kalabdel
Member
Canada

kalabdel is offline
 
Join Date: Feb 2015
Location: Ontario
Posts: 326
Quote:
Originally Posted by AivisNewBie View Post
Hello all,

The company that I worked for had their own libraries for process automation. I'd like to create my own library for automation (to get better understanding) so my question is what should I consider when creating function blocks for motors, valves, hydrochloride, PID controllers, Frequency converters and so on (what kind of function blocks I did not mention that are used frequently?).

For example FB_Motor:
what inputs/outputs are necessary like Statuses, command bytes, modes and so on,
should I make small delays before alarm is activated?
how to create good simulation mode?.
(these are some questions that bothers me).

Or maybe there is some kind of standard that I could use to create them?

I want to make universal Function blocks so all advices I can get would help me a lot.

Thanks you all in advance
Which software? Depending on the software you're referring to there may be plenty of libraries that you can take ideas from and modify to suite your needs.

Siemens had so much that can give very good ideas and a lot of it is SCL that you may be able to migrate to other software.
Some of the links are for documentation but if you web search the document title you will get to the example projects or library.

Toolbox for HMI

Library of General Functions LGF

Example blocks for WinCC (These have lots of code for Motors,Valves,Analog,PID etc.

DMC- Siemens Open Library
  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
Mining Minerals & Cement Library download? DarrenG LIVE PLC Questions And Answers 2 September 27th, 2017 08:01 AM
Elau EPAS-4 Missing Library RoRo LIVE PLC Questions And Answers 1 February 11th, 2016 02:13 PM
S7-200 Library creation problem resonanceshah LIVE PLC Questions And Answers 1 June 22nd, 2011 12:01 PM
Export/Import Textlists WinCC Flex 2008 STL??? LIVE PLC Questions And Answers 6 April 19th, 2010 04:44 PM
s7-200 Microwin Library Memory 504bloke LIVE PLC Questions And Answers 0 June 15th, 2007 01:43 PM


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


.