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.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old January 22nd, 2021, 12:59 PM   #31
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 6,226
No.
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old January 22nd, 2021, 01:58 PM   #32
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 14,703
Quote:
Originally Posted by Bullzi View Post
Is it considered "Best Practice" to create a FB to map the physical I/O to DB tags? I will normally do this in the AB world. Just not sure how it is done in the Siemens world.
In ControlLogix there is the particular 'feature' that the IO is scanned asyncronously with the scan, causing all kinds of problems. Programmers deal with this by copying all i/o to/from a buffer and work with the buffer instead of the actual i/o. Siemens do not have this feature and thus you dont have to use a buffer.


If you still do not want to work directly with the i/o, then embrace the use of FBs. You pass the physical i/o to the FB by means of In/Out pins. Inside the FB you work with the variables assigned to the in/out pins.

The big deal is that in this way your code is re-used every time you create an instance of the FB.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old January 22nd, 2021, 02:23 PM   #33
Bullzi
Lifetime Supporting Member
United States

Bullzi is offline
 
Join Date: Jun 2012
Location: Colorado
Posts: 1,530
Thanks Jasper, that makes sense.
What I have done is to create a UDT called Tank. In the Tank UDT I have a couple of items that will actually interface with the I/O. Items like Mixer_Status and Mixer_Run. The Mixer_Status I want to be connected to a Input that comes from the Motor Aux contact and the Mixer_Run I want to be connected to a Output that will be wired into the Motor Starter Coil. So I was trying to figure out how to connect DB tag to the Physical I/O.
Am I making any sense here? I have been using AB for about 20 years and suddenly I feel like a beginner ever since I have been trying to learn Siemens. I kind of feel like it would be easier to learn Siemens if I had no experience at all with PLC's.
__________________
There is never enough money to do it right but there is always enough money to do it again.
  Reply With Quote
Old January 22nd, 2021, 03:10 PM   #34
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 6,226
Is there more than 1 tank to process?
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old January 22nd, 2021, 03:32 PM   #35
Bullzi
Lifetime Supporting Member
United States

Bullzi is offline
 
Join Date: Jun 2012
Location: Colorado
Posts: 1,530
Yes there are 5.
__________________
There is never enough money to do it right but there is always enough money to do it again.
  Reply With Quote
Old January 22nd, 2021, 03:53 PM   #36
kalabdel
Member
Canada

kalabdel is offline
 
Join Date: Feb 2015
Location: Ontario
Posts: 720
Quote:
Originally Posted by Bullzi View Post
Is it considered "Best Practice" to create a FB to map the physical I/O to DB tags? I will normally do this in the AB world. Just not sure how it is done in the Siemens world.
Thanks!!
I do this all the time but I use an FC as I do not need any persistent data.
I use the FC to very easily make changes and specially to OR inputs and outputs (in separate FCs) for testing and simulating.

I do consider it very good practice.

Last edited by kalabdel; January 22nd, 2021 at 04:19 PM. Reason: and outputs
  Reply With Quote
Old January 22nd, 2021, 04:08 PM   #37
kalabdel
Member
Canada

kalabdel is offline
 
Join Date: Feb 2015
Location: Ontario
Posts: 720
And my view on best practice is that it is individual.

I learn what is considered best practice, look at other people's code, try it out and decide if it works for me.

If one way appeals to my brain and how I process things then that's the best way; specially for writing code, my eyes/brain like to see things organized in a certain way and feels more intuitive then that's best practice for me.


And to your point about learning Siemens, I suggest you take your time and not to do it perfectly Siemens, whatever that is, focus on the task and learn along the way; unless the object is to learn Siemens.
  Reply With Quote
Old January 22nd, 2021, 06:42 PM   #38
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 6,226
Example tank program using a UDT and some I/O
Attached Files
File Type: zip tank.zip (393.7 KB, 9 views)
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old January 22nd, 2021, 10:42 PM   #39
kalabdel
Member
Canada

kalabdel is offline
 
Join Date: Feb 2015
Location: Ontario
Posts: 720
Talking asdf

Quote:

Quote:
Electrical data

Pulse versionPulse “Low Power” version12 - 36 V DC, filtered and regulated12 - 36 V DC filtered and regulated (via Bürkert transmitter)



Thanks LD.



The boss just sent me this spaghetti diagram of additions the customer wants us to make and we're almost done building the panel . Please make the necessary changes and send a list of the any additional hardware we need to squeeze in this already crowded pane.



Much appreciated.

Attached Images
File Type: png diag0.png (112.5 KB, 37 views)
  Reply With Quote
Old January 25th, 2021, 05:40 PM   #40
Bullzi
Lifetime Supporting Member
United States

Bullzi is offline
 
Join Date: Jun 2012
Location: Colorado
Posts: 1,530
Thanks LD,
I got some very valuable "tips" from your example. I appreciate the time you have taken to help me during this post!!
__________________
There is never enough money to do it right but there is always enough money to do it again.
  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
Migrate S7 200 Project to Tia shashi616 LIVE PLC Questions And Answers 3 March 1st, 2020 01:15 PM
comparison of s7 300 & s7 1200 janardhan26reddy LIVE PLC Questions And Answers 7 January 12th, 2015 03:15 PM
Convert TIA Project to Step7 natcheappan LIVE PLC Questions And Answers 3 November 20th, 2014 02:15 PM
s7 1200 to red lion controls johnmck66 LIVE PLC Questions And Answers 4 June 1st, 2011 02:47 AM
Funny effects when uploading project to S7 300 CPU RMA LIVE PLC Questions And Answers 9 October 28th, 2004 08:44 AM


All times are GMT -4. The time now is 09:59 AM.


.