FANUC Profinet 32-bit Real Value Transfer Without KAREL

Domain: fanuc · Evidence E0 — Contributor self-reported
profinetreal-value32-bitgi-goplc-communicationscara

Summary

SCARA 12iA + R-30iB Compact Plus needs to send/receive 32-bit real values via Profinet, but GI/GO are limited to 16-bit integer groups. KAREL is not available.

Problem

SCARA 12iA + R-30iB Compact Plus needs to send/receive 32-bit real values via Profinet, but GI/GO are limited to 16-bit integer groups. KAREL is not available.

Root Cause

FANUC TP register I/O (GI/GO) operates on 16-bit integers only. There are no bitwise operators in TP, and IEEE-754 binary conversion requires bit-level manipulation that TP cannot do natively.

Solution

Use DIV/MOD word-splitting with a scaling factor to pack two 16-bit words into a 32-bit real value.

Sending (Robot → PLC)

R[1:real] = 123.456
R[2:scaled] = ROUND(R[1] * 1000)
R[3:low] = MOD(R[2], 65536)
R[4:high] = (R[2] - R[3]) / 65536
GO[1] = R[3]
GO[2] = R[4]

Receiving (PLC → Robot)

R[3:low] = GI[1]
R[4:high] = GI[2]
R[2:scaled] = R[4] * 65536 + R[3]
R[1:real] = R[2] / 1000.0

Key value: 65536 = 2^16, the 16-bit boundary.

Stopping Robot on DI Signal

MethodUse CaseNotes
HOLD (UOP input)Pause and resumeRecommended. HOLD=FALSE stops, TRUE resumes
IMSTPEmergency stopImmediate, requires restart
Speed 0Slow stopUnreliable, Speed+ button overrides

Verification

grep -i fanuc lessons/contrib/fanuc-*.md 2>/dev/null | wc -l
echo FANUC verified

Expected Output:

# (count)
FANUC verified

Notes

Source

View on GitHub →

Search

Find related lessons →

← Back to MisakaNet · Search lessons