0:05
AI is a genuinely useful helper when you
0:07
are writing PLC code, but it is a
0:09
helper, not a programmer and definitely
0:11
not a safety system. Over the past
0:14
while, I have developed a set of rules I
0:16
follow every time I let an AI assistant
0:18
near a PLC program and I want to share
0:20
them with you. Follow these and AI will
0:22
save you time and teach you a lot.
0:24
Ignore them and it will eventually bite
0:27
I have grouped them so they are easy to
0:29
remember. If you only take one thing
0:31
away, take the golden rule at the end.
0:35
Detailed information contained in this
0:36
video can be found at acccca.ca.
0:40
A link has been put in the description
0:41
below. The website offers extensive
0:44
links, references, and coding samples,
0:46
making it a one-stop shop for all your
0:48
automation queries. Once again, that is
0:55
Safety comes first. Now, these are
0:58
One, never let AI generated logic
1:00
control a real output until you have
1:01
verified it yourself. Test with the
1:04
field wiring disconnected. Watch the
1:06
output indicator, not the motor. Two, AI
1:09
does not know your safety requirements.
1:11
Emergency stops, safety relays, light
1:14
curtains, and guard interlocks are your
1:15
responsibility. Do not ask AI to handle
1:20
Three, keep true safety functions out of
1:22
the PLC and out of the AI scope
1:24
entirely. Safety rated hardware handles
1:26
safety. A standard PLC and an AI writing
1:29
for it is for control, not for
1:34
Four, you decide the failsafe design,
1:36
not the AI. Normally, close stop buttons
1:39
deenergize to stop broken wire behavior.
1:41
You specify these and you confirm the AI
1:47
Treat AI as an assistant, not an
1:51
Five, you are the programmer of record.
1:54
You own the code. You sign off on it.
1:56
And you are responsible for what it
2:00
Six, never paste AI logic straight into
2:03
a running machine ever. There is no
2:05
exception to this one.
2:07
Seven, always ask the AI to explain its
2:10
logic back to you in plain English. Then
2:11
check that explanation against what you
2:13
know about your machine and your wiring.
2:16
Eight, assume the AI can be confidently
2:18
wrong. It will invent instruction names,
2:20
use the wrong addressing, or produce
2:22
logic that reads fine but fails on the
2:24
first edge case. Trust nothing until you
2:30
Give the AI good information.
2:33
Nine, tell it exactly which PLC and
2:35
language you are using. For example,
2:37
automation direct click PLC ladder logic
2:40
instruction sets and addressing differ
2:42
from brand to brand and a generic answer
2:44
will not match your software.
2:47
10. Describe the machine precisely.
2:49
Every input and output with its real
2:51
address, how each button is wired,
2:53
normally open or normally closed, what
2:55
each output drives, and the sequence of
2:59
11. Work in small pieces. Ask for one
3:01
rung or one function at a time and build
3:03
the program up. Do not ask it to write
3:05
the whole thing in one shot. That is
3:07
where hidden mistakes live.
3:10
12. State your constraints up front.
3:12
Retentive versus non-retentive timer
3:14
units. what should happen at power up
3:16
and any interlocks that must always
3:22
Verify everything before it runs.
3:25
13. Cross-check every instruction and
3:27
address against the manufacturer's
3:28
manual or instruction set. If the AI
3:31
used an instruction, confirm it actually
3:33
exists on your platform and works the
3:38
14. Prove the concept in a free online
3:39
ladder simulator first, then test on the
3:41
real PLC with the outputs isolated.
3:43
Remember that some software, the click
3:46
software for example, has no offline
3:48
simulator. So you test on connected
3:50
hardware using the data or monitoring
3:52
view with the field wiring off.
3:56
15. Test the edge cases the AI forgets.
3:59
Power up state, switching modes, losing
4:01
an input, rapid button presses, and
4:03
[music] what happens if a wire breaks?
4:05
This is where AI logic usually falls
4:08
16. Watch for logic races and timing
4:11
problems. Missing seal in one shots that
4:13
fire twice. Interlocks that depend on
4:15
scan order. These read as correct on the
4:17
page and misbehave in real time.
4:22
Protect your data and your company.
4:25
17. Do not paste proprietary or customer
4:28
code, passwords, IP addresses, or plant
4:30
details into a public AI tool. Strip
4:33
that information out first or use
4:34
generic placeholders.
4:37
18. Check your company's policy on AI
4:39
use before you put any work-related code
4:41
into an assistant. Many employers now
4:44
have rules about this and it is easier
4:48
If you are enjoying this video, please
4:49
hit the like button below. Keeping up
4:52
with all the latest automation
4:53
innovations can be difficult, so hit the
4:55
subscribe button. Remember to hit the
4:57
bell beside your subscription to receive
5:03
Use AI to get better, not to skip
5:07
19. Ask why, not just what. When the AI
5:10
gives you a rung, have it explain why
5:11
each instruction is there. Learn the
5:14
instructions so next time you do not
5:17
20. Let it help with documentation. AI
5:19
is good at drafting rung comments and
5:21
nicknames, but read them because a wrong
5:23
comment is worse than no comment.
5:26
21. Use it to troubleshoot and review
5:28
existing code. Describe a rung you did
5:30
not write and ask what it does and what
5:32
could break it. This is one of the most
5:35
valuable things it does.
5:37
22. Keep a human in the loop for
5:39
anything important. A second set of
5:41
human eyes catches what both you and the
5:43
AI missed. And always back up your
5:45
program before you change it.
5:49
The golden rule. If you cannot explain
5:52
what a rung does, do not download it to
5:54
a PLC. AI can help you write it, help
5:57
you understand it, and help you check
5:59
it, but you are the one who has to stand
6:05
If you have any questions or need
6:06
further information, please contact me.
6:09
I hope this is helpful to you.