XGB PLC SFC Quick Simulator Tutorial

The PLC Simulator is a valuable tool for testing and troubleshooting Sequential Function Chart (SFC) programs within the XG5000 programming software. It enables users to simulate the functionality of a Programmable Logic Controller (LS Electric PLC) without needing any physical hardware. This feature makes it an excellent resource for both novices and seasoned programmers. Furthermore, the XG5000 programming software is free, allowing you to verify your logic before investing in hardware.
XGB PLC SFC Quick Simulator Tutorial
In this session, we will leverage the PLC Simulator within the XG5000 programming software to explore Sequential Function Charts (SFC). The graphical step and transition views significantly ease the troubleshooting process for SFC programs. Although SFC programming is frequently underappreciated, it stands out as an effective method for program development. This approach allows you to translate your program’s sequence of operations (Step 3 of 5 in the program development process) directly into the PLC.

The simulation and monitoring screens will aid you in visualizing and refining your logical sequence of operations, concentrating on one section of your logic at a time. During this session, we will demonstrate how to simulate the Start-Stop circuit we previously developed in the XG5000 programming software before transferring it to the actual XGB PLC. Let’s get started!
Previously in this LS Electric XGB series, we have done the following:
Transform Automation with LS XGB PLC: The Solution
Unboxing and Powering Video
Install & Com w/ XG5000 PLCVideo
LS Electric XGB PLC Variables and ScopeVideo
Wiring Discrete I/O to an XGB PLCVideo
XGB PLC Ladder Logic First ProgramVideo
XGB PLC Simulator Ladder Logic DiagramVideo
XGB PLC Structured Text First ProgramVideo
XGB PLC Simulator Structured Text (ST)Video
XGB PLC Sequential Function Chart (SFC) First Program – Video
See the list of references for the XGB PLC, including the frequently asked questions (FAQ) at the end of this post.

Open the XG5000 Programming Software

Open the XG5000 programming software on your computer. Once the software runs, we can open the start-stop sequential function chart project we created last time.
Open the Start Stop Circuit
Select the open project icon on the main screen or select main menu | Project | Open Project… Alternatively, you can use the shortcut Ctrl + o.
Open XG5000 Program
The default directory is located under C:\XG5000\Projects. Please select the project we created last time and choose Open.
View XG5000 Program Code
Our sequential function chart (SFC) diagram will now be displayed. Double-click on the Sample_SFC program under the scan program window in the project window. This will call up our SFC program. We are offline to the controller due to the blue bar at the bottom of the XG5000 software window.

Start the PLC Simulator and Transfer the Program

Start the PLC simulator by selecting the icon on the main screen.
XGB PLC SFC Quick Simulator Tutorial
This can also be started by the main menu | Tools | Start Simulator.
Start the Simulator
The XG-SIM window will first be displayed.
Write code to PLC
Then, the XG5000 will be shown with communication to the simulator. This is the red bar at the bottom of the XG5000 programming software.
The Write to PLC window will automatically be displayed. XG5000 software treats the simulator like a PLC controller, and you must establish communication and transfer the program. We will leave all of the default settings the same and select OK.
Monitor PLC Program Code
Our sequential function chart start-stop circuit will be loaded into the PLC simulator. The XG5000 writing complete message will be displayed. Select OK.
Run PLC SFC Programming Code
The PLC simulator will be placed automatically in RUN mode. We can close the check program window by selecting the X in the top right corner. Our program is now being executed in the simulator. You can start and stop this scan of the program in the simulator by using the icons on the main menu.

Monitoring and Testing the Sequential Function Chart (SFC) Code

We can use the PLC simulator’s monitoring and troubleshooting tools to observe the behavior of the Sequential Function Chart program.
Monitoring Logic
The monitor icon is automatically turned on when we use the PLC simulator.
We can display the inputs and outputs we want to monitor using the monitoring windows.
Modifying Program Code - Online / Offline
Selecting the SFC code or variables is an easy way to add the variables to the monitor list. Once the variables or code are highlighted, select Add from the main menu | Monitor | Add to variable monitor…
XGB PLC SFC Quick Simulator Tutorial
This can also be done by right-clicking on the highlighted variables or code, selecting “Add to variable monitor,” and then choosing the monitor number.

Your selected variable will now be displayed.
XGB PLC SFC Quick Simulator Tutorial
We can change the input variables and observe our program behavior by double-clicking on them.
See the video below to demonstrate using the XG5000 PLC simulator with our sequential function chart program code.
XGB PLC SFC Quick Simulator Tutorial
Adjustments can be made in the program using XG5000 when issues or errors are discovered. We can create and save the necessary changes to our SFC program code offline and then download the code again. The ladder logic or structured text code can be modified using online editing within the SFC logic.

Using the PLC simulator in the XG5000 programming software for Sequential Function Charts (SFC) effectively tests and debugs PLC programs without physical hardware. It provides a safe and efficient environment for programmers to validate their logic and ensure proper operation before deploying it to real-world applications. By following the steps outlined above, you can harness the power of the PLC simulator to streamline your development process and deliver reliable PLC programs.

Now that you know more about the XGB PLC Simulator for SFC programming, click here to learn more about entering and modifying your SFC code.
To see all of the posts and videos for the XGB PLC, click here.

Download the Start Stop Circuit Sample Program and try it yourself. Let me know how you make out in the comments below.

Watch on YouTube: XGB PLC SFC Quick Simulator Tutorial

LS XGB PLC Additional Information:

If you have any questions or need further information, please contact me.
Thank you,
Garry


If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLCs are not challenging to know and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimals, Hexadecimal, ASCII, and Floating Points.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available for free download. The link is included when you subscribe to ACC Automation.

Leave a Comment