First Project with S7-1200 TIA V16

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.
 
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.
 
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:
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.
 
asdf

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 :sick: . 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.



diag0.png
 
Thanks LD,
I got some very valuable "tips" from your example. I appreciate the time you have taken to help me during this post!!
 

Similar Topics

I need to make my Siemens PLC S7 (1212C) output one digital byte ..Q0.0 - Q0.7 (QB0) … output byte 0 … to represent any number from 0 to 255...
Replies
28
Views
12,580
I'm trying to import a .prj file and I keep getting the error message: Project import error. i Any ideas how to get around this? Thanks.
Replies
0
Views
51
I'd like people's opinions on which manufacturer of hardware they prefer. We are an aerospace manufacturing facility that does little to no SCADA...
Replies
10
Views
483
Hello everyone, In a factory where we installed Citect 7.20 the computer began to show the first signs of end of life. They never considered...
Replies
0
Views
57
Hi All, I've been pulling my hair out trying to fix this for a few days and need some advice. I have V19.01, v20.05, V21, V24, V30, V31, V32...
Replies
5
Views
350
Back
Top Bottom