IMDHMIControls LibraryShop main store

How-to

Running Citect SCADA against a Machine Expert Basic simulation

SCADA and data logging Published 5 min read

Short answer

Yes, on one PC: convert the Twido program to an M221 target in EcoStruxure Machine Expert Basic, run its simulator, and point Citect at the endpoint the simulator exposes. The commissioning gate is the endpoint, protocol and driver match — Modbus TCP on port 502, loopback for a same-PC link — because a running simulation alone proves nothing about the link.

On this page
  1. Choose the software path first
  2. Convert the Twido project to M221
  3. Start the simulator and record the endpoint
  4. Point Citect at the simulator
  5. Prove the link with one tag
  6. Diagnose a failed bench connection
  7. What the bench proves
  8. Questions asked

Yes, on one PC and with no PLC hardware. The path is EcoStruxure Machine Expert Basic: it succeeds TwidoSuite, opens the old program, converts it to an M221 target, and its simulator stands in for the logic controller so that Citect connects to the computer instead of a rack. TwidoSuite no longer receives updates, so it is not the base for a new bench. The commissioning gate is the communication endpoint: the simulator must be listening on Modbus TCP at port 502 where Citect can reach it, with the MODNET driver and matching tag addresses, because a running simulation proves the logic and nothing about the link.

Choose the software path first #

TwidoSuite built the original program, but it is finished software with no further updates. Machine Expert Basic is its successor; it opens and converts TwidoSuite programs, and its documented connection scope is the M221, M200 and M100 controllers with TM2 and TM3 I/O. That scope is why the conversion lands on an M221, the replacement controller in that line.

Decision: build the whole bench in Machine Expert Basic and leave TwidoSuite off it. The only thing TwidoSuite still supplies is the project file.

Convert the Twido project to M221 #

  1. Install Machine Expert Basic from the manufacturer's download page.
  2. Open the TwidoSuite project and run the conversion with an M221 as the target.
  3. Work through the conversion report until zero messages remain. Conversion translates the program; it does not certify equivalence.
  4. Walk the converted logic against the original — timers, counters and anything the report flagged — and fix differences now, in the logic, not later in Citect.
  5. Close this gate before opening the next one: a clean conversion says nothing about communications.

Start the simulator and record the endpoint #

  1. Launch the simulator on the converted application and confirm it reports a running state.
  2. Exercise one input through the simulator's I/O and watch one internal value move. Simulator I/O is built into the tool, so this needs no hardware. If nothing moves here, stop: the fault is in the program, and no Citect setting will fix it.
  3. While it runs, record the endpoint it exposes: protocol, address and port. The documented pattern on Schneider's Control Expert simulator is a valid network IP assigned to the simulator, the SCADA pointed at that address, and TCP 502 confirmed open; hold this simulator to the same three checks.
  4. Pass condition: something answers on that port from the same PC. If nothing is listening, that is the finding — fix the simulator's communication setup before touching Citect, because a driver cannot create an endpoint.

Point Citect at the simulator #

If you have never stood up a same-PC link at all, the generic walk-through in how to simulate a Modbus TCP SCADA link on one PC covers it with a slave emulator; here the simulator plays the slave. The protocol is Modbus TCP, whose server port is fixed at 502 by the Modbus messaging-on-TCP specification, so the only address decision is loopback versus the PC's LAN address. The M262-over-OPC-UA route belongs to full Machine Expert, not Basic.

  1. Create the device connection in the Citect project on the MODNET driver, the driver that serves Modbus in the Citect family.
  2. Address a same-PC link at the loopback address 127.0.0.1. If the simulator binds to the PC's LAN address instead, as the Control Expert simulator does, use the address you recorded in the previous section.
  3. Allow inbound connections on TCP 502 through the Windows firewall for the simulator process; a silent block looks identical to a dead endpoint in Citect.
  4. Map two or three test tags whose addresses and data types you have confirmed — one read, one write, one scaled value — and leave the full tag database for later. The register-addressing details in fixing Machine SCADA Expert Modbus TCP reads to a TM221 carry over to this driver family.
  5. Compile the project to zero errors before starting the runtime.

Illustrative example, with the arithmetic shown. Test object: one 16-bit holding register, unsigned integer, initial value 0, carrying a pressure scaled from 0-1000 counts to 0.0-100.0 bar.

  • Read test: set the register to 600 in the simulator. With the tag scaled so 0 counts is 0.0 bar and 1000 counts is 100.0 bar, the tag must display 600 × 100.0 / 1000 = 60.0 bar.
  • Write test: set the tag to 75.0 bar from Citect. The register must read 75.0 × 1000 / 100.0 = 750 counts in the simulator.
  • Tracking test: drive an input that moves the register and confirm the tag follows within a few poll periods at whatever rate you configured.
Check You set Must show Arithmetic
Read 600 counts in the simulator 60.0 bar on the tag 600 × 100.0 / 1000 = 60.0
Write 75.0 bar on the tag 750 counts in the simulator 75.0 × 1000 / 100.0 = 750
Tracking one simulator input tag follows within a few polls —

Import the rest of the tag database only after all three pass. Then add the loss-of-communication alarm described in how to create a SCADA PLC communication alarm for link loss, so a dropped simulator connection announces itself instead of freezing values on the screen.

Diagnose a failed bench connection #

Symptom Where the fault lives What to do
Simulator values never move Program or test inputs Confirm the run state and that inputs reach the simulator I/O; do not touch Citect yet
"Gateway not configured properly" on the engineering side The gateway between the Schneider software and a PLC or simulator Correct that configuration first; Citect is not part of this message
Citect times out, nothing answers Endpoint or firewall Confirm the simulator is listening, the address matches your record, and inbound TCP 502 is allowed
Connects, but values are zero or stale Tags Re-check each address and data type against the simulator variable, one register at a time
Converted logic misbehaves Conversion Clear the remaining conversion messages and compare the logic with the original before blaming the link

What the bench proves #

The bench proves three things: the converted logic runs, the endpoint carries Modbus TCP between the simulator and Citect, and the tags track in both directions. It proves nothing about physical I/O wiring, the real controller's scan behavior, or the installed network's loading. Never satisfy an interlock or emergency-stop test with the simulated link on a machine that will run; those tests belong to the physical controller and its safety components.

Questions asked

Can I keep using TwidoSuite for this instead of converting?

You can still open an old project in it, but TwidoSuite no longer receives updates, so it is the wrong base for a new bench. EcoStruxure Machine Expert Basic is its successor and opens the TwidoSuite project directly, so nothing is lost by converting. Build the bench in Machine Expert Basic.

Will Machine Expert Basic connect to the real Twido controller after conversion?

No. Its documented connection scope is the M221, M200 and M100 controllers plus TM2 and TM3 I/O, so the converted program downloads to an M221, never to Twido hardware. Plan the controller replacement when the bench moves to the plant floor.

What address and port does Citect use for a same-PC link?

Modbus TCP serves on TCP port 502, and a same-computer link uses the loopback address 127.0.0.1, so the Citect device address is 127.0.0.1 with port 502. That holds only once something is confirmed listening there; if nothing answers, no driver choice rescues the link.

Citect cannot connect and the engineering software shows Gateway not configured properly. Which side is at fault?

That message comes from the Schneider engineering side and appears when the software connects to a PLC or simulator, so correct the gateway configuration there first. After that, confirm the Windows firewall allows inbound TCP 502, because a silent block produces the same dead connection in Citect.

Is the simulated link good enough to test interlocks?

No. It proves the converted logic runs, the endpoint carries traffic and the tags track both ways. Interlock and emergency-stop performance depends on real I/O, wiring and the controller's scan, so those tests belong on the physical controller and its safety components before the machine runs.

Keep reading

  • Troubleshooting

    Fixing Machine SCADA Expert Modbus TCP reads to a TM221

    Matching IP and port do not prove the read path is right: with MOTCP selected, Machine SCADA Expert must use that driver's station and address syntax, and the number after 4X must resolve to MW0. Rebuild the station and I/O address from the MOTCP manual example, then prove it with known values in MW0 and MW1: the wrong convention reads MW1, exactly one register off.

    SCADA and data logging

  • How-to

    Connecting Citect SCADA to a Modbus RTU gateway over MODNET

    Yes — MODNET is Citect's driver for Modbus over TCP/IP, and a true RTU-to-TCP converter presents standard Modbus TCP on its Ethernet side, so the combination works. Success then rides on two things: the gateway's operating mode, and carrying the RTU slave address and register offsets into Citect correctly, proved by reading one register whose value you can see at the device.

    SCADA and data logging

  • How-to

    Connecting Vijeo Citect SCADA to PLCSIM without a PLC

    No Siemens driver in Vijeo Citect reaches classic PLCSIM directly: it exposes S7ProSim, an API, not a protocol. The supported no-hardware path is PLCSIM Advanced V4.0 or later with its built-in OPC UA server on the PLCSIM Virtual Ethernet Adapter; for an S7-200 there is no simulator, so test screens with local variables. Set variable tags to Digital for bits like i0.0 and m0.0 and Int for words like VW100; c0.0 is not valid counter syntax.

    SCADA and data logging