Join me as I take on the challenge of creating a simple start-stop circuit in ladder logic using DeepSeek AI—let’s see if it can nail it! In industrial automation, the ability to design and simulate control circuits is essential for ensuring the functionality and safety of various systems. One of the fundamental circuits used in control systems is the start-stop circuit.
Today, we will explore creating a start-stop circuit using DeepSeek AI for ladder logic programming. We will enter and test this generated code using the completely free Do-More Designer Software PLC Simulator. Let’s get started.
Previously, we discussed the BRX Do-More PLC using the Modbus IO Scanner Profile with a Solo process temperature controller and Click PLUS PLC. Here is a video of that process. Serial Modbus RTU was also done using the IO Scanner. This video will show communication to the Solo temperature controller using RS485 (twisted pair).
Our entire BRX Do-More Series of PLC can be found here.
The Do-More FAQ can be helpful if you use the Do-More platform.
What is DeepSeek?
DeepSeek is a Chinese artificial intelligence (AI) startup that develops open-source large language models (LLMs). DeepSeek’s AI models are designed to be more cost-effective than other AI models while still being capable of generating human-like responses.
It may provide tools or solutions that enhance efficiency in programming or controlling machinery, such as through ladder logic diagrams used in PLC (Programmable Logic Controller) programming.
What is a Start-Stop Circuit?
A start-stop circuit is a fundamental control process that allows users to start and stop a motor or other device at will. This circuit typically involves push buttons—one for starting (normally open) and one for stopping (normally closed).
Anyone working in automation must understand how a start-stop circuit operates. This knowledge serves as a foundation for more complex systems.
Asking if DeepSeek can program a PLC.
After logging into DeepSeek on your browser, select the Deep Think (R1) option. This will allow you to understand how the AI is answering your question. We will ask, “Can you program a BRX Do-More PLC in ladder logic?”
Thought for 40 seconds:
Okay, so the user is asking if I can program a BRX Do-More PLC using ladder logic. Let me start by recalling what I know about BRX series PLCs. I remember that BRX is a product line from AutomationDirect, and the Do-More series is their newer generation of PLCs designed for more advanced control applications.
First, I need to confirm whether the BRX Do-More PLC supports ladder logic programming. From what I’ve learned, most PLCs, especially those aimed at industrial automation, do support ladder logic because it’s a widely used standard. But I should double-check if there are any exceptions or specific details about the BRX series.
I think AutomationDirect provides software called Do-More Designer for programming their PLCs. Let me verify that. Yes, Do-More Designer is the official IDE for BRX Do-More PLCs. Now, does this software support ladder logic? The name “Designer” might imply a multi-language environment. Ladder logic is one of the IEC 61131-3 standard languages, which also includes structured text, function block diagrams, etc. Since BRX is a modern PLC, it’s likely compliant with these standards.
But maybe the user is specifically asking about ladder logic because they are more comfortable with it. I should confirm that ladder logic is not only supported but is a primary method for programming these PLCs. Looking back at AutomationDirect’s documentation, the BRX series does indeed support ladder logic along with other languages. The Do-More Designer software uses ladder logic as one of its main programming paradigms, which is good news for the user.
Now, considering the user might be someone new to BRX PLCs, they might need a basic example. I should provide a simple ladder logic example, like turning on an output when an input is activated. But wait, I need to make sure about the addressing scheme for BRX PLCs. For example, discrete inputs might be addressed as X0, X1, etc., and outputs as Y0, Y1. However, BRX PLCs might use a different addressing convention. Let me check that.
Upon reviewing, BRX PLCs use a tag-based system, which allows users to define symbolic names for inputs, outputs, and other variables. However, they also support direct addressing. For example, inputs could be referenced as `X0`, `X1`, and outputs as `Y0`, `Y1`. So a simple ladder rung would have a normally open contact (X0) in series with a coil (Y0). That would make Y0 turn on when X0 is activated.
But the user might also benefit from knowing how the software environment works. For instance, creating a new project in Do-More Designer, selecting the BRX model, configuring the hardware, and then writing the ladder logic. Including steps like compiling and downloading the program to the PLC would be helpful.
Another point to consider is any specific instructions or features unique to the BRX series. For example, Do-More PLCs have advanced instructions for motion control, networking, and data handling. But for a basic example, sticking with simple contacts and coils is better.
I should also mention that Do-More Designer provides simulation capabilities, allowing users to test their ladder logic without physical hardware. This is useful for troubleshooting and learning.
Wait, the user might also want to know about documentation or resources. Including a note about AutomationDirect’s website, user manuals, and example projects could be helpful. But since the question is about whether it’s possible and a simple example, maybe that’s beyond the scope unless the user asks for it.
In summary, the answer should confirm that BRX Do-More PLCs can be programmed in ladder logic using Do-More Designer, provide a basic example, and mention the software’s features relevant to ladder logic programming. Also, ensure that the example uses the correct addressing and syntax specific to BRX PLCs.
Yes, you can program a BRX Do-More PLC using ladder logic, which is fully supported by AutomationDirect’s Do-More Designer software. Here’s a concise breakdown:
Key Details
-
Software: Use Do-More Designer (free download from AutomationDirect) to write, simulate, and deploy ladder logic.
-
Ladder Logic Support:
-
BRX PLCs natively support ladder logic (LD) as part of the IEC 61131-3 standard.
-
Ideal for industrial automation tasks like relays, timers, counters, and complex control logic.
-
Simple Example: Turn On an Output with an Input
Ladder Rung:
| X0 Y0 | |----] [----( )----|
-
X0: Input (e.g., a sensor or button).
-
Y0: Output (e.g., a motor or light).
-
When
X0
is activated,Y0
energizes.
Steps to Program
-
Create a Project: Open Do-More Designer, select your BRX model.
-
Configure I/O: Map physical inputs/outputs to addresses (e.g.,
X0
,Y0
). -
Write Logic: Drag-and-drop ladder elements (contacts, coils, timers).
-
Simulate: Test logic in the built-in emulator.
-
Download: Transfer the program to the PLC via USB or Ethernet.
Advanced Features
-
Tag-Based Addressing: Use symbolic names (e.g.,
StartButton
instead ofX0
). -
Integrated Instructions: Timers (
TON
), counters (CTU
), PID loops, and motion control. -
Networking: Easily integrate with HMI, SCADA, or other PLCs via Ethernet/IP or Modbus.
Documentation: Refer to AutomationDirect’s BRX Manuals for detailed guides and examples. Ladder logic is a core strength of the BRX platform, making it accessible for both beginners and advanced users.
Here’s a start-stop latch circuit for the BRX PLC using ladder logic. This classic “seal-in” circuit keeps the motor (Y1
) running after the start button (X1
) is released, and stops the motor when the stop button (X2
) is pressed.
Ladder Logic Diagram
X2 X1 Y1 +----]/[-----] [--+----( )--+ | | | | Y1 | +--------]/[------] [--------+
Explanation
-
Stop Button (
X2
):-
Physically wired as a normally closed (NC) button for safety (open when pressed).
-
Represented as
X2
with a normally closed contact (]/[
) in the ladder logic.
-
-
Start Button (
X1
):-
Physically wired as a normally open (NO) button (closed when pressed).
-
Represented as
X1
with a normally open contact (] [
).
-
-
Motor Output (
Y1
):-
The output coil
Y1
is energized when the circuit is closed. -
A self-sealing (latching) contact (
Y1
in parallel withX1
) keepsY1
energized afterX1
is released.
-
Behavior
-
Start: When
X1
is pressed, current flows throughX2
(closed) andX1
(closed), energizingY1
. -
Latch: Once
Y1
is energized, its parallel contact closes, maintaining the circuit even afterX1
is released. -
Stop: When
X2
is pressed, its contact opens, breaking the circuit and de-energizingY1
.
Key Notes
-
Safety: The stop button (
X2
) is NC in hardware to ensure the motor stops if the circuit loses power or a wire breaks. -
Addressing: Use symbolic tags (e.g.,
Start
,Stop
,Motor
) in Do-More Designer for readability. -
Debouncing: Add timers if physical buttons cause noise (not typically needed for basic setups).
Testing in Do-More Designer
-
Open the software and configure your BRX PLC model.
-
Assign
X1
(start),X2
(stop), andY1
(motor) in the I/O mapping. -
Program the ladder rung above.
-
Simulate using the built-in emulator to verify the latch/unlatch behavior.
-
Download to the PLC and test with physical buttons.
For more details, refer to the BRX User Manual. This circuit is foundational for motor controls, conveyor systems, and other industrial automation tasks.
If we try this out in the BRX Do-More Designer PLC Simulator, we can turn the output on, but it cannot turn off.
Let’s see if DeepSeek can modify the program for the correct ladder logic for the start-stop circuit. “The ladder circuit diagram is incorrect.”
Thought for 123 seconds:
Okay, the user said the ladder circuit diagram I provided is incorrect. Let me double-check what I wrote.
In my previous response, the ladder logic was drawn with X2 (stop) as a normally closed contact, X1 (start) as normally open, and Y1 in parallel with X1. That should create a seal-in circuit. Wait, but maybe the way I drew the rung is structurally wrong in ladder logic terms. Let me visualize it again.
The user is using a BRX PLC, so the contacts and coils need to follow the correct syntax. The stop button X2 is typically a normally closed (NC) physical button, so in the ladder logic, it should be represented as a normally open (NO) contact because when the button is not pressed, the circuit is closed. Wait, no, that’s a common confusion. Let me clarify:
Physical NC stop button wired to the PLC input: when the button is not pressed, the input is active (on), and when pressed, the input is off. So in the ladder logic, to have the stop button act as a break, we should use a normally closed (NC) contact symbol (]/[), which will open when the input X2 is activated (button pressed). So when X2 is pressed, the contact opens, breaking the circuit. That part seems right.
But maybe the way the parallel branch is drawn is incorrect. In ladder logic, the seal-in contact Y1 should be in parallel with X1. So the start button X1 (NO) and Y1 (NO) are in parallel, both in series with the stop button X2 (NC). Wait, no. The standard start-stop circuit has the stop NC contact in series with the start NO contact and the seal-in contact. Let me sketch it mentally:
The main rung should be: Stop (X2 NC) contact in series with the combination of Start (X1 NO) in parallel with Y1 NO contact, then driving the Y1 coil. So the structure is:
X2 (NC) — [X1 (NO) || Y1 (NO)] — Y1 coil
But in ladder logic, the parallel branch is created by a branch around the X1 contact. So the correct diagram would have X2 NC in series with X1 NO, then a branch around X1 that has Y1 NO. Then the Y1 coil. Let me confirm with a standard start-stop ladder:
The correct ladder is:
| X2 X1 Y1 |
|—-]/[—-] [—-( )–|
| | |
| Y1 |
|—-]/[—-] [———|
Wait, no. The seal-in contact is Y1 in parallel with X1. So the structure is:
– The stop button X2 (NC) contact is first.
– Then, a branch where one path is the start button X1 (NO) and the other path is the Y1 (NO) contact in parallel.
– Then the Y1 coil.
So the ladder rung would be:
X2 (NC) contact in series with the parallel combination of X1 (NO) and Y1 (NO), then the Y1 coil.
But in ladder logic notation, you can’t have a parallel branch after a series element without using a vertical line. Let me represent it properly.
The correct ladder should be:
| X2 X1 Y1 |
|—-]/[—+—-] [—-+—-( )–|
| | | |
| +—-] [—-+ |
| Y1 |
Wait, no. The Y1 contact should be in parallel with X1. So after X2 (NC), there’s a parallel branch: one path is X1 (NO), and the other is Y1 (NO). Both paths lead to the Y1 coil. But how is that drawn?
Alternatively, the correct structure is:
– X2 (NC) is the first contact.
– Then, a branch that splits into two paths:
– Upper path: X1 (NO)
– Lower path: Y1 (NO)
– Both paths then combine and go to the Y1 coil.
So the ladder rung would look like:
| X2 X1 |
|—-]/[—–] [—————-|
| X2 Y1 Y1 |
|—-]/[—–] [———( )—-|
Wait, that’s not right. Maybe I need to draw it with branches. Let me try again.
The correct way is:
Start with X2 (NC) contact. Then, create a parallel branch where one leg is X1 (NO) and the other leg is Y1 (NO). Both legs are in parallel and in series with X2 (NC). Then, the output Y1 coil.
So the ladder rung would be:
| X2 +—-] [—-+
|—-]/[——-| X1 |—-( Y1 )
| +—-] [—-+
| Y1
But how is this represented in text? Maybe the user’s confusion comes from how the parallel branches are depicted. In my initial answer, I might have drawn the Y1 contact in parallel with X1 correctly, but the text representation could be misleading.
Wait, in the original response, the ladder diagram was written as:
X2 X1 Y1
+—-]/[—–] [–+—-( )–+
| | |
| Y1 |
+——–]/[——] [——–+
Which seems incorrect because the Y1 contact is shown as ]/[ (NC) in parallel, which would be wrong. Wait, no. The Y1 contact should be a NO contact (] [) in parallel with X1. So in the original diagram, the Y1 contact was shown as ]/[ (NC), which is incorrect. That’s the mistake!
Ah, here’s the error. The Y1 contact in the parallel branch should be a normally open (NO) contact, not normally closed (NC). In my initial answer, I wrote Y1 as ]/[ which is NC, but it should be ] [. That’s a critical mistake. The seal-in contact must be a NO contact of Y1 in parallel with X1. So the correct rung should have Y1 as a NO contact in parallel with X1.
So the user is correct in pointing out the diagram is wrong. The Y1 contact was incorrectly shown as NC, which would prevent the circuit from latching. That’s a serious error.
So the corrected ladder diagram should have Y1 as a NO contact in parallel with X1. Let me verify this again. Yes, in a standard start-stop circuit, the seal-in contact is a NO contact of the output coil. So when Y1 energizes, its NO contact closes, maintaining the circuit even when X1 is released.
Therefore, my initial response had a mistake in the Y1 contact type. The user is right to point that out, and I need to correct that. Additionally, maybe the structure of the rung wasn’t clear in the text representation, leading to confusion.
Another possible mistake is the placement of the Y1 contact. If in the original diagram, the Y1 contact was in series with X2 instead of in parallel with X1, that would also be incorrect. But based on the text diagram provided, the Y1 contact was in parallel with X1, but as an NC contact, which is wrong.
So the main correction is changing the Y1 contact in the parallel branch from NC (]/[) to NO (] [). That’s crucial for the latching to work.
Additionally, in ladder logic, the stop button is typically represented as a normally closed (NC) contact in the logic if the physical button is wired as NC. So in the ladder, X2 (stop) should be a normally open contact if the physical button is NC. Wait, no. Let me clarify this point again because this is a common confusion.
Physical wiring: The stop button is a normally closed (NC) button. When not pressed, the circuit is closed, so the PLC input X2 is active (on). When pressed, the circuit opens, X2 turns off.
In ladder logic: To have the stop button act as a “break” when pressed, we use a normally closed (NC) contact for X2. Because when X2 is off (button pressed), the NC contact opens, breaking the circuit. If the physical stop is NC, the ladder logic contact should be NC (]/[). That part was correct in the original answer.
So the original mistake was in the Y1 contact being NC instead of NO. So correcting that would fix the diagram.
Therefore, the correct ladder diagram should be:
“`
X2 X1 Y1
+—-]/[—–] [–+—-( )–+
| | |
| Y1 |
+——–] [——-] [——–+
“`
Wait, no. The parallel branch should be Y1 as a NO contact in parallel with X1. So the text representation would be:
“`
X2 Y1
+—-]/[—-+—-] [—-( )–+
| | |
| +—-] [———-+
| X1 |
+——————————+
“`
But this is getting a bit messy. Let me structure it properly.
The correct ladder rung in text form:
“`
X2 X1 Y1
|—-]/[—–] [–+—-( )—-|
| | |
| Y1 |
|—-] [———————-|
“`
Wait, no. The Y1 contact should be in parallel with X1. So the correct text-based ladder would be:
“`
X2 +—-] [—-+
|—-]/[——-| X1 |—-( Y1 )—-|
| +—-] [—-+
| Y1
“`
But how to represent this in text? Maybe using ASCII art properly. Alternatively, the user might have expected the Y1 contact to be in parallel with X1, but in the original answer, the Y1 contact was drawn as a NC contact, which is incorrect.
So the corrected diagram should have Y1 as a NO contact (] [) in parallel with X1. The original answer had Y1 as a NC contact (]/[), which is the mistake.
Therefore, the user is correct. The error was in the Y1 contact type in the parallel branch. I need to acknowledge that, apologize, and provide the corrected diagram with Y1 as a NO contact.
Additionally, I should explain why the initial diagram was wrong and how the correction fixes the latching mechanism. This will help the user understand the mistake and ensure they implement the correct logic.
Another possible point is that in some PLCs, the stop button might be programmed as a NO contact if the physical button is wired as NO, but the user specified X2 is the stop, which is typically NC. However, the user didn’t mention the physical wiring, so assuming standard practice where stop buttons are NC and represented as NC contacts in the ladder.
So the key correction is changing the Y1 contact in the parallel branch from NC to NO.
You’re absolutely right—my initial ladder diagram had an error in the Y1 contact type (incorrectly shown as normally closed instead of normally open). Let me provide the corrected circuit with a clear explanation.
Corrected Start-Stop Ladder Logic
X2 X1 Y1 |----]/[-----] [--+----( )----| | | | | Y1 | |----] [----------------------|
Text Representation (for clarity):
X2 (NC) -- [X1 (NO) || Y1 (NO)] -- Y1 Coil
Step-by-Step Explanation
-
Stop Button (
X2
):-
Hardware: Physically wired as a normally closed (NC) button (opens when pressed).
-
Ladder Logic: Represented as a normally closed contact (
]/[
). This ensures the motor stops if the button is pressed or if there’s a wiring fault.
-
-
Start Button (
X1
):-
Hardware: Physically wired as a normally open (NO) button (closes when pressed).
-
Ladder Logic: Represented as a normally open contact (
] [
).
-
-
Seal-In Contact (
Y1
):-
Function: A normally open (NO) contact (
] [
) ofY1
in parallel withX1
. WhenY1
energizes, this contact closes, creating a self-sustaining circuit (latching).
-
-
Motor Output (
Y1
):-
Energizes when the circuit is closed and de-energizes when the circuit breaks.
-
Behavior
-
Starting the Motor:
-
Press
X1
→ The circuit closes throughX2
(closed) andX1
(closed) →Y1
energizes. -
Y1
’s NO contact closes → Latches the circuit even afterX1
is released.
-
-
Stopping the Motor:
-
Press
X2
→X2
’s NC contact opens → The circuit breaks →Y1
de-energizes. -
Y1
’s NO contact reopens → Unlatches the circuit.
-
Key Fixes from Previous Diagram
-
Y1 Contact Type: Changed from
]/[
(NC) to] [
(NO) to enable proper latching. -
Parallel Branch Logic: Ensures
Y1
’s contact is in parallel withX1
(not in series).
Testing in Do-More Designer
-
Assign Addresses:
-
X1
= Start (NO physical button). -
X2
= Stop (NC physical button). -
Y1
= Motor output.
-
-
Simulate:
-
Use the emulator to verify:
-
Press
X1
→Y1
stays on after releasingX1
. -
Press
X2
→Y1
turns off.
-
-
Why This Works
-
Safety:
X2
breaks the circuit when pressed (fail-safe design). -
Latching:
Y1
’s NO contact “seals” the circuit, eliminating the need to holdX1
.
Thank you for catching that error! Let me know if you need further clarification. 😊