Protocol-Analysis FOCAS Fanuc-WireEDM-machine

Most values are big endian encoded.

Commands

Open

Request
sync source command length
payload
A0 A0 A0 A0 00 01 01 01 00 01 00 02
Response
sync source command length
payload
A0 A0 A0 A0 00 02 01 02 00 50 00 01 00 04 00 08 00 04 00 08 00 01 00 00 00 00 20 4D 00 00 00 06 58x00

Read Sysinfo

Request
syncsourcecommandlength
payload
A0 A0 A0 A0 00 01 21 01 00 1E
subpackets
length "requestinfo"-- -- -
00 1C00 01 00 01 00 18 00 00 00 00 00 00 00 00 00 00
00 01

The length in the payload contains the 2 bytes of the length itself.

Response
syncsourcecommandlength
payload
A0 A0 A0 A0 00 02 21 02 00 24
subpackets
length "requestinfo"-length
00 22 00 01 00 01 00 18  00 00 00 00 00 00  00 08
(12)
00 01

payload continuation
addinfoMAX_AXIScnctypeMT_TYPEseriesversionaxes
00 02
(2)
00 08
(only first)
31 36
("16")
20 57
(" W")
  42 39 48 35
("B9H5")
30 30 32 32
("0022")
20 36
(" 6")

Get  SysInfo

Request
syncsourcecommandlength
payload
A0 A0 A0 A0 00 01 21 01 00 1E
subpackets
length "requestinfo"-- -- -
00 1C 00 01 00 01 00 18 00 00 00 00 00 00 00 00
00 01
Response
syncsourcecommandlengthpayload
A0 A0 A0 A0 00 02 21 02 00 1A
subpackets
length "requestinfo"-length addinfoMAX_AXIS CNCTypMTType SeriesVersion Axis
00 18 00 01 00 01 00 18  00 00 00 00 00 00 00 12
(20)
00 02
(2)
00 08
(8)
31 36
("16")
20 57
(" W")
42 39 48 35
("B9H5")
30 30 32 32
("0022")
20 36
("06")
00 01

Read Macro-Value #100

Request
syncsourcecommandlength
payload
A0 A0 A0 A0 00 01 21 01 00 1E
subpackets
length "requestinfo"from
 to
-- -
00 1C 00 01 00 01 00 15 00 00 00 64
(100)
00 00 00 64
(100)
00 00 00 00 00 00
00 01
Response
syncsourcecommandlength
payload
A0 A0 A0 A0 00 02 21 02 00 1A
subpackets
length "requestinfo"-lengthvalue
00 18 00 01 00 01 00 15  00 00 00 00 00 00 00 08
(8)
40 00 00 00 00 02 00 1B
(fract 8)
00 01

Read PMC-Value D2204 Word

Request
syncsourcecommandlength
payload
A0 A0 A0 A0 00 01 21 01 00 1E
subpackets
length "requestinfo"from
to
memtyp
resptyp -
00 1C 00 02 00 01 80 01 00 00 08 9c
(2204)
00 00 08 9d
(2205)
00 00 00 09
(Data Table)
00 00 00 01
(short)
00 00 00 00
00 01
Response
syncsourcecommandlength
payload
A0 A0 A0 A0 00 02 21 02 00 14
subpackets
length "requestinfo"-length
value
00 12 00 02 00 01 80 01  00 00 00 00 00 00 00 02
(2)
02 58
(600)
00 01

Read Diag-Data 980-981

Request
syncsourcecommandlengthpayload
A0 A0 A0 A0 00 01 21 01 00 1E
subpackets
length "requestinfo"fromtoaxis--
00 1C 00 01 00 01 00 30 00 00 03 d4
(980)
00 00 03 d5
(981)
00 00 00 01
(first axis)
00 00 00 00 00 00 00 00
00 01
Response
syncsourcecommandlengthpayload
A0 A0 A0 A0 00 02 21 02 00 62
subpackets
length "requestinfo"-length
2 bytes
00 60 00 01 00 01 00 30  00 00 00 00 00 00 00 50
( 8 x 4 + 8 ) x 2=80
00 01

payload continuation
NumberAxisTypeValue Axis 1Value Axis 2Value Axis ...Value Axis n (MAX_AXIS)
00 00 03 d4
(980)
00 01
(only first)
00 02
(long)
ff f6 de aa
(‭-598358‬)
 30 30 32 32
(random)
... ...

payload continuation
NumberAxisTypeValue Axis 1Value Axis 2Value Axis ...Value Axis n (MAX_AXIS)
00 00 03 d5
(981)
00 01
(only first)
00 02
(long)
 ff e2 62 6c
(‭-1940884‬)
00 00 00 00
(random)
... ....

Close

Request
syncsourcecommandlength
A0 A0 A0 A0 00 01 02 01 00 00
Response
syncsourcecommandlength
A0 A0 A0 A0 00 02 02 02 00 00

Numberformats:

Fractional

Binary-ValueFormat IdentShift-Value
40 00 00 0000 0200 1B
40 00 00 00 Arithmetic Shift Right 1B
00 00 00 08 . 00 00 00 00
 Decimal 8

 
Binary-ValueFormat IdentShift-Value
46 00 00 0000 02 00 1B
46 00 00 00 Arithmetic Shift Right 1B
00 00 00 08 . C0 00 00 00
Decimal 8 + 2-1 + 2-2 = 8.75

Fixcomma

signed longFormat IdentDecimal places
0F 32 FD C000 0A00 06
signed long F32FDC0
255,000,000
Decimal 255.000000

 

Python-Source:

Version 0.1 fanuc.py 11.05.2020

Version 0.11 pyfanuc.py 13.05.2020