¿Un FB con la variable bar3? La interfaz se queda grabada en el DB de instancia — Transcript
Full transcript
- 0:00You open a compressor block and its
- 0:01status is called bar 3.
- 0:03It works, but nobody knows what it means
- 0:05without tracking the whole program.
- 0:07There is a test I run on any PLC program
- 0:08when I want to know if the person who
- 0:10made it knew what they were doing. I
- 0:12open a random FB without looking at the
- 0:14header comment, without asking anyone,
- 0:17and I look only at the interface, the
- 0:19inputs, outputs, and in-outs. If that's
- 0:22enough to know what the block does,
- 0:24someone thought of me before writing it
- 0:25. If I see in1, IN2, in3, AUX, A2, bit 7
- 0:29, that programmer didn't structure
- 0:32anything; they just made it work. The
- 0:35thing with Siemens PLCs is, when you
- 0:38program an FB in Portal, the interface
- 0:40you declare as input, output, in-out, or
- 0:42static is not just an internal detail.
- 0:45It gets etched into the instance DB
- 0:47forever with those exact names, even if
- 0:49the variable is named differently in the
- 0:51call.
- 0:52That is, those names will be inherited
- 0:54by anyone who calls that block after you
- 0:56, and they will also be seen by anyone
- 0:58reading the instance DB from the HMI or
- 1:00a watch table while trying to understand
- 1:03why a machine won't start at 3 a.m. I've
- 1:05opened projects with compressor FBs
- 1:06where the equipment status was in a
- 1:08variable called barres barres of type
- 1:10int.
- 1:12No idea what each number meant without
- 1:13going to the segment where it was
- 1:15written. And that is where it really
- 1:17grinds my gears. The program worked
- 1:19perfectly, but that programmer didn't
- 1:20care in the slightest about who would
- 1:22touch that code later, not even
- 1:24themselves in 6 months 'time. My rule,
- 1:26which I always apply when declaring an
- 1:28interface, is that the name must say
- 1:30what it is, not how it is used.
- 1:32Compressor status instead of bar 3.
- 1:35Pressure setpoint bar instead of SP1.
- 1:38If necessary, make it longer but
- 1:40readable. If an input is a case-type
- 1:42status code, like the stage variable I
- 1:44use in my equipment FBs where a number
- 1:46between one and 3 tells you if the
- 1:48compressor is available, I state it in
- 1:50the comment on that same interface line
- 1:52; not in a separate PDF, not in the head
- 1:54of the person who wrote it. And I always
- 1:56separate the physical input from the
- 1:58process variable. I never put a direct
- 2:00percentage sign inside the logic of an
- 2:02equipment FB. I go through the mapped DB
- 2:04first, and the FB receives the variable
- 2:06with a process name.
- 2:08I do this because the day someone
- 2:09replaces that sensor or changes its
- 2:11physical address, they shouldn't have to
- 2:13touch a single line of business logic.
- 2:15Anyone can get an engine to start by
- 2:16trial and error. But having the next
- 2:18person who opens your project not need
- 2:20to call you—that’s a different story.
About this transcript
This page contains the full transcript of ¿Un FB con la variable bar3? La interfaz se queda grabada en el DB de instancia by Programación Multidisciplinar, generated from the public captions YouTube serves with the video. The transcript has 481 words across 70 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.