Skip to content

OMRON Sysmac Support: From the Chat to the Simulator

AnyAutomation6 min read

Since version 1.146.0, AnyAutomation Studio works with OMRON Sysmac next to TIA Portal and CODESYS. You describe a program for an NJ, NX or NY controller in the chat, the AI writes it in Structured Text or ladder, Studio checks it against your controller, and with Sysmac Studio on the same computer, Studio imports it, builds the controller and starts the simulator, each step after your confirmation. This post walks through the whole path once, from the first prompt to the first test run. The overview with all capabilities and limits is on the page AI for OMRON Sysmac Studio.

Why a general chatbot is not enough for Sysmac

Sysmac Studio has its own dialect of Structured Text, its own instruction set and its own rules for names, and what a controller offers depends on its unit version. A chatbot in the browser writes ST that looks right, and then fails at the import or the build: an instruction your unit version does not have, a name Sysmac Studio rejects, a timer written the way another environment does it. Getting the code from the browser into the project is copy and paste, and the error messages travel back the same way.

Studio closes that loop. The AI knows the controller you selected, every file is checked before it reaches Sysmac Studio, and the build results come back into the editor at the matching line.

Step 1: select your controller

Run OMRON: Select Sysmac Target from the Command Palette, or click the OMRON entry in the status bar. Pick the CPU family (NJ, NX701, NX1P, NX102, NX502 or NY), enter the unit version, for example 1.40, and optionally the model, for example NJ501-1500. The status bar then shows the selection, and the AI and every check work for exactly that controller.

Step 2: let the AI write the program

Describe what the program should do:

"Write a conveyor program for the NJ501 with start, stop and a fault message, the motor output in ladder."

The AI hands the task to a dedicated Sysmac Structured Text specialist. It writes the program as an IEC 61131-10 XML file, the exchange format that Sysmac Studio imports, and it can mix both languages in one file, for example the logic in ST and the motor output in ladder. Before a file is created or replaced, a confirmation card lists the programs, functions and function blocks with their language. After writing, the AI checks the file and corrects its findings until it has no errors.

Step 3: check the file and read it as Structured Text

Every IEC 61131-10 XML file is checked as you open, change and save it. The findings appear in the Problems view and as wavy lines in the editor: names that Sysmac Studio rejects, instructions your controller or its unit version does not offer (with the version that would), variables that are used but never declared, and ladder connections that lead nowhere. With Sysmac Studio installed on the same computer, the file is also checked against the import schema of your installation.

Ladder is hard to review as XML. Open as ST View shows the whole file as read-only Structured Text, with series contacts as AND, parallel branches as OR and coils as assignments, so you can follow the logic line by line, with the findings marked at the matching lines.

Step 4: import and build through Sysmac Studio

With Sysmac Studio on the same computer, Import Selected and Import All in the Import / Export view do the import work for you. Studio starts Sysmac Studio or attaches to the one that is running, creates or opens the project, backs up an existing project, imports the files, saves, builds the controller and shows the build results in the Problems view. A confirmation lists the files, the project and the elements that will be replaced before anything changes, and you watch every step in the Sysmac Studio window.

The import files carry no task assignment, and Studio does not change task settings. The import steps list each program with its task; you add them in Sysmac Studio, save, and click Check Tasks Again to have Studio check the saved project. Without Sysmac Studio on the computer, the import steps list what to do by hand.

The import needs unit version 1.19 or later on NJ, NX701, NX1P and NY controllers, 1.31 or later on NX102 and 1.60 or later on NX502.

Step 5: test in the simulator

Once the build has no errors, run OMRON: Start Simulation, or click Start Simulation in the import steps, and confirm. The status bar shows when the simulator runs or is paused, and OMRON: Pause Simulation and OMRON: Stop Simulation control it from there. Studio works only with the simulator of Sysmac Studio, never with a real controller.

To watch and change values, start the OPC UA server of the simulator in Sysmac Studio and connect to it in the PLC / OPC UA editor of Studio with your user name and password. There you watch the shared variables in a watch table and write new values. The AI can start, pause and stop the simulator for you as well, and read and set values on that connection; before every write it shows the variable and the value and waits for your confirmation.

Working with existing projects

Many OMRON jobs start with a machine that already runs. Click Connect in the OMRON Sysmac side bar and pick a project from the list Sysmac Studio keeps on this computer, or browse for a .smc2 file. The project opens as a read-only tree with its controllers, tasks, programs, function blocks, functions, data types and global variables, and a click shows any of them as Structured Text, ladder included. Sysmac Studio does not have to be installed for that, and Studio never changes the project files.

From there, Export Selected or Export All writes the elements as IEC 61131-10 XML files into your export folder, with a report of what is left to do in Sysmac Studio. Compare with Export Folder shows what differs between the project and the files in the folder, side by side as Structured Text; layout changes in a ladder diagram do not count as a change. The AI reads the same project, first its structure and then single programs, so it can explain a machine you do not know yet or write a change that fits it.

What stays in Sysmac Studio

Downloading to a controller and going online with a real controller stay in Sysmac Studio, where you are in control of them, and so do the task settings, breakpoints and step execution in the simulator. Projects in the older .smc format or protected with a password do not open, function block diagrams are not shown, and safety programs are not part of the OMRON support. Review and test the imported code before it runs on a machine; emergency stop and motor protection belong in a safety controller or a hard-wired circuit. The full list is in the manual under What Is Not Supported Yet.

For the AI you choose the model per task, a cloud model with your own key or a local model on your own hardware, as for TIA Portal and CODESYS.

Which plan you need

OMRON Sysmac is part of the Pro+ and Enterprise plans, see plans and prices. The 30-day free trial unlocks it, and in an existing installation it appears after the update to the current version.

Read more on the page AI for OMRON Sysmac Studio, and find every step in the manual on OMRON Sysmac, including Testing in the Simulator and Comparing a Project with a Folder.

Try it now

Try AnyAutomation Studio free for 30 days

Try the workflows from these articles in your own TIA Portal or CODESYS project.

Free account required: sign in with your email address and a code, then the download starts.

Questions? support@anyautomation.ch