Overview
When integrating a Yaskawa Motoman YRC1000 controller with a Siemens (or any PROFINET IO Controller) PLC, the field-engineering bottleneck is almost always the same: the PLC hands the robot a byte, the robot stores it in a General Purpose Input group (IG#(n)), and the INFORM III SWITCH/CASE statement only accepts integer (I) variables. The byte (B) variable is unsigned 0-255, so the raw PLC value cannot be used directly inside CASE. A conversion step is required — DIN pulls the byte into a B register, and SET copies the B register into an I register, which SWITCH/CASE accepts.
This reference documents the full conversion pattern, the PROFINET address-mapping rules that determine which IG#(n) your bytes actually appear in, the pendant screen where you verify reception, and the extension to two-byte signed values that the source community flagged for the same hardware (negative integers via IGU into a D variable). The article is written against the standard YRC1000 controller running INFORM III, the optional PROFINET slave board (typically configured under SETUP > FUNCTION SETUP > FIELDBUS > PROFINET), and the on-board General Purpose I/O groups IG#(1) through IG#(8).
IG#(n) if (a) the PROFINET board is enabled in FC91 / board setup, (b) the GSDML is loaded into the PLC and slot/byte alignment matches the robot, and (c) you are watching the correct pendant screen — GENERAL PURPOSE INPUT, not USER GROUP INPUT. They are two different monitoring pages. USER GROUP INPUT displays user-defined logical groupings; GENERAL PURPOSE INPUT shows the raw register-level IG#(n) byte. See the verification section below.Prerequisites
-
YRC1000 controller with the PROFINET option board installed and licensed. Verify under
MAIN MENU > SETUP > FUNCTION SETUP > FIELDBUS > PROFINETthat the board isENABLEDand shows aNODE ID. -
Yaskawa GSDML file for the YRC1000 PROFINET device (filename begins
GSDML-Vxxxx-Yaskawa-YRC1000-...). Import this into the Siemens TIA Portal / STEP 7 hardware catalog and configure the slot data length (typically 8 or 16 bytes in / 8 or 16 bytes out, configurable on the robot side). -
Pendant teach pendant (PHG) with access to
IN/OUT > GENERAL PURPOSE INPUTandIN/OUT > GENERAL PURPOSE OUTPUT. -
INFORM III programming knowledge: variable types
B,I,D,R; instructionsDIN,DOUT,SIN,SOUT,SET; and theSWITCH/CASEblock. - PLC project with the slot configured and a known test value (e.g., constant 9) ready to write to the robot's input slot.
YRC1000 I/O and Variable Architecture
The YRC1000 separates I/O addresses from program variables. PROFINET bytes do not land directly into B/I variables — they land at fixed input/output addresses, and you read those addresses with DIN/DOUT into variables your program can use.
General Purpose I/O Groups
By default, the on-board digital I/O groups are reserved as follows (addresses shown are decimal; the 20xxx range is inputs, the 30xxx range is outputs):
| Group | Direction | Address Range | Width | Typical Use |
|---|---|---|---|---|
| IG#(1) | Input | 20010 – 20017 | 1 byte (8 bits) | Built-in / on-board digital inputs slot 1 |
| IG#(2) | Input | 20020 – 20027 | 1 byte | On-board digital inputs slot 2 |
| IG#(3) | Input | 20030 – 20037 | 1 byte | On-board digital inputs slot 3 |
| IG#(4) | Input | 20040 – 20047 | 1 byte | On-board digital inputs slot 4 |
| IG#(5) | Input | 20050 – 20057 | 1 byte | First PROFINET / fieldbus byte (typical default) |
| IG#(6)–(8) | Input | 20060 – 20087 (configurable) | 3 bytes | Additional fieldbus / option board bytes |
| OG#(1)–(8) | Output | 30010 – 30087 | 1 byte each | Mirrors of inputs above for digital outputs / status |
FIELDBUS > PROFINET > I/O MAP page on the pendant for the actual start address of your slot — never assume the default from the table above. If you see your PLC value inside the 30xxx range, you are reading from an output register by mistake; the input page is the 20xxx range.Variable Types
| Type | Width | Range | Use in SWITCH/CASE |
|---|---|---|---|
B (byte) |
8 bits, unsigned | 0 – 255 | Not accepted |
I (integer) |
32 bits, signed | -2,147,483,648 – 2,147,483,647 | Accepted |
D (double) |
64 bits, signed | ~ -9.2e18 – 9.2e18 | Accepted (treat as int for SWITCH) |
R (real) |
IEEE-754 64-bit float | ±1.7e308 | Not accepted directly |
BY (byte array) |
8 bits, unsigned | 0 – 255 per element | Not accepted |
PROFINET Address Mapping on the YRC1000
The PROFINET board occupies one or more IG#(n) slots whose start address is configurable in SETUP > FUNCTION SETUP > FIELDBUS > PROFINET > INPUT START ADDR and OUTPUT START ADDR. The slot width is set by INPUT BYTES / OUTPUT BYTES (commonly 8 bytes in / 8 bytes out, but can be 16/16 or 32/32 depending on application). Every byte the PLC sends occupies one IG#(n) byte address starting at the configured input start address.
The fastest way to find your actual mapping without reading manuals is the pendant monitor:
- From the main menu, go to
IN/OUT > GENERAL PURPOSE INPUT. - The header bar confirms
IG#— toggleIG#(1)throughIG#(8)at the top of the page. - With the PLC online and writing to the slot, change a value at the PLC and watch the eight bits of the corresponding
IG#(n)byte flip on the pendant. The group that flips is your PROFINET input group. - For a binary-write test, send
0xFFfrom the PLC and look for the byte to go to all-ones. For a numeric test, send9and watch which group's decimal interpretation equals 9 (i.e., bits 0 and 3 are set:00001001b).
Write down the IG#(n) index you discover and the offset within the PROFINET slot (byte 0, byte 1, byte 2, ...). You will need both.
The DIN/SET Byte-to-Integer Conversion Pattern
There is no single INFORM III instruction that reads an IG#(n) byte directly into an I variable. The instruction set forces two steps:
Step 1 — DIN pulls one byte into a B variable
DIN syntax:
DIN <B-target> IG#(<group>)
Examples (where IG#(n) is the group you found in the previous section):
DIN B000 IG#(5) // PROFINET byte 0 → B000 (0..255)
DIN B001 IG#(5) // PROFINET byte 1 → B001
DIN B010 IG#(1) // on-board digital input byte → B010
Step 2 — SET copies the B variable into an I variable
SET syntax:
SET <I-target> <B-source>
Examples:
SET I000 B000 // I000 now holds the same 0..255 value
SET I001 B001 // I001 holds byte 1
SET I010 B010 // I010 holds on-board input byte
Combined three-line idiom
// Read PROFINET byte 0 (program number) into I000 for SWITCH/CASE
DIN B000 IG#(5) // byte → B
SET I000 B000 // B → I (SWITCH/CASE requires I)
After these two lines execute, I000 is the unsigned 0-255 value the PLC wrote, and it is a legal CASE constant.
SET I000 B000 does not lose precision. SET performs a numeric conversion, not a bit copy — the integer 0-255 in B000 becomes the integer 0-255 in I000. For values greater than 255 you must either use a 16-bit (two-byte) read into a D variable or read two consecutive IG#(n) bytes and combine them manually — see the signed two-byte section below.Step-by-Step: Reading IG# and Using in SWITCH/CASE
The following is a complete, runnable INFORM III job that demonstrates the conversion and dispatches to a different sub-job per program number received from the PLC. Use it as a template and replace the sub-job names with your own.
// JOB: PROFINET_DISPATCH
// Purpose: read PLC-supplied program number, convert to I, dispatch via SWITCH/CASE
// Assumes: PROFINET byte 0 = IG#(5), program numbers 1..4 in use
DIN B000 IG#(5) // raw PROFINET byte into B000
SET I000 B000 // promote to I000 for SWITCH/CASE
SWITCH I000
CASE 1
CALL JOB: PICK_PART_A
BREAK
CASE 2
CALL JOB: PICK_PART_B
BREAK
CASE 3
CALL JOB: PICK_PART_C
BREAK
CASE 4
CALL JOB: PICK_PART_D
BREAK
DEFAULT
// unknown program number — safe state
DOUT OG#(5) B011 // alarm bit pattern to PLC (B011 preloaded with 0x07)
PAUSE // halt cycle until PLC sends valid number
END SWITCH
END
Verification at the pendant
- Load and run
PROFINET_DISPATCH. - On the PLC side, write the value 1 to the PROFINET output slot assigned to the robot.
- On the pendant, open
VARIABLE > B > B000— confirmB000 = 1. - Open
VARIABLE > I > I000— confirmI000 = 1. - Confirm the robot called
PICK_PART_A(status bar shows the active job). - Repeat with values 2, 3, 4 to confirm each branch.
Two-Byte Signed Values into D Variables (Negative Numbers)
A single B variable is unsigned and tops out at 255. To receive the full 16-bit signed range -32,768 to +32,767 you must read two consecutive bytes (low byte, high byte) and combine them. The source thread raised exactly this case for the YRC1000 with the IGU (User Group Input) two-byte input.
Pattern A — assemble two B bytes into an I register with sign correction
// Read 16-bit signed value from PROFINET bytes 0 (LSB) and 1 (MSB)
DIN B000 IG#(5) // LSB
DIN B001 IG#(5)+1 // MSB (use index offset syntax if supported; else DIN into IG#(6) byte 0)
// Combine into I001 with sign extension
SET I001 B001 // I001 = 0..255 from MSB
MUL I001 256 // I001 = MSB * 256
ADD I001 B000 // I001 = MSB*256 + LSB (raw 0..65535)
// Sign correction: if raw value >= 32768, subtract 65536 to get negative
IF I001 >= 32768 THEN
SET I002 -65536
ADD I001 I002 // I001 = signed -32768..+32767
END
Pattern B — load a 16-bit value directly into a D variable and let the controller sign-extend
On YRC1000 firmware that supports the SDIN (Signed DIN) or the IGU (Integer Group Unload) two-byte instruction, the simpler form is:
// IGU reads two consecutive IG# bytes as one signed 16-bit integer into a D variable
IGU D000 IG#(5) // bytes 0 and 1 of group 5 → D000 as -32768..+32767
// Optional: promote to I for SWITCH/CASE
SET I010 D000 // I010 now holds signed integer, legal CASE operand
IGU instruction and the two-byte signed unload are supported on YRC1000 standard INFORM III. On older or customized firmware revisions the instruction may be absent or require the option enable bit for "extended I/O." Verify with ?IGU in the command window of the pendant. If IGU is not recognized, fall back to Pattern A.SWITCH/CASE with a signed range
SWITCH I010
CASE -1
CALL JOB: SOFT_STOP
BREAK
CASE 0
CALL JOB: IDLE
BREAK
CASE 10
CALL JOB: HOME
BREAK
CASE 100
CALL JOB: PROD_RUN
BREAK
DEFAULT
CALL JOB: INVALID_CODE
BREAK
END SWITCH
Pendant Verification: GENERAL PURPOSE INPUT vs USER GROUP INPUT
A frequent source of confusion — and the root cause of the silent-zero problem in the source thread — is which pendant screen you watch. The YRC1000 exposes two related but distinct pages:
| Pendant Page | Path | Shows | Editable | Use Case |
|---|---|---|---|---|
| GENERAL PURPOSE INPUT | IN/OUT > GENERAL PURPOSE INPUT |
Raw register-level input bytes for IG#(1) through IG#(8) | No (monitor-only on most firmware) | Verifying what the controller is actually receiving from PROFINET / on-board I/O |
| USER GROUP INPUT | IN/OUT > USER GROUP INPUT |
User-defined logical groupings (UI#) mapped from underlying IG# bytes | Yes (re-mappable) | Application-level signal names; what a job typically monitors with SIN |
If the PROFINET value is visible in GENERAL PURPOSE INPUT but zero in USER GROUP INPUT, the User Group mapping is not yet wired to the correct IG#(n) byte. Fix that with SETUP > FUNCTION SETUP > GENERAL I/O > USER GROUP INPUT MAP. Conversely, if the value is in USER GROUP INPUT but your DIN B000 IG#(n) reads zero, you are reading the wrong IG#(n) — the underlying byte, not the user-group alias.
Diagnostic loop for IG# discovery
The following short job iteratively steps a known value through every IG#(n) byte so you can watch the pendant page and find the live one:
// JOB: SCAN_IG
// Writes a moving test value into each IG# group to find which one the PLC is updating
SET B099 1
*LOOP
DIN B000 IG#(1) // try group 1
DIN B001 IG#(2) // try group 2
DIN B002 IG#(3) // try group 3
DIN B003 IG#(4) // try group 4
DIN B004 IG#(5) // try group 5
DIN B005 IG#(6) // try group 6
DIN B006 IG#(7) // try group 7
DIN B007 IG#(8) // try group 8
ADD B099 1 // advance test counter
PAUSE 100 // 100 ms sample window
JUMP *LOOP
END
Watch GENERAL PURPOSE INPUT while this job runs and change the PLC value. The group whose decimal value tracks your PLC write is your target.
Common Pitfalls and Field-Confirmed Corrections
| Symptom | Likely Cause | Fix |
|---|---|---|
B000 reads 0 even though PLC is sending a non-zero value |
Wrong IG#(n) index; PROFINET is in a different slot than assumed |
Use the SCAN_IG diagnostic job and watch GENERAL PURPOSE INPUT |
Value visible on USER GROUP INPUT but DIN IG#(n) returns 0 |
Reading the wrong register type — user-group alias vs. raw IG#(n)
|
Watch GENERAL PURPOSE INPUT instead; USER GROUP INPUT is a re-mapped view |
| PROFINET board enabled in setup but PLC reports "device not found" | GSDML not imported or station name / IP mismatch | Re-import GSDML into TIA, confirm station name matches FIELDBUS > PROFINET > STATION NAME
|
| SWITCH/CASE rejects the operand: "I type required" | You wrote CASE B000 instead of CASE I000
|
Always promote with SET I### B### first |
| Negative value from PLC appears as a large positive in D | Read as single byte (unsigned) — high bit is being treated as the sign of a one-byte value | Read two bytes with IGU or assemble in I with sign correction |
| Value flickers between two states | PLC cycle time faster than robot job scan; multiple PROFINET updates per scan | Latch with SET into a sticky I and clear it via a separate handshake byte from PLC |
| Job hangs in DEFAULT branch forever | PLC sends 0 by default (uninitialized) — 0 is rarely a valid program number | Treat 0 as "no command"; only act on values 1..N |
Troubleshooting Matrix
| Check # | What to Verify | How | Pass Criterion |
|---|---|---|---|
| 1 | PROFINET board is enabled and has an IP / station name | SETUP > FUNCTION SETUP > FIELDBUS > PROFINET |
Status shows RUN or CONNECTED
|
| 2 | PLC and robot share subnet and can see each other | Siemens TIA Portal online diagnostics | Device reachable, no "station failure" alarm |
| 3 | GSDML module slot length matches robot slot length | TIA device configuration vs. robot I/O MAP
|
Both report the same number of input/output bytes |
| 4 | Pendant GENERAL PURPOSE INPUT shows the PLC value |
IN/OUT > GENERAL PURPOSE INPUT + PLC write |
Bits / decimal track the PLC value live |
| 5 | Correct IG#(n) identified for the slot |
Diagnostic SCAN_IG job or manual change-and-observe |
The group that flips is documented |
| 6 |
DIN B### IG#(n) populates the B register |
Watch VARIABLE > B > B### while job runs |
B variable equals PLC value |
| 7 |
SET I### B### promotes correctly |
Watch VARIABLE > I > I###
|
I variable equals B variable |
| 8 | SWITCH/CASE branches execute the right job | Status line on pendant shows called job name | Correct sub-job runs for each test value |
Notes on Output Direction (PLC Reads from Robot)
For the reverse direction — robot sending status to the PLC — the symmetric pattern applies:
SET B020 I020 // promote current status from I020 to B020
DOUT OG#(5) B020 // write B020 to PROFINET output byte 0
Watch the value on the PLC side via TIA watch table; the bits should match the byte shown on IN/OUT > GENERAL PURPOSE OUTPUT on the pendant. The 30xxx address range is used for output groups; ensure your PLC is reading from the correct output slot.
Performance and Timing Considerations
The YRC1000 PROFINET cycle is typically 1–4 ms, configurable via the PROFINET "Update Time" parameter (1 ms, 2 ms, 4 ms). A robot job executes the DIN/SET/SWITCH idiom in microseconds; the limiting factor is the PLC's PROFINET send rate, not the robot's scan time. For applications where every millisecond matters (high-speed pick-and-place, press-to-press handoff), set the PROFINET update time to 1 ms and the PLC's PROFINET send clock to match.
PAUSE or long motion instructions inside the DIN/SET pair — every pause delays the read of the next PROFINET cycle and may cause the robot to miss a transition. Read once at the top of the job, store in an I variable, and act on the cached value.Related Controller Notes
The same DIN/SET idiom works on the DX200, FS100, and YRC1000 controllers because they share the INFORM III language base. On the newer Yaskawa Motoman YRC1000micro and iCube controllers, the byte-to-integer conversion is handled implicitly when assigning into an I variable in newer firmware, but the explicit DIN B / SET I pattern remains the most portable and is the one supported across all fieldbus firmware revisions.
FAQ
Why does my B variable stay at 0 even when the PLC is sending a value?
You are reading the wrong IG#(n). The PROFINET slot is not necessarily IG#(1) — on most YRC1000 deployments the PROFINET board occupies IG#(5) or higher depending on how many on-board input cards are configured. Use the SCAN_IG diagnostic job above or watch IN/OUT > GENERAL PURPOSE INPUT while changing the PLC value to find the live group.
Can I use a B variable directly in SWITCH/CASE?
No. INFORM III CASE only accepts I (integer) and D (double, when the value is integral) operands. Always promote with SET I### B### first, even though it feels redundant.
How do I receive a negative integer from the PLC?
Read two consecutive IG#(n) bytes (low byte + high byte) and combine them into an I register with sign correction, or use the IGU instruction to unload two bytes as a single signed 16-bit value into a D variable. A single B register is unsigned and tops out at 255.
What is the difference between USER GROUP INPUT and GENERAL PURPOSE INPUT on the pendant?
GENERAL PURPOSE INPUT shows the raw IG#(n) register bytes that the controller is actually receiving. USER GROUP INPUT shows user-defined logical groupings (UI#) that map one or more underlying IG#(n) bits into named application signals. Always diagnose at the GENERAL PURPOSE INPUT level first.
My PLC value shows in the 30xxx range on the pendant — am I reading the wrong direction?
Yes — the 30xxx range is outputs (OG#), not inputs (IG#). Inputs live in the 20xxx range. Some older YRC1000 PROFINET firmware revisions showed PROFINET inputs in the 30xxx address block by convention; confirm against SETUP > FUNCTION SETUP > FIELDBUS > PROFINET > I/O MAP for the exact start address of your installation.