YouTube2Text

¿Un FB con la variable bar3? La interfaz se queda grabada en el DB de instancia — Transcript

by Programación Multidisciplinar · 481 words · 70 segments · language en · Watch on YouTube

Full transcript

  1. 0:00You open a compressor block and its
  2. 0:01status is called bar 3.
  3. 0:03It works, but nobody knows what it means
  4. 0:05without tracking the whole program.
  5. 0:07There is a test I run on any PLC program
  6. 0:08when I want to know if the person who
  7. 0:10made it knew what they were doing. I
  8. 0:12open a random FB without looking at the
  9. 0:14header comment, without asking anyone,
  10. 0:17and I look only at the interface, the
  11. 0:19inputs, outputs, and in-outs. If that's
  12. 0:22enough to know what the block does,
  13. 0:24someone thought of me before writing it
  14. 0:25. If I see in1, IN2, in3, AUX, A2, bit 7
  15. 0:29, that programmer didn't structure
  16. 0:32anything; they just made it work. The
  17. 0:35thing with Siemens PLCs is, when you
  18. 0:38program an FB in Portal, the interface
  19. 0:40you declare as input, output, in-out, or
  20. 0:42static is not just an internal detail.
  21. 0:45It gets etched into the instance DB
  22. 0:47forever with those exact names, even if
  23. 0:49the variable is named differently in the
  24. 0:51call.
  25. 0:52That is, those names will be inherited
  26. 0:54by anyone who calls that block after you
  27. 0:56, and they will also be seen by anyone
  28. 0:58reading the instance DB from the HMI or
  29. 1:00a watch table while trying to understand
  30. 1:03why a machine won't start at 3 a.m. I've
  31. 1:05opened projects with compressor FBs
  32. 1:06where the equipment status was in a
  33. 1:08variable called barres barres of type
  34. 1:10int.
  35. 1:12No idea what each number meant without
  36. 1:13going to the segment where it was
  37. 1:15written. And that is where it really
  38. 1:17grinds my gears. The program worked
  39. 1:19perfectly, but that programmer didn't
  40. 1:20care in the slightest about who would
  41. 1:22touch that code later, not even
  42. 1:24themselves in 6 months 'time. My rule,
  43. 1:26which I always apply when declaring an
  44. 1:28interface, is that the name must say
  45. 1:30what it is, not how it is used.
  46. 1:32Compressor status instead of bar 3.
  47. 1:35Pressure setpoint bar instead of SP1.
  48. 1:38If necessary, make it longer but
  49. 1:40readable. If an input is a case-type
  50. 1:42status code, like the stage variable I
  51. 1:44use in my equipment FBs where a number
  52. 1:46between one and 3 tells you if the
  53. 1:48compressor is available, I state it in
  54. 1:50the comment on that same interface line
  55. 1:52; not in a separate PDF, not in the head
  56. 1:54of the person who wrote it. And I always
  57. 1:56separate the physical input from the
  58. 1:58process variable. I never put a direct
  59. 2:00percentage sign inside the logic of an
  60. 2:02equipment FB. I go through the mapped DB
  61. 2:04first, and the FB receives the variable
  62. 2:06with a process name.
  63. 2:08I do this because the day someone
  64. 2:09replaces that sensor or changes its
  65. 2:11physical address, they shouldn't have to
  66. 2:13touch a single line of business logic.
  67. 2:15Anyone can get an engine to start by
  68. 2:16trial and error. But having the next
  69. 2:18person who opens your project not need
  70. 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.