Overview of SIMATIC Machine Vision and S7-300 Integration
The SIMATIC Machine Vision family from Siemens bundles industrial-grade image processing into compact, IP67-rated sensors designed for direct integration with SIMATIC controllers. The portfolio spans the entry-level VS110 / VS120 compact sensors and the higher-performance VS72x series (VS721, VS722, VS723, VS724). All members expose a common PROFINET IO / PROFIBUS DP connectivity model, which makes the configuration workflow against a SIMATIC S7-300 CPU nearly identical across the line.
This reference walks through the complete path from a powered sensor on the shop floor to verified cyclic I/O exchange with a SIMATIC S7-300 PLC. Topics covered include hardware configuration in STEP 7 V5.5 and TIA Portal, software installation of Spectation V2.8.2 engineering software and VS Link V1.2.6 configuration software, PROFINET device naming, function-block programming on the S7-300, and the final commissioning checks that confirm cyclic data exchange. The reference cites the official Siemens support entry 16531802 — Tips and Tricks for SIMATIC VS72x for further application examples.
SIMATIC VS Sensor Family Comparison
The following table summarizes the differentiating parameters of the SIMATIC VS line as deployed with an S7-300. Values are taken from the respective Siemens operating instructions and the VS72x tips & tricks entry. Where a row is not applicable to a model, the cell is marked “n/a”.
| Parameter | VS110 | VS120 | VS721 | VS722 | VS723 / VS724 |
|---|---|---|---|---|---|
| Sensor class | Entry | Entry | Standard | Standard | High-resolution / high-speed |
| Typical resolution (pixel) | 640 × 480 | 640 × 480 | 640 × 480 | 800 × 600 | 1280 × 1024 |
| Internal illumination | Integrated LED, white / red / IR | Integrated LED, white / red / IR | External, 24 V controlled | External, 24 V controlled | External, 24 V controlled |
| Number of inspection jobs | up to 8 | up to 32 | up to 255 | up to 255 | up to 255 |
| Communication | PROFINET IO, RS-232 (service) | PROFINET IO, RS-232 (service) | PROFINET IO / PROFIBUS DP, RS-232 | PROFINET IO / PROFIBUS DP, RS-232 | PROFINET IO / PROFIBUS DP, RS-232 |
| Service interface | Web server, RS-232 | Web server, RS-232 | Web server, RS-232 | Web server, RS-232 | Web server, RS-232 |
| Engineering software | Spectation / VS Link | Spectation / VS Link | Spectation / VS Link | Spectation / VS Link | Spectation / VS Link |
| Protection class | IP67 | IP67 | IP67 | IP67 | IP67 |
| Supply voltage | 24 V DC ± 20 % | 24 V DC ± 20 % | 24 V DC ± 20 % | 24 V DC ± 20 % | 24 V DC ± 20 % |
| Typical update time (PROFINET) | 1 ms – 4 ms | 1 ms – 4 ms | 1 ms – 8 ms | 1 ms – 8 ms | 2 ms – 16 ms |
All VS variants present themselves on PROFINET as a modular I/O device. The default module layout is 4 bytes input / 4 bytes output (control word + status word + 16-bit result), expandable up to 32 bytes in each direction when extended result / command channels are activated in Spectation.
Prerequisites: Hardware, Software, Cabling
Confirm the following before powering the sensor. Skipping any item typically surfaces as cryptic PROFINET alarms (see troubleshooting matrix below).
| Category | Item | Notes |
|---|---|---|
| CPU | S7-300 with PROFINET interface | CPU315-2DP/PN, CPU317-2DP/PN, CPU319-3PN/DP, or older CPU31x with CP 343-1 |
| Firmware | CPU ≥ recommended Siemens version | Check the S7-300 product page for current firmware |
| Engineering | STEP 7 V5.5 + SPx, or TIA Portal ≥ V14 | HW Config (legacy) or Devices & Networks (TIA) |
| VS tools | Spectation V2.8.2, VS Link V1.2.6 | Siemens official downloads |
| Cabling | M12 D-coded PROFINET patch cable, cat5e minimum | ≤ 100 m per segment |
| Power | 24 V DC, ≥ 1 A per sensor head | Use a dedicated 24 V branch; do not share with drives |
| GSD | Siemens GSDML-V2.3x-xxxxx-VSxxx-yyyymmdd.xml | Install before HW Config |
| Service PC | RS-232 service cable (VS7xx) or Ethernet (VS110/120) | For Spectation commissioning |
The S7-300 system is documented at SIMATIC S7-300 product page; PROFINET conformance is per IEC 61158 / IEC 61784, which the VS sensors implement through the standard PROFINET IO Device stack.
Installing Spectation V2.8.2 and VS Link V1.2.6
- Install Spectation V2.8.2 first. It contains the offline job editor, image catalog, and the OPC-style script runtime used inside the sensor.
- Accept the default installation directory (typically
C:\Program Files\Siemens\Spectation). The installer registers a service that exposes the local image database to VS Link. - Install VS Link V1.2.6. VS Link is the network configuration utility — it discovers the VS sensors on the service subnet, pushes the device name, sets the PROFINET device name, and uploads / downloads the compiled job (Spectation output).
- Start VS Link. The first run prompts for a project directory. Create one per cell, e.g.
D:\VS_Projects\Cell_A. - Connect the service PC to the VS sensor using either RS-232 (VS7xx) at 115 200 / 8 / N / 1 or Ethernet (VS110/VS120). On the VS110/120 the default service IP is
192.168.1.100/ 24.
PROFINET Hardware Configuration in STEP 7 V5.5 / TIA Portal
The S7-300 project must contain the VS sensor as a PROFINET IO device. The procedure differs slightly between the two engineering tools but produces the same PROFINET configuration on the wire.
STEP 7 V5.5 (HW Config)
- Open the S7 project in STEP 7 V5.5 and launch HW Config.
- Open the Options > Install GSD File dialog and select the VS GSDML file. After successful install the VS device appears under PROFINET IO > Additional Field Devices > Sensors > Siemens AG > SIMATIC VS.
- Drag the VS sensor onto the PROFINET IO system assigned to the S7-300 CPU. The default PROFINET device name assigned by HW Config is
vs72x-1; rename it to match the VS Link project (e.g.cell-a-vs-1). - Assign the VS sensor to the same PROFINET IO subnet as the CPU. STEP 7 proposes an IP address in the same subnet as the CPU interface; keep the proposal or enter one consistent with the cell IP plan.
- Insert the 4 Byte DI / 4 Byte DO module (or the wider module matching the Spectation job) into slot 0 of the VS device. STEP 7 assigns I-address and Q-address ranges in the S7-300 process image — note them for the PLC program.
TIA Portal (Devices & Networks)
- Open the project in TIA Portal and switch to Devices & Networks.
- Options > Manage general station description files (GSD) — install the VS GSDML.
- Drag the VS device from the hardware catalog onto the PROFINET subnet. TIA Portal generates a default device name, IP, and module slot.
- Open the VS device properties and align the I/O addresses to the desired ranges in the S7-300 process image (e.g.
IB 100 – IB 103/QB 100 – QB 103). - Compile the S7-300 station and download HW Config to the CPU.
PROFINET Network Commissioning and Device Naming
- In VS Link, click Search for Devices. The tool broadcasts a DCP identify-all and lists every VS sensor on the service subnet with its MAC, current IP, current PROFINET name, and serial number.
- Select the sensor whose serial number matches the label on the housing. Click Assign Name and enter the same name used in HW Config / TIA Portal (e.g.
cell-a-vs-1). Confirm with Assign IP, entering the IP that matches HW Config. - Restart the sensor (power cycle) so the new name takes effect. The PROFINET LED transitions from flashing to steady once the controller establishes an AR (Application Relationship).
- Return to STEP 7 / TIA Portal and confirm the VS device shows No fault in the online diagnostics view. The cyclic I/O LEDs on the CPU blink at the configured update rate (default 1 ms).
If the sensor does not appear in the search, the most common cause is a managed switch filtering LLDP / DCP multicast. Either enable PROFINET filter per the switch vendor doc, or temporarily connect the service PC directly to the sensor port.
Programming the VS Sensor Application in Spectation
- Launch Spectation and create a new project. The Spectation script editor is a sequential, line-by-line environment — each line of the job produces one evaluation per trigger.
- Define the trigger: either PROFINET control word bit (rising edge on bit 0 of the output) or the hardware trigger input on the sensor's M12 connector. For a PLC-driven cell, PROFINET triggering is the default.
- Add evaluation blocks. Common blocks for an S7-300 cell are: Pattern Match, Brightness, Edge Count, Position, Blob, and Read Code (1D / 2D where licensed).
- Map the boolean result of each block to one of the 16 available result bits in the status word. The S7-300 typically reads the result bits from input bytes 2 and 3 of the VS PROFINET slot.
- Compile the job to the sensor via VS Link. The compiled binary is stored in non-volatile memory on the sensor; the active job number is selectable through the PROFINET control word.
S7-300 PLC Program Integration
The S7-300 reads the VS status word and writes the VS control word. The minimum useful exchange is one FC that performs three functions: trigger the inspection, wait for the result-ready bit, and read the result bits. The example below uses the default 4-byte I/O at addresses PIW 100 / PQW 100.
Symbol Table
| Symbol | Address | Type | Comment |
|---|---|---|---|
| VS_Status | PIW 100 | WORD | VS sensor status word (bit 0 = busy, bit 1 = result ready, bit 2 = error) |
| VS_ResultLo | PIB 102 | BYTE | Result bits 0 – 7 |
| VS_ResultHi | PIB 103 | BYTE | Result bits 8 – 15 |
| VS_Ctrl | PQW 100 | WORD | VS sensor control word (bit 0 = trigger, bits 4–11 = job number) |
| VS_Job | QW 102 | WORD | Job number parameter (bits 0–7) |
FC100 — VS120 Trigger and Read (STL)
FUNCTION FC 100 : VOID
VAR
busy : BOOL; // bit 0 of VS_Status, mirrored
ready : BOOL; // bit 1 of VS_Status, mirrored
error : BOOL; // bit 2 of VS_Status, mirrored
result_bits : WORD; // concatenated result bits 0..15
trig : BOOL; // rising-edge trigger from line PLC
END_VAR
BEGIN
NETWORK 1 // Mirror status bits
A I 100.0; = #busy;
A I 100.1; = #ready;
A I 100.2; = #error;
NETWORK 2 // Read result word
L IB 102;
T LW 0; // temp
L IB 103;
T LW 1; // temp
L LW 0;
SLD 8;
OW;
T #result_bits;
NETWORK 3 // Edge-triggered inspection
A #trig;
FP M 50.0; // trigger one-shot
JCN _NO_TRIG;
L #VS_Job; // current job (0..255)
SLD 4; // align to bits 4..11 of control word
OW W#16#0001; // set trigger bit
T QW 100;
AN #busy;
JC _NO_TRIG; // sensor still busy, skip
_NO_TRIG: NOP 0;
NETWORK 4 // Clear trigger once sensor acknowledges busy
A #busy;
R Q 100.0;
END_FUNCTION
FC101 — Job Switch
FUNCTION FC 101 : VOID
VAR_INPUT
new_job : INT; // 0..255
END_VAR
BEGIN
NETWORK 1 // Validate range
L #new_job;
L 255;
>I;
JC _ERR;
L 0;
<I;
JC _ERR;
NETWORK 2 // Write job into control word bits 4..11
L #new_job;
SLD 4;
T QW 102;
BEA;
_ERR: S M 60.0; // job range flag
END_FUNCTION
For TIA Portal projects, the same logic is implemented in an FB written in SCL or LAD; the I/O addressing is via the HW tag table rather than absolute PIW/PQW.
Verification, Diagnostics, and Acceptance Test
- Place a known-good part in the sensor field of view.
- Force the trigger input in STEP 7 / TIA Portal (e.g. set
M 50.0true). Confirm thatVS_Statusbit 0 transitions to1within one PROFINET update cycle. - Verify bit 1 (result ready) transitions to
1within the configured inspection time (typically < 50 ms for a single block, < 200 ms for a 5-block job). - Read
VS_ResultLoand confirm the expected result bit is set (e.g. result bit 0 = pattern match OK). - Place a known-bad part; verify the corresponding result bit clears and the global error bit (status bit 2) is set if Spectation is configured to assert it on negative results.
- Capture the online PROFINET diagnostics in HW Config / Devices & Networks. The VS device must show No fault, with the cyclic I/O indicators blinking at the configured update rate.
- Run a 1 000-trigger soak test in Spectation to confirm the inspection time stays below the line cycle time.
Troubleshooting Matrix
| Symptom | Likely root cause | Diagnostic step | Corrective action |
|---|---|---|---|
| VS LED SF solid red, CPU BF steady | PROFINET device name mismatch | Compare VS Link name with HW Config | Re-assign PROFINET name and power-cycle |
| VS LED BF flashing, cyclic I/O off | No PROFINET connection to controller | Check cable, switch port, LLDP filter | Use direct PC connection to verify; bypass managed switch |
| Cyclic I/O active, but result bits always zero | Spectation job not compiled to sensor | VS Link > Project > Active job number | Compile and download job from Spectation |
| Trigger bit acknowledged, but result never comes | Job cycle time > PROFINET watchdog | PROFINET diagnostics > Watchdog | Raise watchdog to 3× longest inspection time |
| Status bit 2 (error) latched on every trigger | Sensor cannot detect part (out of FOV / under-exposure) | VS Link > Live image | Re-teach the part; adjust illumination; clean lens |
| Sporadic I/O timeout during line stop | PROFINET update time too aggressive for sensor load | PROFINET diagnostics > Update time / load | Increase update time to 4 ms; reduce number of result bits |
| Job switch ignored by sensor | Trigger fired before switch acknowledged | Buffer job number in S7-300 DB | Switch job first, wait 50 ms, then trigger |
| VS Link cannot find sensor | Service PC and sensor on different subnets | Service PC IP / ping test | Set service PC to 192.168.1.x / 24, or assign sensor a service IP in range |
For a deeper catalog of pitfalls (lens selection, illumination mounting, line-scan exposure timing) the Siemens Tips and Tricks for SIMATIC VS72x entry is the canonical reference. For cross-vendor comparison and selection criteria outside the Siemens portfolio, see Keyence vision sensors for a representative compact-sensor offering.
Field-Proven Notes and Best Practices
- Keep the 24 V supply to the VS sensor on a separate branch from any VFD or contactor coil. The sensor's PROFINET port is not isolated against common-mode transients on the power input.
- For reflective parts, mount the illumination at 15°–25° off-axis; for matte parts, use coaxial or ring light at near-normal incidence.
- Set the PROFINET send clock to 1 ms, but configure the reduction ratio so the VS sensor is polled at 4 ms (4× reduction). This is the proven balance between S7-300 CPU load and inspection latency.
- Always store the active Spectation project and the compiled job binary in the same S7 project folder as the STEP 7 source. This keeps the configuration reproducible across controller swaps.
- Document the PROFINET device name, IP address, and active job number in the HMI screen, not just in the PLC program. A field engineer replacing a sensor head must be able to identify all three from the HMI.
Do I need a separate software to configure the SIMATIC VS120 with an S7-300?
Yes. Spectation V2.8.2 owns the job editor, VS Link V1.2.6 owns the network commissioning, and STEP 7 V5.5 (or TIA Portal) owns the PLC hardware configuration. All three must be installed to go from a powered sensor to a verified cyclic exchange.
What is the default PROFINET slot size for a VS120?
The default slot is 4 bytes of input and 4 bytes of output. Spectation can extend the slot to 32 bytes in each direction when more result bits, job numbers, or command channels are required.
Why does the VS120 fail to establish cyclic I/O even though the IP is correct?
PROFINET uses the device name (not the IP) for the AR establishment. Re-assign the PROFINET device name from VS Link, matching the name configured in HW Config / TIA Portal, then power-cycle the sensor.
Can I use a CPU315-2DP (PROFIBUS only) with a VS120?
The VS110/120 ship with PROFINET IO and RS-232 only. To use one on PROFIBUS, either step up to a VS72x sensor with PROFIBUS DP, or add a CP 343-1 to the S7-300 station and connect the VS110/120 to that PROFINET interface.
What is the recommended PROFINET update time for a VS120 on an S7-300?
Start at a 1 ms send clock with a 4× reduction ratio (4 ms effective update). Increase the ratio to 8× (8 ms) if the S7-300 PROFINET interface is loaded above 70 %, or if inspection cycle time is greater than 50 ms.
Where can I find official application examples for VS72x integration?
Siemens Support entry 16531802 — Tips and Tricks for SIMATIC VS72x and the SIMATIC Machine Vision Infopool: Applications are the canonical application notes for VS72x integration with S7-300 CPUs such as the CPU315-2DP.