日本語 English

FINS Command Examples

Command list

Command

I/O Memory Area Read (01 01)

Reads data from a consecutive memory area
The maximum read size is 999 words over Ethernet
It may be smaller depending on the networks the command passes through

Command format
MRCSRCTEXT
Command codeMemory type Read start addressNumber of elements to read
01 01

Example: command reading 10 words from DM100

01 01 82 00 64 00 00 0A
Response format
MRCSRCMRESSRESTEXT
Command codeEnd codeRead data
0101

Example: response after reading 10 words from DM100

0101000000 01 00 02 00 03...00 0A
* The read data is 20 bytes

I/O Memory Area Write (01 02)

Writes data to a consecutive memory area
The maximum write size is 997 words over Ethernet
It may be smaller depending on the networks the command passes through

Command format
MRCSRCTEXT
Command code Memory type Write start address Number of elements to write Write data
0102

Example: command writing 2 words, 0001 to DM100 and 0002 to DM0101

01 02 82 00 64 00 00 02 00 01 00 02
* The write data is 4 bytes
Response format
MRCSRCMRESSRES
Command codeEnd code
0102

Example: normal completion response

01020000

I/O Memory Area Fill (01 03)

Writes the same value to a consecutive memory area

Command format
MRCSRCTEXT
Command code Memory type Write start address Number of elements to write Write data
01 03

Example: command writing 0000 to 10 words from DM100

MRCSRCTEXT
01 03 82 00 64 00 00 0A 00 00
Response format
MRCSRCMRESSRES
Command codeEnd code
01 03

Example: normal completion response

01 03 00 00

Multiple I/O Memory Area Read (01 04)

Command format

Command format
MRCSRCTEXT
Command code Memory type Read address ... Memory type Read address
01 04 ...

Example: command reading the values of DM100, DM200 and W10

01 04 82 00 64 00 00 82 00 C8 00 00 B1 00 0A 00
Response format
MRCSRCMRESSRESTEXT
Command code End code Memory type Read data Memory type Read data Memory type Read data
01 04

Example: response after reading the values of DM100, DM200 and W10

01 04 00 00 82 12 34 82 02 00 B1 12 34

Change Operating Mode (RUN) (04 01)

Command format
MRCSRCTEXT
Command code Program number Mode
04 01 FF FF
Mode: 02 = MONITOR mode, 04 = RUN mode

Example: command changing to MONITOR mode

04 01 FF FF 02
Response format
MRCSRCMRESSRES
Command code End code
04 01

Example: normal completion response

04 01 00 00

Change Operating Mode (STOP) (04 02)

Command format
MRCSRCTEXT
Command code Program number
04 02 FF FF

Example: stop command

04 02 FF FF
Response format
MRCSRCMRESSRES
Command code End code
04 01

Example: normal completion response

04 01 00 00

CPU Unit Data Read (05 01)

Command format
MRCSRCTEXT
Command code Data to read
05 01
* The data to read is 00 or 01

Response format

When the data to read is 00
MRCSRCMRESSRESTEXT
Command code End code CPU unit model System version System information Area information
05 01 20byte 20byte 40byte 12byte
When the data to read is 01
MRCSRCMRESSRESTEXT
Command code End code CPU Bus Unit configuration Remote I/O information CPU unit information
05 01 64byte

CPU Unit Status Read (06 01)

Command format

MRCSRC
Command code
06 01

Response format

MRCSRCMRESSRESTEXT
Command code End code Operating status Operating mode
06 01
TEXT (continued)
Fatal error information Message present Error code Error message
16byte

Cycle Time Read (06 20)

Command format
MRCSRCTEXT
Command code Parameters
06 20
* The parameter is 00 or 01

Response format

When the parameter is 00 (initialize)
MRCSRCMRESSRES
Command code End code
06 20
When the parameter is 01 (read)
MRCSRCMRESSRESTEXT
Command code End code Average cycle time Maximum cycle time Minimum cycle time
06 20 00 00 4byte 4byte 4byte

Clock Read (07 01)

Command format

MRCSRC
Command code
07 01

Response format

MRCSRCMRESSRESTEXT
Command code End code Year Month Day Hour Minute Second Day of week
07 01
* Day of week: 00 = Sunday to 06 = Saturday

Clock Write (07 02)

Command format

MRCSRCTEXT
Command code Year Month Day Hour Minute Second Day of week
07 02
* The parameter is 00 or 01

Response format

MRCSRCMRESSRES
Command code End code
07 02

Error Clear (21 01)

Command format

MRCSRCTEXT
Command code Error code to clear
21 01

Response format

MRCSRCMRESSRES
Command code End code
21 01

Error Log Read (21 02)

Command format

MRCSRCTEXT
Command code Start record No. Number of records to read
21 02

Response format

MRCSRCMRESSRESTEXT
Command code End code Maximum number of records Number of stored records Number of records read
21 02
TEXT (continued)
Error log data Error log data
10byte 10byte

Error Log Clear (21 03)

Command format

MRCSRC
Command code
21 03

Response format

MRCSRCMRESSRES
Command code End code
21 03

How to Specify Memory Types and Addresses

Configuration

The memory type and address are specified together in 4 bytes
Memory typeAddress
WordBit
 

Memory type

The memory type and address are specified together in 4 bytes
Area type Data type Memory type Command availability
0101 0102 0103 0104
Bit CIO 30 ○ ○ x ○
WR 31
HR 32
AR 33
DM 02
E0-EF 20-2F
E10-E18 E0-E8
EM current bank 0A
Task flags 06
Clock pulses 07
Condition flag 07
Bits with forced ON/OFF status CIO 70 x x x ○
WR 71
HR 72
Word CIO B0 ○ ○ ○ ○
WR B1
HR B2
AR B3
DM 82
E0-EF A0-AF
E10-E18 60-68
EM current bank 98
Words with forced ON/OFF status CIO F0 x x x ○
WR F1
HR F2
Up flags TIM 09 x x x ○
CNT
Up flags with forced ON/OFF status TIM 49 x x x ○
CNT
Current value TIM 89 ○ ○ ○ ○
CNT
Index register IR DC x
Data register DR BC

Address

For the address, the first 2 bytes are the address and the next byte specifies the bit position
WordBit position
 
Example: to specify DM100
For the address, the first 2 bytes are the address and the next byte specifies the bit position
Memory typeWordBit position
82 00 64 00
Example: to specify CIO256.14
For the address, the first 2 bytes are the address and the next byte specifies the bit position
Memory typeWordBit position
30 01 00 0E

Structure of Read and Write Data

The format of read data and write data differs depending on whether bits, bits with forced ON/OFF status, words, or words with forced ON/OFF status are specified

== When bits are specified ==

One bit is represented by one byte
  0x00 = OFF、0x01 = ON
Example: representing the 3 bits OFF-ON-OFF
00 01 00

== When bits with forced ON/OFF status are specified ==

One bit is represented by one byte
 
Bit 0: 0 = OFF, 1 = ON
Bit 1: 0 = not forced, 1 = forced
Example: representing forced OFF
02
Example: representing forced ON
03

== When words are specified ==

One word is represented by 2 bytes
 
15-8 7-0 Bit

== When words with forced ON/OFF status are specified ==

One word is represented by 4 bytes
 
15-8 7-0 15-8 7-0 Bit
Forced status Current value

Related pages

Comments