How-to
Control a PROFINET servo drive with cyclic telegram data
Short answer
No motion library is needed when a PLC only exchanges cyclic process data with a PROFINET servo drive: import the device description, attach the drive, select the same telegram the drive is configured for, and map the words. Standard telegram 1, PZD 2/2, is two 16-bit words each way — four bytes per direction — and the PLC logic sequences control word STW1 and reads status word ZSW1.
On this page
Controlling a PROFINET servo drive from a PLC needs no motion library as long as the application only exchanges cyclic process data: setpoint out, actual value back, control and status words both ways. The whole job is five moves — import the drive's device description, attach the drive under the controller's interface, select the telegram the drive is configured for, map the resulting words to PLC variables, and sequence the control word in ordinary logic. For the most common case, standard telegram 1, PZD 2/2, that resolves to two 16-bit words in each direction: four bytes out, four bytes back, and every one of those numbers is written in the telegram definition you can check against your drive's fieldbus manual.
What a cyclic telegram fixes #
A telegram is the agreed layout of the process data a drive and its controller exchange in every bus cycle. PZD stands for process data — the command and setpoint words sent to the drive plus the status and actual-value words returned. The PROFIdrive profile exists so that any compliant controller and drive agree on that layout: it fixes how many process-data words travel each way, in what order, and what each word means. Both ends must run the same telegram, because the telegram definition fixes the byte count, the direction, the word order and the meaning of every word in the exchange.
Standard telegram 1 is the smallest useful case: two PZD each way, no encoder words appended. To the drive it carries control word STW1 and a 16-bit speed setpoint; back come status word ZSW1 and the actual value. This exchange repeats in every bus cycle, which is exactly what cyclic data gives you over polling a drive on one serial port, where each request-answer pair adds its own time to the update (why Modbus RTU polling on one serial port is slow).
Worked example: mapping standard telegram 1, PZD 2/2 #
Inputs, each taken from documentation rather than habit:
- Telegram: Standard telegram 1, PZD 2/2 — the telegram listed for the drive in its PROFINET documentation, and the submodule offered once its device description is imported into the controller project.
- Process-data words per direction: 2 — the 2/2 in the telegram name.
- Word width: 16 bits per process-data word — the telegram definition gives STW1, ZSW1, the speed setpoint (NSET) and the actual value one word each, and fixes the setpoint at 16 bits.
- Bits per byte: 8.
Rule in words: bytes per direction = words per direction × bits per word ÷ bits per byte.
Arithmetic: 2 words × 16 bits = 32 bits per direction. 32 bits ÷ 8 bits per byte = 4 bytes per direction. Both directions together: 4 bytes out + 4 bytes in = 8 bytes per cyclic exchange.
Result: the hardware configuration must show a 4-byte output area and a 4-byte input area for this drive, holding two 16-bit words each way in this order:
| Word (PLC view) | Size | Content |
|---|---|---|
| Output word 1 | 16 bits | Control word STW1 |
| Output word 2 | 16 bits | Speed setpoint, NSET, 16-bit |
| Input word 1 | 16 bits | Status word ZSW1 |
| Input word 2 | 16 bits | Actual value |
Decision: if the drive's manual lists PZD 2/2, select exactly that telegram in the controller and make four bytes per direction the pass criterion. Four bytes proves the ends match; any other count — two bytes or six — means the wrong telegram submodule is active, and the fix is the telegram selection, never the PLC variable types.
Configure the drive and controller #
Work in this order, because each step depends on the one before it:
- Set the telegram on the drive itself, in its fieldbus or communication parameters. The drive's manual defines each telegram word by word, and its parameter list shows where the received words arrive — one drive family indexes them as P2090 for the first word and P2091 for the second.
- Import the drive's PROFINET device description, the file the drive manufacturer publishes, into the controller project. Do not build a generic device with guessed byte lengths.
- Attach the drive under the controller's PROFINET interface and match the configured station name and address to the physical drive.
- Open the drive object and add the telegram submodule whose name and word count match the drive-side setting — for this example, Standard telegram 1, PZD 2/2.
- Save the hardware configuration and read the device diagnostics: the physical link can be healthy while a module mismatch still blocks cyclic data.
- Open the generated I/O map and apply the worked example's pass criterion: four output bytes, four input bytes for telegram 1.
- Download the project and run the controller with every command bit low. Both input words must refresh every cycle while the drive is powered and communicating.
Map the process image as words, not bytes #
Configuration tools often display the new area as individual bytes and repeat the label across all of them, so a PZD 2/2 telegram shows four byte values where there are two words. Read each aligned pair as one 16-bit value at the documented boundary — the same discipline as combining serial frame bytes into full values instead of reading them one by one (combining serial frame bytes into full values). Four displayed bytes are not four control words.
Bind one 16-bit variable per telegram position. The names here are illustrative — your engineering tool generates its own from the I/O map:
VAR
stw1_out : UINT := 0; // output word 1: control word STW1
nset_out : UINT := 0; // output word 2: speed setpoint (NSET)
zsw1_in : UINT := 0; // input word 1: status word ZSW1
nact_in : UINT := 0; // input word 2: actual value
END_VAR
The test that proves the mapping: with stw1_out held at 0 and the drive inhibited, run the controller and confirm zsw1_in and nact_in change when the drive-side conditions they report change. Frozen input words, or an area measuring two or six bytes, point back to the telegram selection — not to the variable types.
Sequence the control word in logic #
The I/O image transports words; it does not create the drive state machine. Your logic writes each control-word bit pattern in the documented order, waits for the matching status-word acknowledgement before issuing the next state, and writes the setpoint only in an operating state that accepts it. Take the bit definitions for STW1 and ZSW1, and the scaling of the 16-bit setpoint, from the same drive manual that defined the telegram. This is the same division of labor that lets a plain controller start and stop a drive over EtherNet/IP: the network carries the words, the logic carries the sequence (start and stop a drive over EtherNet/IP from the controller).
Safety note: keep the first commanded motion at a low speed behind a tested stop function, because the first valid control-word pattern can enable the power stage immediately.
Faults that trace back to the telegram #
A physically healthy PROFINET link can still deliver invalid cyclic data when the two ends expect different telegrams, and no change of data types repairs that. Align the telegram selection, save the configuration and recheck diagnostics before touching anything else. The word-mapping discipline scales unchanged to larger systems — one drive-system controller, for example, maps six process words for each of four drives on its bus (how one drive-system controller maps six words for each of four drives). And when the status words update but the drive will not enter the requested state, the network has already done its job: look at drive-side inhibits and faults, because repeated device imports cannot clear an unmet drive condition.
When a motion library earns its place #
Cyclic process data covers speed and torque control from ordinary logic. Reach for the vendor's motion function blocks when the application needs a position axis, homing, cams or interpolated multi-axis motion, or when you would rather use the vendor's packaged state machine and diagnostics than write your own. The library adds those behaviors on top; it cannot compensate for a wrong telegram, a wrong I/O length or a reversed word mapping, which are hardware-configuration errors no code can hide. If two controllers must share one drive, settle command ownership first — the sharing patterns are much the same on PROFINET as on EtherNet/IP (controlling one drive from two PLC controllers).
Questions asked
Does every PROFINET servo drive offer standard telegram 1?
No. The telegram list belongs to each drive family and its firmware, and the drive's fieldbus manual is the authoritative version. The device description you import offers exactly the telegrams that drive implements as submodules, so the controller's submodule menu mirrors the manual. Many drives leave a larger telegram active than telegram 1 out of the box, so match the drive's current setting before building the I/O map.
Do I need a motion-capable controller to exchange telegram data?
Not for cyclic process data. Standard telegram 1 rides the ordinary I/O image, so any controller that can exchange PROFINET I/O words can send and receive it. Capability checks appear when you use the vendor's motion instructions or position telegrams for axis functions; those are validated when the project is compiled. Speed control through the telegram words alone carries no such requirement.
How fast does the cyclic exchange update?
The update time is a setting on the PROFINET connection in your project, bounded by the range the drive documents as supported; both ends have to accept the value you configure. It is not a universal figure across drives. What telegram 1 guarantees is that the same words repeat every cycle, so a value you read is never older than one configured cycle.
What changes if I switch to a longer telegram later?
The I/O areas grow to the new word count, so variables bound to the old addresses must be rebound at the new boundaries, and the setpoint handling follows the words to their new positions. In PROFIdrive standard telegrams the control and status words stay first, so word-level references to STW1 and ZSW1 usually survive; the appended setpoint and actual-value words move.