Hey there! I totally get that 'this feels wrong' feeling when moving from physical wiring diagrams to abstract code. It's like going from seeing electricity flow through wires to reading a novel about electricity! Here's what really helped me and others who've made this transition:
First, think of structured text as just another way to describe the same electrical logic you already know. Instead of visualizing physical contacts and coils, you're writing IF-THEN statements that do exactly the same thing. That 'IF Input1 AND Input2 THEN Output1' is just your familiar AND gate in text form.
For debugging, start by writing small sections of structured text that directly correspond to ladder rungs you understand well. Then use the online monitoring tools in your PLC software to watch variables change in real-time - it's like putting a test light on your code! Many engineers find that creating 'pseudocode' comments first helps bridge the gap: write what you want to happen in plain English, then translate it to structured text.
The biggest mental shift is realizing that structured text actually gives you more power - you can do complex math, loops, and data handling that would be nightmares in ladder logic. Start with simple on/off controls, then gradually add more complex logic as you get comfortable. Remember, the PLC still executes one line at a time, just like scanning ladder rungs!