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,641
Hi, I have had problem with upgrading some projects from v16 to v18. I tried it on 3 diffrent computers. I want to post this so that anyone that...
Replies
3
Views
65
I am running CCW 13 trying to upload to a micro 820 vers.12 I get an output message OPC server is unable to load project controller. Please help!
Replies
3
Views
143
Hello, I am trying to get a Yokogawa Hart pressure Transmitter and a Rosemount Temp Transmitter to read on a 1769-IF4 module on an L33ERM...
Replies
10
Views
364
I have just installed Studio 5000 V30.11 on my Windows 11 Pro machine. First I had an "Invalid Pointer" error that required me to update Factory...
Replies
2
Views
110
Back
Top Bottom