Paperless Recorder
Communication Command
User’s Manual
IM 04L51B01-17EN
3rd Edition
Introduction
Notes
Trademarks
Thank you for purchasing the SMARTDAC+ GX10/GX20/GP10/GP20 (hereafter referred to
as the GX and GP) Series.
This manual explains the dedicated commands for the GX/GP. To ensure correct use, please
read this manual thoroughly before beginning operation.
• The contents of this manual are subject to change without prior notice as a result of
continuing improvements to the instrument’s performance and functions.
• Every effort has been made in the preparation of this manual to ensure the accuracy of its
contents. However, should you have any questions or find any errors, please contact your
nearest YOKOGAWA dealer.
• Copying or reproducing all or any part of the contents of this manual without the
permission of YOKOGAWA is strictly prohibited.
• The TCP/IP software of this product and the documents concerning it have been
developed/created by YOKOGAWA based on the BSD Networking Software, Release 1
that has been licensed from the Regents of the University of California.
• vigilantplant is a registered trademark of Yokogawa Electric Corporation.
• SMARTDAC+ is a trademark of Yokogawa Electric Corporation.
• Microsoft and Windows are registered trademarks or trademarks of Microsoft Corporation
in the United States and/or other countries.
• Adobe and Acrobat are registered trademarks or trademarks of Adobe Systems
Incorporated.
• Company and product names that appear in this manual are registered trademarks or
trademarks of their respective holders.
• The company and product names used in this manual are not accompanied by the
registered trademark or trademark symbols (® and ™).
Revisions
December 2012 1st Edition
February 20132nd Edition
May 20133rd Edition
This manual explains the dedicated communication commands for the GX/GP and how
to use them. For details on the features of the GX/GP and how to use it, see the following
manuals.
• Models GX10/GX20/GP10/GP20 Paperless Recorder First Step Guide (IM 04L51B0102EN)
WARNINGCalls attention to actions or conditions that could cause serious or fatal
CAUTIONCalls attention to actions or conditions that could cause light injury
NoteCalls attention to information that is important for the proper operation
Improper handling or use can lead to injury to the user or damage to
the instrument. This symbol appears on the instrument to indicate that
the user must refer to the user’s manual for special instructions. The
same symbol appears in the corresponding place in the user’s manual
to identify those instructions. In the manual, the symbol is used in
conjunction with the word “WARNING” or “CAUTION.”
injury to the user, and precautions that can be taken to prevent such
occurrences.
to the user or cause damage to the instrument or user’s data, and
precautions that can be taken to prevent such occurrences.
of the instrument.
ii
IM 04L51B01-17EN
Contents
Introduction ................................................................................................................................................ i
How to Use This Manual .......................................................................................................................... ii
Conventions Used in This Manual ............................................................................................................ ii
Chapter 1 Using Dedicated Commands (General)
1.1 Operations over an Ethernet Network .................................................................................1-1
1.1.1 Preparing the Instrument ........................................................................................................1-1
1.1.2 Sending Commands and Receiving Responses ....................................................................1-1
1.2 Operations over the Serial Interface ...................................................................................1-2
1.2.1 Preparing the Instrument ........................................................................................................1-2
1.2.2 Sending Commands and Receiving Responses ....................................................................1-2
When Using the Login Function ....................................................................................................... App-2
When Not Using the Login Function ................................................................................................. App-3
Appendix 3 Output Flow Chart of External Storage Medium Files and File Lists ...............................App-4
Example for Outputting File aaaa.dtd ............................................................................................... App-4
Example for Outputting a File List .................................................................................................... App-5
Appendix 4 FIFO Data Output Flow Chart .........................................................................................App-6
Overview of the FIFO Buffer ............................................................................................................. App-6
Example of FIFO Buffer Operation ................................................................................................... App-6
Appendix 5 Check Sum Calculation Method ......................................................................................App-7
iv
IM 04L51B01-17EN
Chapter 1 Using Dedicated Commands (General)
1.1 Operations over an Ethernet Network
You can control the GX/GP by sending commands from a PC over an Ethernet network.
There are various types of commands: setting commands, output commands, operation
commands, communication control commands, and instrument information output
commands.
1.1.1 Preparing the Instrument
GX/GP Configuration
Configure the GX/GP to connect to the Ethernet network that you want to use. For
instructions on how to configure the GX/GP, see section 1.16, “Configuring the Ethernet
Communication Function“ in the Models GX10/GX20/GP10/GP20 Paperless Recorder User’s Manual (IM 04L51B01-01EN).
PC
The PC that you will use must meet the following requirements.
• The PC is connected to the Ethernet network that you want to use.
• The PC can run programs that you have created (see section 1.1.2, “Sending Commands
and Receiving Responses,” below).
1.1.2 Sending Commands and Receiving Responses
Programs
When you send a command to the GX/GP, it will return a response. You can control the
GX/GP by writing a program that sends commands and processes responses and then
executing the program. You need to create the programs.
Example: If you send the commands “FSnap,GET” from your PC to the GX/GP, the GX/GP
will return the snapshot data of its screen.
For details on commands and responses, see chapter 2, “Commands and Responses.”
1
Using Dedicated Commands (General)
Notes on Creating Programs
• When Not Using the Login Function
You can start using commands immediately after communication is established with the
GX/GP.
• When Using the Login Function
Log in to the GX/GP using a system administrator account or a normal user account
that is registered in the GX/GP. Log in by connecting to the GX/GP and then sending the
“CLogin” command.
IM 04L51B01-17EN
1-1
1.2 Operations over the Serial Interface
You can control the GX/GP by sending commands from a PC through the serial interface.
There are various types of commands: setting commands, output commands, operation
commands, communication control commands, and instrument information output
commands. Except for a few special commands, the commands are the same as those used
over an Ethernet network.
1.2.1 Preparing the Instrument
Connection
See section 1.2.3, “RS-232 Connection Procedure,” or section 1.2.4, “RS-422/485
Connection Procedure.”
GX/GP Configuration
Configure the GX/GP to use serial communication. For instructions on how to configure the
GX/GP, see section 1.17, “Configuring the Serial Communication Function (/C2 and /C3
options)“ in the Models GX10/GX20/GP10/GP20 Paperless Recorder User’s Manual (IM
04L51B01-01EN).
PC
The PC that you will use must meet the following requirements.
• The PC is connected to the GX/GP through the serial interface.
• The PC can run programs that you have created (see section 1.2.2, “Sending Commands
and Receiving Responses,” below).
1.2.2 Sending Commands and Receiving Responses
Programs
When you send a command to the GX/GP, it will return a response. You can control the
GX/GP by writing a program that sends commands and processes responses and then
executing the program. You need to create the programs.
Example: If you send the commands “FSnap,GET” from your PC to the GX/GP, the GX/GP
will return the snapshot data of its screen.
For details on commands and responses, see chapter 2, “Commands and Responses.”
Notes on Creating Programs
• For RS-232
When you connect a PC to the GX/GP through the serial interface, the GX/GP will be
ready to receive commands.
• For RS-422/485
The device that receives an open command (ESC O) from a PC will be ready to receive
commands. The connection will close in the following situations.
• When the GX/GP receives a connection-close command (ESC C).
• When another device is opened.
Example: If you open the device at address 1 and then open the device at address 2,
the connection with the device at address 1 will be closed automatically.
1-2
IM 04L51B01-17EN
12345
• OFF-OFF/XON-XON
• CS-RS(CTS-RTS)
1.2 Operations over the Serial Interface
1.2.3 RS-232 Connection Procedure
Connect a cable to the 9-pin D-sub RS-232 connector.
Connection
• Connector pin arrangement and signal names
Each pin corresponds to the signal indicated below. The following table shows the signal
name, RS-232 standard, JIS, and ITU-T standard signals.
Pin1Signal NameNameMeaning
JIS ITU-T RS-232
2RD 104BB(RXD) Received dataInput signal to the GX/GP.
3SD 103BA(TXD) Transmitted data Output signal from the GX/GP.
5SG 102AB(GND) Signal groundSignal ground.
7RS 105CA(RTS) Request to send Handshaking signal when receiving data from the
8CS 106CB(CTS) Clear to sendHandshaking signal when receiving data from the
1 Pins 1, 4, 6, and 9 are not used.
• Signal direction
9876
1
Using Dedicated Commands (General)
PC. Output signal from the GX/GP.
PC. Input signal to the GX/GP.
PC GX/GP
• Connection example
PC GX/GP
SD
RD
RS
CS
SG
• XON-RS(XON-RTS)
PC GX/GP
SD
RD
RS
CS
SG
3
SD
2
RD
RS
7
8
CS
5
SG
SD
3
RD
2
RS
7
8
CS
SG
5
RS [Request to send...Ready to receive]
CS [Clear to send...Ready]
SD [Send data]
RD [Received data]
PC GX/GP
SD
RD
RS
CS
SG
SD
3
RD
2
RS
7
8
CS
SG
5
The connection of RS on the PC and CS
on the GX/GP is not necessary. However,
we recommend that you wire them so that
the cable can be used in either direction.
7
8
3
2
IM 04L51B01-17EN
1-3
1.2 Operations over the Serial Interface
Handshaking
When using the RS-232 interface for transferring data, it is necessary for equipment on
both sides to agree on a set of rules to ensure the proper transfer of data. The set of rules
is called handshaking. Because there are various handshaking methods that can be used
between the GX/GP and the PC, you must make sure that the same method is chosen by
both the GX/GP and the PC.
You can choose any of the four methods on the GX/GP in the table below.
Handshaking
OFF-OFFYesYes
XON-XON
XON-RS
CS-RS
Yes Supported.
1Stops transmission when X-OFF is received. Resume when X-ON is received.
2Stops sending when CS (CTS) is false. Resumes when it is true.
3Sends X-OFF when the receive data buffer is 3/4 full. Sends X-ON when the receive data buffer
is 1/4th full.
4Sets RS (RTS) to False when the receive data buffer is 3/4 full. Sets RS (RTS) to True when the
receive data buffer becomes 1/4 full.
• OFF-OFF
Data transmission control
There is no handshaking between the GX/GP and the PC. The “X-OFF” and “X-ON”
signals received from the PC are treated as data, and the CS signal is ignored.
Data reception control
There is no handshaking between the GX/GP and the PC. When the received buffer
becomes full, all of the data that overflows are discarded.
RS = True (fixed).
Data transmission control
(Control used when sending data to a PC)
Software
Handshaking
1
Yes
1
Yes
Hardware
Handshaking
2
Yes
No
handshaking
Data Reception Control
(Control used when receiving data from
a PC)
Software
Handshaking
3
Yes
Hardware
Handshaking
4
Yes
4
Yes
No
handshaking
• XON-XON
Data transmission control
Software handshaking is performed between the GX/GP and the PC. When an “X-OFF”
code is received while sending data to the PC, the GX/GP stops the data transmission.
When the GX/GP receives the next “X-ON” code, the GX/GP resumes the data
transmission. The CS signal received from the PC is ignored.
Data reception control
Software handshaking is performed between the GX/GP and the PC. When the amount
of area of the received buffer used reaches to 192 bytes, the GX/GP sends an “X-OFF”
code. When the amount of area decreases to 64 bytes, the GX/GP sends an “X-ON”
code.
RS = True (fixed).
• XON-RS
Data transmission control
The operation is the same as with XON-XON.
Data reception control
Hardware handshaking is performed between the GX/GP and the PC. When the amount
of area of the received buffer used reaches to 192 bytes, the GX/GP sets “RS=False.”
When the amount of area decreases to 64 bytes, the GX/GP sets “RS=True.”
1-4
IM 04L51B01-17EN
1.2 Operations over the Serial Interface
• CS-RS
Data transmission control
Hardware handshaking is performed between the GX/GP and the PC. When the
CS signal becomes False while sending data to the PC, the GX/GP stops the data
transmission. When the CS signal becomes True, the GX/GP resumes the data
transmission. The “X-OFF” and “X-ON” signals are treated as data.
1
Using Dedicated Commands (General)
Data reception control
The operation is the same as with XON-RS.
Note
• The PC program must be designed so that the received buffers of both the GX/GP and the PC
do not become full.
• If you select XON-XON, send the data in ASCII format.
IM 04L51B01-17EN
1-5
Two-wire systemFour-wire system
RS-422/485
Host computer
1.2 Operations over the Serial Interface
1.2.4 RS-422/485 Connection Procedure
Connect a cable to the terminal.
Connection
• Connecting the Cable
As shown in the figure below, remove approximately 6 mm of the covering from the end of
the cable to expose the conductor. Keep the exposed section from the end of the shield
within 5 cm.
FG SG SDB+ SDA– RDB+ RDA–
FG SDB+
SG SDA−
Electric potential
of the shield
RDB+
RDA−
Shield
Electric potential
of the shield
FG SG SDB+ SDA– RDB+ RDA–
FG SDB+
SG SDA−
Shield
Recommended torque
for tightening the screw: 0.2 N•m
• Signal names
Each terminal corresponds to the signal indicated below.
Signal NameMeaning
FGFrame ground of the GX/GP.
SGSignal ground.
SDB+Send data B (+).
SDA–Send data A (–).
RDB+Receive data B (+).
RDA–Receive data A (–).
Connecting to the host device
The figure below illustrates the connection of the GX/GP to a host device. If the port on the
host device is an RS-232 interface, connect a converter.
or host device
Host device side
terminal on the GX/GP
1-6
RS-422/485
RS-422/485
Host computer
RS-232
Host device side
Converter
RS-422/485
terminal on the GX/GP
Connection example to the host device
A connection can be made with a host device having a RS-232, RS422, or RS-485 port. In
the case of RS-232, a converter is used. See the connection examples below for a typical
converter terminal. For details, see the manual that comes with the converter.
There is no problem of connecting a 220-Ω terminator at either end if YOKOGAWA’s PLCs
or temperature controllers are also connected to the communication line.
IM 04L51B01-17EN
Terminator (external) 120 Ω 1/2W or greater
Do not connect terminators to #1 through #n-1.
Terminator (external)
Terminator (external) 120 Ω 1/2W or greater
Do not connect terminators to #1 through #n-1.
Terminator (external)
1.2 Operations over the Serial Interface
Host device
side
SDA( – )
SDB( + )
RDA( – )
RDB( + )
SG
• Four-wire system
Generally, a four-wire system is used to connect to a host device. In the case of a four-
wire system, the transmission and reception lines need to be crossed over.
RS-422/485
terminal on the GX/GP
(SDA
(SDB
(RDA
(RDB
(SG)
–)
+)
–)
+)
SDA–
SDB+
RDA–
RDB+
SG
FG
(SDA
(SDB
(RDA
(RDB
(SG)
–)
+)
–)
+)
#1
SDA–
SDB+
RDA–
RDB+
SG
FG
(SDA
(SDB
(RDA
(RDB
(SG)
–)
+)
–)
+)
#2 #n
SDA–
SDB+
RDA–
RDB+
(#n 32)
SG
FG
• Two-wire system
Connect the transmission and reception signals with the same polarity on the RS-422/485
terminal block. Only two wires are used to connect to the external device.
1
Using Dedicated Commands (General)
RS-422/485
Host device
SDA( – )
SDB( + )
RDA( – )
RDB( + )
SG
(A
–)
(B+)
(SG)
terminal on the GX/GP
Note
• The method used to eliminate noise varies depending on the situation. In the connection
example, the shield of the cable is connected only to the GX/GP’s ground (one-sided
grounding). This is effective when there is a difference in the electric potential between
the computer’s ground and the GX/GP’s ground. This may be the case for long distance
communications. If there is no difference in the electric potential between the computer’s ground
and the GX/GP’s ground, the method of connecting the shield also to the computer’s ground
may be effective (two-sided grounding). In addition, in some cases, using two-sided grounding
with a capacitor connected in series on one side is effective. Consider these possibilities to
eliminate noise.
• When using the two-wire interface (Modbus protocol), the 485 driver must be set to high
impedance within 3.5 characters after the last data byte is sent by the host computer.
SDA–
SDB+
RDA–
RDB+
#1
SG
FG
(A
(B+)
(SG)
–)
SDA–
SDB+
RDA–
RDB+
SG
FG
(A
(B+)
(SG)
–)
#2 #n
SDA–
SDB+
RDA–
RDB+
SG
FG
(#n 31)
IM 04L51B01-17EN
1-7
1.2 Operations over the Serial Interface
Serial interface converter
The recommended converter is given below.
SYSMEX RA CO.,LTD./MODEL RC-770X, LINE EYE/SI-30FA, YOKOGAWA/ML2
Some converters not recommended by Yokogawa have FG and SG pins that are
not isolated. In this case, do not follow the diagram on the previous page (do not
connect anything to the FG and SG pins). Especially in the case of long distance
communications, the potential difference that appears may damage the GX/GP or
cause communication errors. For converters that do not have the SG pin, they can be
used without using the signal ground. For details, see the manual that comes with the
converter.
On some non-recommended converters, the signal polarity may be reversed (A/B or +/indication). In this case, reverse the connection.
For a two-wire system, the host device must control the transmission driver of the converter
in order to prevent collisions of transmit and received data. When using the recommended
converter, the driver is controlled using the RS (RTS) signal on the RS-232.
When instruments that support only the RS-422 interface exist in the system
When using the four-wire system, up to 32 GX/GPs can be connected to a single host
device. However, this may not be true if instruments that support only the RS-422 interface
exist in the system.
When YOKOGAWA’s recorders that support only the RS-422 interface exist in
the system
The maximum number of connection is 16. Some of YOKOGAWA’s conventional recorders
(HR2400 and µR, for example) only support the RS-422 driver. In this case, only up to 16
units can be connected.
Note
In the RS-422 standard, 10 is the maximum number of connections that are allowed on one port
(for a four-wire system).
Terminator
When using a multidrop connection (including a point-to-point connection), connect a
terminator to the GX/GP if the GX/GP is connected to the end of the chain. Do not connect
a terminator to a GX/GP in the middle of the chain. In addition, turn ON the terminator on
the host device (see the manual of the host device). If a converter is being used, turn ON its
terminator. The recommended converter is a type that has a built-in terminator.
Select the appropriate terminator (120 Ω), indicated in the figure, according to the
characteristic impedance of the line, the installation conditions of the instruments, and so on.
The GX/GP can work with various applications through the use of commands.
The communication that is achieved through commands is referred to as “general
communication.”
2.1.2 Command Types and Functions
The following types of commands are available. The first character of command names
represents the command type. For example, in the command “SRangeAI,” “S” represents
the command type. The second and subsequent characters represent the contents of
commands.
TypeDescription
Operation commands
Example:
Setting commands
Example: SRangeAI
Output commands
Example:
Communication Control commands
Example: CCheckSum
Instrument information output
commands
Example: _MFG
OSetTime
FData
2.1.3 Command Syntax
A Single Command
A single command consists of a command name, parameters, delimiters, and terminator.
The command name is written in the beginning, and parameters follow. Delimiters are used
to separate the command name from parameters and between each parameter. A delimiter
is a symbol that indicates a separation. A terminator is attached to the end of a command.
2
Commands and Responses
Commands that start with “O.” These commands are used
to operate the GX/GP.
Commands that start with “S.” These commands change
the GX/GP settings.
Commands that start with “F.” These commands cause the
GX/GP to output measured data and other types of data.
Commands that start with “C.” These commands control the
communication with the GX/GP.
Commands that start with an underscore. These commands
cause the GX/GP to output its instrument information.
Example of a Command
SRangeAI,0001,VOLT,2V,OFF,-15000,18000,0
Commands in a Series (Setting commands only)
You can send multiple setting commands in a series. When writing a series of commands,
separate each command with a sub delimiter. A sub delimiter is a symbol that indicates a
separation. A terminator is attached to the end of the series. The maximum number of bytes
that can be sent at once is 8000 bytes (8000 characters).
(Command 1)(Command 2)
IM 04L51B01-17EN
Delimiters
Sub delimiter
2-1
2.1 Command Transmission and GX20 Responses
Command name? terminator
Notes on Writing Commands in a Series
• Only setting commands can be written in a series.
• Queries (see the next section) cannot be written in a series.
• If there is an error in one of the commands in a series, the commands before it are
canceled, and those after it are not executed.
Queries are used to inquire the GX/GP settings. To send a query, append a question mark to
the command name or parameter. When the GX/GP receives a query, it returns the relevant
setting as a character string in an appropriate syntax. Queries can be used on some of the
available setting and operation commands.
A command name is a character string consisting of up to 16 alphanumeric characters. The
first character represents the command type.
Notes on Writing Commands Names
• Command names are not case sensitive.
• Spaces before the character string are ignored.
2-2
IM 04L51B01-17EN
1
Parameters
2.1 Command Transmission and GX20 Responses
Parameters are characteristic values that are attached to commands.
Notes on Writing Parameters
• Write parameters in their appropriate order.
• Spaces around and in the middle of parameters are ignored. Exception is the character
strings that users specify.
• You can omit the setting command parameters that do not need to be changed from their
current settings. If you omit parameters, write only the delimiters.
Example: SRangeAI,0001,,,,,1800,0 terminator
• If parameters are omitted and there are multiple delimiters at the end of the command,
those delimiters can be omitted.
There are two types of parameters: predefined expressions and user-defined character
strings.
How to Write User-Defined Character Strings (Parameters)
• Enclose user-defined character strings in single quotation marks.
Example The command for setting the channel 0001 tag to “SYSTEM1” is shown
below.
STagIO,0001,'SYSTEM1'
• There are two types of user-defined character strings depending on the type of characters
that can be used.
Character Strings Consisting Only of Characters in the ASCII Code Range (0x00 to
0x7f)
In this manual, applicable parameters are indicated with “ASCII.”
Example p3 Tag number (up to 16 characters, ASCII)
2
Commands and Responses
Delimiters
Sub delimiters
Terminators
You can use alphanumeric characters and some of the symbols. For the ASCII characters
that you can use, see appendix 1.
Character Strings Consisting of Characters in the UTF-8 Code Range
In this manual, applicable parameters are indicated with “UTF-8.”
Example p2 Tag (up to 32 characters, UTF-8)
UTF-8 codes include ASCII codes. You can use UTF-8 characters, including the ASCII
characters above. For the ASCII characters that you can use, see appendix 1.
Commas are used as delimiters.
Semicolons are used as sub delimiters.
“CR+LF” is used as a terminator, meaning “CR” followed by “LF.” Expressed in ASCII code, it
is 0x0d0x0a.
IM 04L51B01-17EN
2-3
2.1 Command Transmission and GX20 Responses
2.1.4 GX/GP Responses
The GX/GP returns the following responses to commands.
• If the GX/GP successfully completes the processing of a received output request
command, it outputs the requested data.
• If the GX/GP successfully completes the processing of a received command that is not an
output request command, it outputs an affirmative response.
• If a command syntax error, setting error, or other error occurs, the GX/GP outputs a
negative response.
For each command the GX/GP receives, it returns a single response. The controller (PC)
side must process commands and responses in accordance with this command-response
rule. If the command-response rule is not followed, the operation of the GX/GP is not
guaranteed. For details on the response syntax, see 2.9 Responses to Commands.
Scan interval2-9
Scan group2-9
AI module2-9
DI module2-9
Detection of values that exceed
the scale
Recording mode2-10
Display data recording2-10
Event data recording2-10
Channel for recording display
data
Channel for recording event data 2-11
Channel for recording manual
sampled data
Batch function2-11
Batch text2-11
Name of directory to save data2-11
File header2-12
File naming rule2-12
Automatic data file saving2-12
Display/event data file format2-12
Measurement range of AI channel 2-13
Measurement range of DI channel2-14
DO channel operation2-14
Moving average2-15
Behavior when a sensor burns out2-15
Reference junction compensation
Math action (/MT)2-19
Constant (/MT)2-20
Computation expression (/MT)2-20
TLOG (/MT)2-20
Rolling average (/MT)2-20
Alarm (/MT)2-20
Alarm hysteresis (/MT)2-21
Alarm delay time (/MT)2-21
Tag (/MT)2-21
Channel color (/MT)2-21
Waveform display zone (/MT)2-21
Scale display (/MT)2-21
Bar graph display (/MT)2-22
Partial expanded display (/MT)2-22
Color scale band (/MT)2-22
Alarm mark (/MT)2-22
Measurement range (/MC)2-23
Preset operation (/MC)2-23
Watchdog timer (/MC)2-23
Alarm (/MC)2-24
Alarm hysteresis (/MC)2-24
Alarm delay time (/MC)2-24
Tag (/MC)2-24
Channel color (/MC)2-25
Waveform display zone (/MC)2-25
Scale display (/MC)2-25
Bar graph display (/MC)2-25
Partial expanded display (/MC)2-25
Color scale band (/MC)2-25
Alarm mark (/MC)2-26
Time zone2-32
Gradual time adjustment2-32
Date format2-32
Daylight saving time2-33
Language2-33
Temperature unit2-33
Decimal point type2-33
Fail relay (DO channel) operation
(/FL)
Instrument status to output (/FL) 2-34
Printer2-34
LED indicator operation2-34
Sound2-34
Instruments tag2-34
Setting file comment2-34
USB input device2-34
Internal switch operation2-34
Serial communication basics (/C2
or /C3)
Modbus master (/C2/MC or /C3/
MC)
Modbus master transmission
command (/C2/MC or /C3/MC)
IP address information2-36
Client function2-36
DNS information2-36
DHCP client2-36
File to transfer via FTP2-37
FTP transfer time shift2-37
FTP client connection destination
server
SMTP user authentication2-37
SMTP client connection
destination server
Mail header (recipient address)2-37
Common section of the mail body 2-38
Destination and behavior for each
Modbus client connection
destination server (/MC)
Modbus client transmission
command (/MC)
Server function2-40
Keepalive2-40
Communication timeout2-40
FTP server directory output format2-40
Modbus server delay response2-40
Modbus server connection limit2-40
IP address to allow connection to
Modbus server
Security function2-40
Password to unlock operation2-41
Operation lock details2-41
User settings2-41
Authority of user2-41
Monitor screen display
information
Multi panel division2-42
Multi panel2-42
Standard display information 2-42
Standard display2-43
Favorite screen display
information
Favorite screen2-43
2-39
2-39
2-40
2-41
2-43
2.2.2 Output Commands
Command DescriptionPage
FData
FRelay
FFifoCur
FSnap
FUser
FAddr
FStat
FLog
FMedia
FCnf
FChInfo
FSysConf
Outputs the most recent channel
data
Outputs the most recent relay (DO
channel) and internal switch status
Outputs channel FIFO data2-44
Takes a snapshot2-44
Outputs the user level2-44
Outputs the IP address2-45
Outputs the GX/GP status2-45
Outputs the log2-45
Outputs external storage medium
and internal memory information
Outputs setting data2-46
Outputs decimal place and unit
information
Queries the system configuration
and reconfigures modules
Generates a manual trigger,
executes manual sample, takes a
snapshot, or causes a timeout
Queries the time using SNTP2-47
Writes a message2-47
Changes the password2-48
Starts, stops, or resets
computation or clears the
computation dropout status display
Saves setting data2-48
Sets a communication channel to
a value
Starts or stops the e-mail
transmission function
Recovers Modbus manually2-48
Resets a relative timer2-48
Resets the match time timer2-49
Outputs the DO channel and
internal switch status
Sets a batch name2-49
Sets a batch comment2-49
Sets a batch text2-49
Switches the trend interval2-49
Loads setting data2-50
Applies serial communication
settings
Applies the IP address2-50
Clears measured data and
initializes setting data
2-47
2-47
2-48
2-48
2-48
2-49
2-50
2-50
2.2.4 Communication Control
Commands
Command DescriptionPage
CCheckSum
CSFilter
CLogin
CLogout
ESC O
ESC C
Sets the checksum2-51
Sets the status filter2-51
Log in via communication2-51
Log out via communication2-51
Opens an instrument (RS-422/485
only)
Closes an instrument (RS-422/485
only)
2-51
2-51
2.2.5 Instrument Information
Commands
Command DescriptionPage
_MFG
_INF
_COD
_VER
_OPT
Outputs the instrument
manufacturer
Outputs the instrument’s product
name
Outputs the instrument’s basic
specifications
Outputs the instrument’s firmware
version information
Outputs the instrument’s option
installation information
2-52
2-52
2-52
2-52
2-52
2.2 List of Commands
_TYP
_ERR
_UNS
_UNR
_MDS
_MDR
Outputs the instrument’s
temperature unit, and daylight
saving time installation information
Outputs the instrument’s error
number information
Outputs the instrument’s unit
configuration information
Outputs the instrument’s unit
configuration information
Outputs the instrument’s module
configuration information
Outputs the instrument’s module
configuration information
2-52
2-52
2-52
2-52
2-52
2-52
2.2.6 Conditions for Executing
Commands
A command can be executed only when the GX/GP can
execute the setting change or operation that the command
specifies. Commands are invalid in the following
circumstances.
• The GX/GP is not in a condition to accept the
operation.
For example, if the GX/GP is not recording, you cannot
write a message.
• If the GX/GP does not have the function or is not using
the function.
The “Setup Item” column in section 2.2.1, “Setting
Commands” contains the GX/GP suffix codes that are
required for using the commands.
• Operation lock or user restriction is placed on the
operation.
The following table lists the commands that are invalid
according to the limitation types (p1 of the SOpeLimit
command or p2 of the SUserLimit command).
Specify the span using an integer.
Example If the range is -2.0000 V to 2.0000 V and you
want to set the span lower limit to 0.5000 V and the span
upper limit to 1.8000 V, set the parameters to 5000 and
18000, respectively.
SRangeAI,0001,VOLT,2V,FF,5000,18000,0
Scaling
Scaling is possible on AI and DI channels. Scaling is
specified by a mantissa and decimal place.
Example To set the scaling to -10.00 to 20.00, set the
scaling lower limit to -1000, scaling upper limit to 2000,
and the decimal place to 2. The decimal place value
represents the number of digits to the right of the decimal
point.
Math Channel and Communication Channel
Span
Set the span of math channels and communication
channels using a mantissa and decimal place.
Example To set the span to 1.000 to 2.000, set the
scaling lower limit to 1000, scaling upper limit to 2000, and
the decimal place to 3.
2.3.2 Parameter Notation and Range
The table below shows the principle parameter notations
and ranges of values.
TypeNotation and Range of Values
AI channel
DI channel
DO channel
Math channelGX20/GP20: 001 to 100
Communication
channel
Number of
channels for
recording
display data
Number of
channels for
recording event
data
Specify as “unit number+module
number+channel.”
Example The AI channel whose unit
number is 0, module number is 1, and
channel number is 02 is 0102.
GX10/GP10: 001 to 050
For SGroup and SMailAlarm
commands, insert “A” in front.
Example A001
GX20/GP20: 001 to 300
GX10/GP10: 001 to 050
For SGroup and SMailAlarm
commands, insert “C” in front.
Example C001
GX20/GP20: 001 to 500
GX10/GP10: 001 to 100
GX20/GP20: 001 to 500
GX10/GP10: 001 to 100
TypeNotation and Range of Values
Number of
report channels
Number of
display groups
Number of
channels
that can be
registered to
display groups
Modbus
command
number
GX20/GP20: 1 to 60
GX10/GP10: 1 to 50
GX20/GP20: 1 to 50
GX10/GP10: 1 to 30
GX20/GP20: 20
GX10/GP10: 10
GX20/GP20: 1 to 100
GX10/GP10: 1 to 50
2.3.3 Specifying a Range
When specifying consecutive channel numbers or group
numbers in a setting command, you can specify them
using a range instead of specifying each number one by
one.
• Use a hyphen to separate the first number and the last
number. For I/O channels, you can specify a range that
spans over multiple slots that modules are installed in.
• You can specify the minimum number by omitting the
number before the hyphen and the maximum number
by omitting the number after the hyphen. If you want
to specify all numbers from the first number to the last
number, specify only the hyphen.
Example 1
To specify 3 to 10: “3-10”
To specify 3 to the maximum number: “3-”
To specify the first number to 10: “-10”
To specify all numbers: “-”
Example 2
A command that sets the channel ranges of AI modules
installed in slots 0 to 2 to Skip.
SRangeAI,0001-0210,Skip or
SRangeAI,-0210,Skip
If a different module is installed in slot 1, queries will work,
but setting commands will result in error.
2-8
IM 04L51B01-17EN
1
2.4 Setting Commands
SScan
Scan Interval
Sets the scan interval.
Syntax
Query
Example Set the scan interval to 1 second.
Description
• You cannot use this command to configure settings
• You cannot use this command to configure settings
SScanGroup
Scan Group
Registers a measurement channel in scan group 1.
Syntax
Query
Example Set the module whose module number is 2 in
Description
• You cannot use this command to configure settings
• You cannot use this command to configure settings
SModeAI
SScan,p1,p2
p1
Scan group (1)
p2
Scan interval (100ms, 200ms, 500ms, 1s,
2s, 5s)
SScan[,p1]?
SScan,1,1s
while recording is in progress.
while computation is in progress.
SScanGroup,p1,p2,p3
p1
Unit number (0)
p2
Module number (0 to 9)
p3
Scan group (1)
1
SScanGroup[,p1[,p2]]?
scan group 1.
SScanGroup,0,2,1
while recording is in progress.
while computation is in progress.
Scan group 1
• You cannot use this command to configure settings
while recording is in progress.
• You cannot use this command to configure settings
while computation is in progress.
• Scan intervals shorter than 1 s cannot be specified
if an electromagnetic relay scanner type (Type suffix
code: -T1) analog input module is in use (set up).
• Fixed to 10ch mode if an electromagnetic relay
scanner type analog input module is in use.
• You can set the parameters in the following
combinations.
Query
Example Record event data in Free mode at a recording
Description
• You cannot use this command to configure settings
• You cannot use this command to configure settings
• You cannot choose a recording interval that is shorter
• You cannot choose a recording interval that is not an
• This setting is valid when event data recording is
SEventData[,p1]?
interval of 1 second. Separate the data into
different files every 2 hours.
SEventData,1,1s,Free,2h
while recording is in progress.
while computation is in progress.
than the scan interval.
integer multiple of the scan interval.
enabled (recording mode of the SMemory command).
Starts recording at
recording start and
stops recording at
recording stop.
After a trigger event
occurs, the GX/GP will
record for the specified
time and stop.
After a trigger event
occurs, the GX/GP will
record for the specified
time and stop. Then,
the GX/GP will enter
the trigger-wait state.
SRecDisp
Channel for Recording Display Data
Sets the channel for recording display data.
Syntax
Query
Example Assign the display data of I/O channel 0005 to
Description
• You cannot use this command to configure settings
• You cannot use this command to configure settings
SRecDisp,p1,p2,p3
p1
Number (see “Description”)
p2
Channel type
Off
Do not record display data.
IO
I/O channel
Math
Math channel
Com
p3
SRecDisp[,p1]?
number 10 and record.
SRecDisp,10,IO,0005
while recording is in progress.
while computation is in progress.
Communication channel
Channel number
2-10
IM 04L51B01-17EN
1
2.4 Setting Commands
• If p2=Off, you cannot set p3.
• There is a limit to the number of recording channels
depending on the recording interval (SDispData
command).
Recording
Interval
5 s/div100
10 s/div200
15 s/div or higher 500
• You cannot set a channel more than once.
Number of Recording Channels
SRecEvent
Channel for Recording Event Data
Sets the channel for recording event data.
Syntax
Query
Example Assign the event data of I/O channel 0006 to
Description
• You cannot use this command to configure settings
• You cannot use this command to configure settings
• If p3=Off, you cannot set p4.
• This setting is valid when event data recording is
• There is a limit to the number of recording channels
• You cannot set a channel more than once.
SRecEvent,p1,p2,p3,p4
p1
Scan group (1)
p2
Number (see “Description”)
p3
Channel type
Off
IO
Math
Com
p4
Channel number
SRecEvent[,p1[,p2]]?
number 11 and record.
SEventData,1,11,IO,0006
while recording is in progress.
while computation is in progress.
enabled (recording mode of the SMemory command).
depending on the recording interval (SEventData
command).
Recording
Interval
100 ms100
200 ms200
500 ms or more 500
Do not record event data.
I/O channel
Math channel
Communication channel
Number of Recording Channels
SRecManual
Channel for Recording Manual Sampled
Data
Sets the channel for recording manual sampled data.
Syntax
Query
SRecManual,p1,p2,p3
p1
Number (1 to 50)
p2
Channel type
Off
Do not record manual sampled data.
IO
I/O channel
Math
Math channel
Com
Communication channel
p3
Channel number
SRecManual[,p1]?
Example Assign the manual sampled data of I/O
channel 0003 to number 2 and record.
SRecManual,2,IO,0003
Description
• You cannot use this command to configure settings
while recording is in progress.
• You cannot use this command to configure settings
while computation is in progress.
• If p2=Off, you cannot set p3.
• You cannot set a channel more than once.
SBatch
Batch Function
Configures the batch function’s basic settings.
Syntax
Query
Example Enable the batch function. Use 4-digit lot
Description
• You cannot use this command to configure settings
SBatch,p1,p2,p3
p1
Enable or disable (Off, On)
p2
Number of lot number digits (Off, 4, 6, 8)
Off
Do not use lot numbers.
4
4-digit lot number
6
6-digit lot number
8
p3
SBatch?
numbers. Automatically increment the lot
number in the next operation.
SBatch,On,4,On
while recording is in progress.
8-digit lot number
Auto increment (Off, On)
STextField
Batch Text
Sets a batch text.
Syntax
Query
Example For field number 3, set the field title to
Description
• You cannot use this command to configure settings
STextField,p1,p2,p3
p1
Field number (1 to 24)
p2
Title (up to 20 characters, UTF-8)
p3
Character string (up to 30 characters,
UTF-8)
STextField[,p1]?
“OPERATOR” and the character string to
“RECORDER1.”
STextField,3,’OPERATOR’,’RECORD
ER1’
while recording is in progress.
SDirectory
Name of Directory to Save Data
Sets the name of the directory to save data.
Syntax
SDirectory,p1
p1
Directory name (up to 20 characters,
ASCII)
2
Commands and Responses
IM 04L51B01-17EN
2-11
2.4 Setting Commands
Query
Example Set the directory name to “DATA0.”
Description
• For the characters that you can use in the directory
• The following character strings cannot be used for
• You cannot use a character string that starts or ends
SDirectory?
SDirectory,’DATA0’
name (p1), see Appendix 1.
directory names.
Character String
AUX
CON
PRN
NUL
CLOCK$
COM0 to COM9
LPT0 to LPT9
with a period or space for directory names.
SFileHead
File Header
Sets the file header character string.
Syntax
Query
Example Set the file header to “GX_DATA.”
SFileHead,p1
p1
File header (up to 50 characters, UTF-8)
SFileHead?
SFileHead,’GX_DATA’
Query
Example Enable the auto saving to the external storage
SMediaSave?
medium and media FIFO.
SMediaSave,On,On
SFileFormat
Display/Event Data File Format
Sets the file format of display data files and event data
files.
Syntax
Query
Example Create files in text format.
Description
• The types of data that you can set file formats for are
• The file saving methods that the specified file format
SFileFormat,p1
p1
File format (Binary, Text)
SFileFormat?
SFileFormat,Text
display data and event data.
is applied to are auto saving, saving of unsaved data,
manual saving, and FTP data transfer.
SFileName
File Naming Rule
Sets the file naming rule for data files.
Syntax
Query
Example Set the file naming rule to “Date.” Set the
Description
• If the batch setting is disabled (SBatch: p1=Off), you
• If p1=Batch, p2 is invalid.
• For the characters that you can use in the specified
SFileName,p1,p2
p1
File naming rule
Date
Serial
Batch
p2
Specified file name (up to 16 characters,
ASCII)
SFileName?
specified file name to “Recorder1_data.”
SSFileName,Date,’Recorder1_data’
cannot specify p1=Batch.
file name (p2), see Appendix 1.
Date
Serial number
Batch name
SMediaSave
Automatic Data File Saving
Sets the auto saving of data files to an external storage
medium.
Syntax
SMediaSave,p1,p2
p1
Auto saving to an external storage
medium (Off, On)
p2
Media FIFO (Off, On)
2-12
IM 04L51B01-17EN
1
SRangeAI
Measurement Range of AI Channel
Sets the measurement range of an AI channel.
Unused Channels
Syntax
Channels Whose Input Type Is DI and No Math
Syntax
Channels Whose Input Type Is Volt, TC, or RTD and
No Calculation
Syntax
Delta Channels
Syntax
Scaling Channels
Syntax
Unified Signal Input Channels (Input Type Is GS)
Syntax
SRangeAI,p1,p2
p1
Channel number
p2
Input type (Skip)
SRangeAI,p1,p2,p3,p4,p5,p6
p1
Channel number
p2
Input type (DI)
p3
Range (see “Description.”)
P4
Calculation type (Off)
p5
Span lower limit
p6
Span upper limit
SRangeAI,p1,p2,p3,p4,p5,p6,p7
p1
Channel number
p2
Input type (Volt, TC, RTD)
p3
Range (see “Description.”)
P4
Calculation type (Off)
p5
Span lower limit
p6
Span upper limit
p7
Bias (–999999 to 999999)
SRangeAI,p1,p2,p3,p4,p5,p6,p7,p8
p1
Channel number
p2
Input type (Volt, TC, RTD, DI)
p3
Range (see “Description.”)
P4
Calculation type (Delta)
p5
Span lower limit
p6
Span upper limit
p7
Bias (–999999 to 999999) (can be set
when p2 is not set to DI)
p8
Reference channel number
SRangeAI,p1,p2,p3,p4,p5,p6,p7,p8,p
9,p10,p11
p1
Channel number
p2
Input type (Volt, TC, RTD, DI)
p3
Range (see “Description.”)
P4
Calculation type (Scale)
p5
Span lower limit
p6
Span upper limit
p7
Bias (–999999 to 999999) (can be set
when p2 is not set to DI)
Example Measure 0 to 1 on channel 0103. No scaling.
SRangeDI,0103,DI,-,Off,0,1
Description
• You cannot use this command to configure settings
while recording is in progress.
• You cannot use this command to configure settings
while computation is in progress.
SRangeDO
DO Channel Operation
Sets the DO channel operation.
Alarm Output
Syntax
Alarm Output (Reflash)
Syntax
SRangeDO,p1,p2,p3,p4,p5,p6,p7,p8
,p9
p1
Channel number
p2
Output type (Alarm)
p3
Span lower limit (0 to 1)
P4
Span upper limit (0 to 1)
p5
Unit (up to 6 characters, UTF-8)
p6
Energize or de-energize
Energize
Energize the relay (DO
channel) during output.
De_energize
De-energize the relay
(DO channel) during
output.
p7
Operation
And
Operate when all set alarms are
in the alarm state.
Or
Operate when any of the set
alarms are in the alarm state.
p8
Hold or nonhold
Hold
Hold output until an
alarm ACK operation.
Nonhold
Clear output when the
alarm is cleared.
p9
Relay (DO channel) action on
acknowledge (Normal, Reset)
SRangeDO,p1,p2,p3,p4,p5,p6,p7,p8
,p9
p1
Channel number
p2
Output type (Alarm)
p3
Span lower limit (0 to 1)
P4
Span upper limit (0 to 1)
p5
Unit (up to 6 characters, UTF-8)
p6
Energize or de-energize
Energize
Energize the relay (DO
channel) during output.
De_energize
De-energize the relay
(DO channel) during
output.
p7
Action (Reflash)
p8
Reflash time (500ms, 1s, 2s)
2-14
IM 04L51B01-17EN
1
p9
Relay (DO channel) action on
acknowledge
Manual Output
Specifies the output value.
Syntax
Query
Example Output an alarm on channel 0203. Set the
Description
• You cannot use this command to configure settings
• You cannot use this command to configure settings
• If p2=Manual, you cannot set p7 or subsequent
• If p7=And or Or, you cannot set the reflash time.
SRangeDO,p1,p2,p3,p4,p5,p6
p1
Channel number
p2
Output type (Manual)
p3
Span lower limit (0 to 1)
P4
Span upper limit (0 to 1)
p5
Unit (up to 6 characters, UTF-8)
p6
Energize or de-energize
Energize
De_energize
SRangeDO[,p1]?
span lower limit to 0 and span upper limit to 1.
Specify energize operation, logic or operation,
and hold operation. Set the action on ACK to
Normal. Set the unit to “Unit.”