Yokogawa GP20 User Manual

User’s Manual
Models GX10/GX20/GP10/GP20
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 2013 2nd Edition May 2013 3rd Edition
3rd Edition: May 2013 (YK) All Right Reserved, Copyright © 2012 - 2013, Yokogawa Electric Corporation
IM 04L51B01-17EN

How to Use This Manual

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 04L51B01­02EN)
• Models GX10/GX20/GP10/GP20 Paperless Recorder User’s Manual (IM 04L51B01­01EN)

Conventions Used in This Manual

Unit
K Denotes 1024. Example: 768K (file size)
k Denotes 1000.
Markings
WARNING Calls attention to actions or conditions that could cause serious or fatal
CAUTION Calls attention to actions or conditions that could cause light injury
Note Calls 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
1.2.3 RS-232 Connection Procedure ..............................................................................................1-3
1.2.4 RS-422/485 Connection Procedure .......................................................................................1-6
Chapter 2 Commands and Responses
2.1 Command Transmission and GX/GP Responses ...............................................................2-1
2.1.1 General Communication ........................................................................................................2-1
2.1.2 Command Types and Functions ............................................................................................2-1
2.1.3 Command Syntax ...................................................................................................................2-1
2.1.4 GX/GP Responses .................................................................................................................2-4
2.2 List of Commands ...............................................................................................................2-5
2.2.1 Setting Commands .................................................................................................................2-5
2.2.2 Output Commands .................................................................................................................2-6
2.2.3 Operation Commands ............................................................................................................2-6
2.2.4 Communication Control Commands ......................................................................................2-7
2.2.5 Instrument Information Commands ........................................................................................2-7
2.2.6 Conditions for Executing Commands .....................................................................................2-7
2.3 Parameters ..........................................................................................................................2-8
2.3.1 Measuring Range Parameters ...............................................................................................2-8
2.3.2 Parameter Notation and Range .............................................................................................2-8
2.3.3 Specifying a Range ................................................................................................................2-8
2.4 Setting Commands ..............................................................................................................2-9
2.5 Output Commands ............................................................................................................2-44
2.6 Operation Commands .......................................................................................................2-47
2.7 Communication Control Commands .................................................................................2-51
2.8 Instrument Information Output Commands .......................................................................2-52
2.9 Responses to Commands ................................................................................................. 2-53
2.9.1 Affirmative Response (For commands other than output request commands) ....................2-53
2.9.2 Negative Response ..............................................................................................................2-53
2.9.3 Data Output Response .........................................................................................................2-54
2.9.4 Output in Response to RS-422/485 Commands ..................................................................2-56
2.10 ASCII Output Format .........................................................................................................2-57
2.10.1 Most Recent Channel Data (FData) .....................................................................................2-57
2.10.2 Most Recent (DO Channel) Status (FRelay) ........................................................................2-58
2.10.3 Internal Switch Status (FRelay) ............................................................................................2-59
2.10.4 Users Who Are Currently Logged In (FUser) ....................................................................... 2-60
2.10.5 All Users Who Are Currently Logged In (FUser) .................................................................. 2-61
2.10.6 Instrument Address (FAddr) .................................................................................................2-62
2.10.7 GX status (FStat) .................................................................................................................2-63
2.10.8 Alarm Summary (FLog) ........................................................................................................2-64
2.10.9 Message Summary (FLog) ...................................................................................................2-65
2.10.10 Event log (FLog) ...................................................................................................................2-66
2.10.11 Error Log (FLog) ...................................................................................................................2-67
2.10.12 Address Setting Log (FLog) .................................................................................................2-68
2.10.13 General Communication Log (FLog) ....................................................................................2-69
2.10.14 Modbus Communication Log (FLog) ....................................................................................2-70
2.10.15 FTP Client Log (FLog) .......................................................................................................... 2-71
2.10.16 SNTP (Time Adjustment) Client Log (FLog) .........................................................................2-72
2.10.17 E-Mail Client Log (FLog) ......................................................................................................2-73
2.10.18 Web Log (FLog) ...................................................................................................................2-74
2.10.19 External Storage Medium and Internal Memory File List (FMedia) ......................................2-75
IM 04L51B01-17EN
1
2
App
iii
Contents
Appendix
2.10.20 External Storage Medium Free Space (FMedia) ..................................................................2-75
2.10.21 Setting Data (FCnf) ..............................................................................................................2-76
2.10.22 Decimal Place and Unit Information (FChInfo) .....................................................................2-76
2.10.23 System Configuration (FSysConf) ........................................................................................2-77
2.10.24 Instrument Manufacturer (_MFG) .........................................................................................2-78
2.10.25 Instrument’s Product Name (_INF) ......................................................................................2-78
2.10.26 Instrument’s Basic Specifications (_COD) ...........................................................................2-78
2.10.27 Instrument’s Firmware Version Information (_VER) ............................................................. 2-79
2.10.28 Instrument’s Option Installation Information (_OPT) ............................................................ 2-79
2.10.29 Instrument’s Temperature Unit and Daylight Saving Time Installation Information (_TYP) .. 2-80
2.10.30 Instrument’s Error Number Information (_ERR) ...................................................................2-80
2.10.31 Instrument’s Unit Configuration Information (_UNS or _UNR) .............................................2-81
2.10.32 Instrument’s Module Configuration Information (_MDS or MDR) ......................................... 2-82
2.11 Format of the Data Block of Binary Output .......................................................................2-83
2.11.1 Most Recent Channel Data (FData) .....................................................................................2-83
2.11.2 Channel FIFO Data (FFifoCur) .............................................................................................2-86
2.11.3 FIFO Data Read Range (FFifoCur) ......................................................................................2-87
Appendix 1 ASCII Character Codes ...................................................................................................App-1
Appendix 2 Login Procedure ..............................................................................................................App-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 Name Name Meaning
JIS ITU-T RS-232
2 RD 104 BB(RXD) Received data Input signal to the GX/GP. 3 SD 103 BA(TXD) Transmitted data Output signal from the GX/GP. 5 SG 102 AB(GND) Signal ground Signal ground. 7 RS 105 CA(RTS) Request to send Handshaking signal when receiving data from the
8 CS 106 CB(CTS) Clear to send Handshaking 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.
Hand­shaking
OFF-OFF Yes Yes XON-XON XON-RS CS-RS Yes Supported. 1 Stops transmission when X-OFF is received. Resume when X-ON is received. 2 Stops sending when CS (CTS) is false. Resumes when it is true. 3 Sends X-OFF when the receive data buffer is 3/4 full. Sends X-ON when the receive data buffer
is 1/4th full.
4 Sets 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 Name Meaning
FG Frame ground of the GX/GP. SG Signal 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.
RS-422/485 Port Converter
SDA(–) TD(–) SDB(+) TD(+) RDA(–) RD(–) RDB(+) RD(+) SG SHIELD FG EARTH
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.
1-8
IM 04L51B01-17EN
1
Command name,parameter 1,parameter 2 terminator
Command name,parameter 1,parameter 2;command name,parameter1 terminator

Chapter 2 Commands and Responses

2.1 Command Transmission and GX/GP Responses

2.1.1 General Communication

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.
Type Description
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.
Example of a Command
SRangeAI,0001,VOLT,2V,OFF,-15000,18000,0;SRangeAI,0002,SKIP
Queries
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.
Command name,parameter1? terminator
Examples of Queries and Responses
Query Example of Responses
SRangeAI? SRangeAI,0001,VOLT,2V,OFF,–20000,20000,0
SRangeAI,0001? SRangeAI,0001,VOLT,2V,OFF,–20000,20000,0
SRangeAI,0002,...............................................................
..........................................................................................
Command Names
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.
Example: SRangeAI,0001,VOLT,2V,,,,terminator -> SRangeAI,0001,VOLT,
2Vterminator
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.
2-4
IM 04L51B01-17EN
1

2.2 List of Commands

2.2.1 Setting Commands

Command Setup Item (Required Options) Page Measurement Operation Setting Commands
SScan SScanGroup SModeAI SModeDI SScaleOver
Recording Basic Setting Commands Page
SMemory SDispData SEventData
Recording Channel Setting Commands Page
SRecDisp
SRecEvent SRecManual
Batch Setting Commands Page
SBatch STextField
Data Save Setting Commands Page
SDirectory SFileHead SFileName SMediaSave SFileFormat
I/O Channel (AI/DI/DO) Setting Commands Page
SRangeAI SRangeDI SRangeDO SMoveAve SBurnOut SRjc
SAlarmIO SAlmHysIO SAlmDlyIO STagIO SColorIO SZoneIO SScaleIO SBarIO SPartialIO SBandIO SAlmMarkIO SValueIO
SCalibIO
Scan interval 2-9 Scan group 2-9 AI module 2-9 DI module 2-9 Detection of values that exceed the scale
Recording mode 2-10 Display data recording 2-10 Event data recording 2-10
Channel for recording display data Channel for recording event data 2-11
Channel for recording manual sampled data
Batch function 2-11 Batch text 2-11
Name of directory to save data 2-11 File header 2-12 File naming rule 2-12 Automatic data file saving 2-12 Display/event data file format 2-12
Measurement range of AI channel 2-13 Measurement range of DI channel2-14 DO channel operation 2-14 Moving average 2-15 Behavior when a sensor burns out2-15 Reference junction compensation
method Alarm 2-15 Alarm hysteresis 2-16 Alarm delay time 2-16 Tag 2-16 Channel color 2-16 Waveform display zone 2-17 Scale display 2-17 Bar graph display 2-17 Partial expanded display 2-17 Color scale band 2-17 Alarm mark 2-18 Upper/lower limit display
characters Calibration correction 2-18
2-9
2-10
2-11
2-15
2-18
Math Channel Setting Commands Page
SMathBasic SKConst SRangeMath STlogMath SRolAveMath SAlarmMath SAlmHysMath SAlmDlyMath STagMath SColorMath SZoneMath SScaleMath SBarMath SPartialMath SBandMath SAlmMarkMath
Communication Channel Setting Commands Page
SRangeCom SValueCom SWDCom SAlarmCom SAlmHysCom SAlmDlyCom STagCom SColorCom SZoneCom SScaleCom SBarCom SPartialCom SBandCom SAlmMarkCom
Alarm Setting Commands Page
SAlmLimit SAlmSts
Time Setting Commands Page
STimer SMatchTimer
Event Action Setting Commands Page
SEventAct
Report Setting Commands Page
SReport SRepData SRepTemp SRepCh
Display Setting Commands Page
SLcd SViewAngle SBackColor SGrpChange SAutoJump SCalFormat SBarDirect
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
Rate-of-change alarm interval 2-26 Alarm display hold/nonhold 2-26
Timer 2-26 Match time timer 2-27
Event action 2-27
Report type (/MT) 2-28 Report data (/MT) 2-28 Report output (/MT) 2-29 Report channel (/MT) 2-29
LCD 2-29 View angle 2-29 Screen background color 2-30 Automatic group switching time 2-30 Jump default display operation 2-30 Calendar display format 2-30 Bar graph display direction 2-30
2
Commands and Responses
IM 04L51B01-17EN
2-5
2.2 List of Commands
SChgMonitor
STrdWave STrdScale STrdLine STrdRate STrdKind STrdPartial SMsgBasic SGroup STripLine SSclBmp
SMessage
System Setting Commands Page
STimeZone SDateBasic SDateFormat SDst SLang STemp SDPoint SFailAct
SFailSts SPrinter SLed SSound
SInstruTag SConfCmt SUsbInput
Internal Switch Setting Commands Page
SSwitch
Serial Communication Setting Commands Page
SSerialBasic
SModMaster
SModMCmd
Ethernet Communication Setting Commands Page
SIpAddress SClient SDns SDhcp SFtpKind SFtpTime SFtpCnct
SSmtpLogin SSmtpCnct
SMailHead SMailBasic SMail
SMailAlarm
Value modification from the monitor Trend waveform display 2-30
Scale 2-30 Trend line width, grid 2-31 Trend interval switching 2-31 Trend type 2-31 Partial expanded trend display 2-31 Message writing 2-31 Display group 2-31 Display group trip line 2-32 Scale bitmap image usage 2-32
Message 2-32
Time zone 2-32 Gradual time adjustment 2-32 Date format 2-32 Daylight saving time 2-33 Language 2-33 Temperature unit 2-33 Decimal point type 2-33 Fail relay (DO channel) operation
(/FL) Instrument status to output (/FL) 2-34 Printer 2-34 LED indicator operation 2-34 Sound 2-34
Instruments tag 2-34 Setting file comment 2-34 USB input device 2-34
Internal switch operation 2-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 information 2-36 Client function 2-36 DNS information 2-36 DHCP client 2-36 File to transfer via FTP 2-37 FTP transfer time shift 2-37 FTP client connection destination
server SMTP user authentication 2-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
mail type Alarm notification mail target
channels
2-30
2-33
2-35
2-35
2-35
2-37
2-37
2-38
2-38
SMailTime SSntpCnct SModClient
SModCList
SModCCmd
SServer SKeepAlive STimeOut SFtpFormat SModDelay SModLimit SModList
Security Setting Commands Page
SSecurity
SOpePass SOpeLimit SUser SUserLimit
Local Setting Commands Page
SMonitor
SMultiPattern SMultiKind
SHomeMonitor SHomeKind SFavoriteMonitor
SFavoriteKind
Scheduled transmission times 2-38 SNTP client 2-39 Modbus client operation (/MC) 2-39
Modbus client connection destination server (/MC) Modbus client transmission command (/MC) Server function 2-40
Keepalive 2-40 Communication timeout 2-40 FTP server directory output format2-40 Modbus server delay response 2-40 Modbus server connection limit 2-40 IP address to allow connection to
Modbus server
Security function 2-40 Password to unlock operation 2-41 Operation lock details 2-41 User settings 2-41 Authority of user 2-41
Monitor screen display information Multi panel division 2-42 Multi panel 2-42
Standard display information 2-42 Standard display 2-43 Favorite screen display
information Favorite screen 2-43
2-39
2-39
2-40
2-41
2-43

2.2.2 Output Commands

Command Description Page
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 data 2-44
Takes a snapshot 2-44 Outputs the user level 2-44 Outputs the IP address 2-45 Outputs the GX/GP status 2-45 Outputs the log 2-45 Outputs external storage medium
and internal memory information Outputs setting data 2-46
Outputs decimal place and unit information Queries the system configuration and reconfigures modules
2-44
2-44
2-45
2-46
2-46

2.2.3 Operation Commands

Command Description Page
OSetTime ORec
Sets the time 2-47 Starts or stops recording 2-47
2-6
IM 04L51B01-17EN
1
OAlarmAck
OExecRec
OExecSNTP OMessage OPassword OMath
OSaveConf OCommCh
OEMail
OMBRestore ORTReset OMTReset OCmdRelay
OBatName OBatComment OBatText ODispRate OLoadConf OSeriApply
OIPApply OInit
Clears alarm output (alarm acknowledgement)
Generates a manual trigger, executes manual sample, takes a snapshot, or causes a timeout Queries the time using SNTP 2-47
Writes a message 2-47 Changes the password 2-48 Starts, stops, or resets
computation or clears the computation dropout status display Saves setting data 2-48
Sets a communication channel to a value Starts or stops the e-mail transmission function
Recovers Modbus manually 2-48 Resets a relative timer 2-48 Resets the match time timer 2-49 Outputs the DO channel and internal switch status Sets a batch name 2-49 Sets a batch comment 2-49 Sets a batch text 2-49 Switches the trend interval 2-49 Loads setting data 2-50 Applies serial communication settings
Applies the IP address 2-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 Description Page
CCheckSum CSFilter CLogin CLogout ESC O
ESC C
Sets the checksum 2-51 Sets the status filter 2-51 Log in via communication 2-51 Log out via communication 2-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 Description Page
_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).
Limitation Type Invalid Command
Memory ORec Math OMath DataSave OExecRec Message OMessage Batch OBatName, OBatComment,
AlarmACK OAlarmAck Comm OEMail, OIPApply DispOpe SHomeKind, SHomeMonitor,
DateSet OExecSNTP, OSetTime ChangeSet File OLoadConf, OSaveConf,
*1 Setting commands except for SHomeKind, SHomeMonitor, SFavoriteKind, SFavoriteMonitor, Smonitor, SMultiPattern, and SMultiKind
• The command is not applicable to the model.
The following commands can be used only on certain
models.
Command Applicable Models
SViewAngle SMultiPattern SMultiKind
OBatText
SFavoriteKind, SFavoriteMonitor, Smonitor, SMultiPattern, SMultiKind, ODispRate
*1
Sxxxx
Fmedia
, OLoadConf
GX10, GP10 GX20, GP20 GX20, GP20
2
Commands and Responses
IM 04L51B01-17EN
2-7

2.3 Parameters

This section describes parameters.

2.3.1 Measuring Range Parameters

AI Channel Span
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.
Type Notation and Range of Values
AI channel DI channel DO channel
Math channel GX20/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
Type Notation 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.
Scan Interval
100ms 2CH Yes Yes Yes No
200ms 2CH Yes Yes Yes No
500ms Yes Yes Yes No 1s Yes Yes Yes Yes 2s Yes Yes Yes Yes 5s Yes Yes Yes Yes
Mode (p3)
10CH Yes No No No
10CH Yes No No No
Integration time (p4) Auto 50Hz 60Hz Common
SModeDI
DI Module
Sets the mode of a DI module.
Syntax
Query Example Set the module whose module number is 2 as
Description
• You cannot use this command to configure settings
• You cannot use this command to configure settings
• Only one module can be set to remote. If different
SModeDI,p1,p2,p3 p1
Unit number (0)
p2
Module number (0 to 9)
p3
Mode (Normal, Remote)
Normal Remote
SModeDI[,p1[,p2]]?
a remote control input module.
SModeDI,0,2,Remote
while recording is in progress.
while computation is in progress.
modules are set to remote numerous times, the last module will be the remote module.
DI input Remote control input
2
Commands and Responses
AI Module
Sets the mode and A/D integration time of an AI module.
Syntax
Query Example For the module whose module number is 2, set
Description
IM 04L51B01-17EN
SModeAI,p1,p2,p3,p4 p1
Unit number (0)
p2
Module number (0 to 9)
p3
Mode
2CH 10CH
p4
AD integration time (Auto, 50Hz, 60Hz, Common)
SModeAI[,p1[,p2]]?
the mode to 10CH and the AD integration time to Auto.
SModeAI,0,2,10CH,Auto
2 channel mode 10 channel mode
SScaleOver
Detection of Values That Exceed the Scale
Sets how to detect measurement over-range.
Syntax
Query Example Assume scale over-range when the
SSclOver,p1 /P1
How to detect values that exceed the scale
FREE
Assume scale over-range when the measurement range is exceeded.
OVER
Assume scale over-range when
SSclOver?
measurement range is exceeded.
SSclOver,FREE
±105% of the scale is exceeded.
2-9
2.4 Setting Commands
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.
• The setting specified with this command is valid if at least one module is installed.
SMemory
Recording Mode
Sets the type of data to record.
Syntax
Query Example Record display data.
Description
• You cannot use this command to configure settings
• You cannot use this command to configure settings
SMemory,p1 p1
Recording mode
D
Display data
D+E1
Display data and event data
E1
SMemory?
SMemory,D
while recording is in progress.
while computation is in progress.
Event data
SDispData
Display Data Recording
Sets the display data recording mode.
Syntax
Query Example Set the recording interval to 1 minute and file
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
• File save interval is valid when display data recording
SDispData,p1,p2 p1
Recording interval (5s, 10s, 15s, 30s, 1min, 2min, 5min, 10min, 15min, 20min, 30min, 1h, 2h, 4h, 10h)/div.
p2
File save interval (10min, 20min, 30min, 1h, 2h, 3h, 4h, 6h, 8h, 12h,1day, 2day, 3day, 5day, 7day, 14day, 31day)
SDispData?
save interval to 12 hours.
SDispData,1min,12h
while recording is in progress.
while computation is in progress.
than the scan interval.
integer multiple of the scan interval.
is enabled (recording mode of the SMemory command).
SEventData
Event Data Recording
Sets the event data recording mode.
Syntax
SEventData,p1,p2,p3,p4,p5,p6 p1
Scan group (1)
p2
Recording interval (100ms, 200ms, 500ms, 1s, 2s, 5s, 10s, 15s, 20s, 30s, 1min, 2min, 5min, 10min, 15min, 20min, 30min)
p3
Operation mode
Free
SingleTrigger
RepeatTrigger
p4
Data length (10min, 20min, 30min, 1h, 2h, 3h, 4h, 6h, 8h, 12h, 1day, 2day, 3day, 5day, 7day, 14day, 31day)
p5
Pre-trigger (0, 5, 25, 50, 75, 95, 100) [%]
p6
Trigger source key (Off, On)
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/div 100 10 s/div 200 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 ms 100 200 ms 200 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)
p8
Decimal Place (0 to 5)
p9
Scaling lower limit
p10
Scaling upper limit
p11
Unit (up to 6 characters, UTF-8)
SRangeAI,p1,p2,p3,p4,p5,p6,p7,p8,p 9,p10,p11,p12,p13 p1
Channel number
2.4 Setting Commands
p2
Input type (GS)
p3
Range (see “Description.”)
P4
Calculation type (Scale)
p5
Span lower limit
p6
Span upper limit
p7
Bias (–999999 to 999999)
p8
Decimal Place (0 to 5)
p9
Scaling lower limit
p10
Scaling upper limit
p11
Unit (up to 6 characters, UTF-8)
p12
Low-cut function (Off, On)
p13
Low-cut output (Zero, Linear)
Square Root Channels Syntax
Query Example Measure -0.5000 to 1.0000 V on channel 0002.
Description
• You cannot use this command to configure settings
• You cannot use this command to configure settings
• If p2=TC/RTD/DI, you cannot specify p4=Sqrt.
• If p2=GS, you cannot specify p4=Off/Delta.
• If p2=DI, you cannot set p7.
• RTD cannot be specified if an electromagnetic relay
• The settable items for p3 are shown below.
SRangeAI,p1,p2,p3,p4,p5,p6,p7,p8,p 9,p10,p11,p12,p13,p14 p1
Channel number
p2
Input type (Volt, GS)
p3
Range (see “Description.”)
P4
Calculation type (Sqrt)
p5
Span lower limit
p6
Span upper limit
p7
Bias (–999999 to 999999)
p8
Decimal Place (0 to 5)
p9
Scaling lower limit
p10
Scaling upper limit
p11
Unit (up to 6 characters, UTF-8)
p12
Low-cut function (Off, On)
p13
Low-cut output (Zero, Linear)
p14
Low-cut point (0 to 50)
SRangeAI[,p1]?
No scaling. No bias.
SRangeAI,0002,Volt,2V,Off,–5000, 10000,0
while recording is in progress.
while computation is in progress.
scanner type (Type suffix code: -T1) analog input module is in use.
2
Commands and Responses
IM 04L51B01-17EN
2-13
2.4 Setting Commands
p2=Volt p2=TC p2=RTD p2=GS p2=DI
20mV R Pt100 1-5V Level 60mV S Pt100-H 0.4-2V DI 200mV B JPt100 1V K JPt100-H 2V K-H Cu10GE 6V E Cu10LN 20V J Cu10WEED 50V T Cu10BAILEY
N Cu10a392 W Cu10a393 L Cu25 U Cu53 PLATINEL Cu100 PR20-40 J263B WRe3-25 Ni100SAMA KpvsAu7Fe Ni100DIN NiNiMo Ni120 WWRe26 Pt25 N14 Pt50 XK Pt200WEED
Cu10G Cu50G Cu100G Pt46G Pt100G
SRangeDI
Measurement Range of DI Channel
Sets the measurement range of a DI channel.
Unused Channels Syntax
Channels That Are Not Delta or Scaling Syntax
Delta Channels Syntax
Scaling Channels Syntax
SRangeDI,p1,p2 p1
Channel number
p2
Input type (Skip)
SRangeDI,p1,p2,p3,p4,p5,p6
p1
Channel number
p2
Input type (DI)
p3
Fixed at “-.”
P4
Calculation type (Off)
p5
Span lower limit (0 to 1)
p6
Span upper limit (0 to 1)
SRangeDI,p1,p2,p3,p4,p5,p6,p7
p1
Channel number
p2
Input type (DI)
p3
Fixed at “-.”
P4
Calculation type (Delta)
p5
Span lower limit (0 to 1)
p6
Span upper limit (0 to 1)
p7
Reference channel number
SRangeDI,p1,p2,p3,p4,p5,p6,p7,p8,p 9,p10 p1
Channel number
p2
Input type (DI)
p3
Fixed at “-.”
P4
Calculation type (Scale)
p5
Span lower limit (0 to 1)
p6
Span upper limit (0 to 1)
p7
Decimal Place (0 to 5)
p8
Scaling lower limit
p9
Scaling upper limit
p10
Unit (up to 6 characters, UTF-8)
Query
SRangeDI[,p1]?
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.”
SRangeDO,0203,Alarm,0,1,Unit,Energ ize,Or,Hold,Normal
while recording is in progress.
while computation is in progress.
parameters.
Energize the relay (DO channel) during output. De-energize the relay (DO ch a n nel) d u ring output.
SMoveAve
Moving Average
Sets the moving average of an AI channel.
Syntax
Query Example Set the number of moving average samples for
SMoveAve,p1,p2,p3 p1
Channel number
p2
Enable or disable (Off, On)
p3
Number of samples (2 to 100)
SMoveAve[,p1]?
channel 0002 to 12.
SMoveAve,0002,On,12
SBurnOut
Behavior When a Sensor Burns Out
Sets the behavior for when a burnout occurs on an AI channel.
Syntax
Query Example Set the measured result to positive overflow
SBurnOut,p1,p2 p1
Channel number
p2
Burnout processing (Off, Up, Down)
SBurnOut[,p1]?
(Up) when a burnout is detected on channel
0001.
SBurnOut,0001,Up
2.4 Setting Commands
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.
SRjc
Reference Junction Compensation Method
Sets the reference junction compensation method of an AI channel.
Syntax
Query Example Perform reference junction compensation of
Description
• You cannot use this command to configure settings
• You cannot use this command to configure settings
• If p2=Internal, p3 is invalid.
SRjc,p1,p2,p3 p1
Channel number
p2
Mode
Internal
External
p3
Compensation temperature
–200 to 800 –20.0 to 80.0°C –40 to 1760 –40 to 1760°F 2531 to 3532 253.1 to 353.2K
SRjc[,p1]?
channel 0003 using the internal compensation circuit.
SRjc,0003,Internal
Perform reference junction compensation of channel 0004 using an external compensation device. Set the compensation temperature to
-2.3°C.
SRjc,0004,External,-23
while recording is in progress.
while computation is in progress.
Use the internal compensation function. Use an external compensation device.
SAlarmIO
Alarm
Sets the alarm for AI and DI channels.
Do Not Set Alarms Syntax
Do Not Output Alarms Syntax
SAlarmIO,p1,p2,p3 p1
Channel number
p2
Alarm number (1 to 4)
p3
Alarm on or off (Off)
SAlarmIO,p1,p2,p3,p4,p5,p6,p7 p1
Channel number
p2
Alarm number (1 to 4)
p3
Alarm on or off (On)
P4
Alarm type (H, L, DH, DL, RH, RL, TH, TL)
p5
Value
p6
Detection (Off, On)
2
Commands and Responses
IM 04L51B01-17EN
2-15
2.4 Setting Commands
p7
Output (Off)
Output Alarms Syntax
SAlarmIO,p1,p2,p3,p4,p5,p6,p7,p8
p1
Channel number
p2
Alarm number (1 to 4)
p3
Alarm on or off (On)
P4
Alarm type (H, L, DH, DL, RH, RL, TH, TL)
p5
Value
p6
Detection (Off, On)
p7
Output DO Output to a relay (DO
channel)
SW Output to an internal switch
p8
Number If p7=DO R e l a y ( D O c h a nn el )
number
If p7=SW Interna l sw i tch number
(001 to 100)
Query
SAlarmIO[,p1[,p2]]?
Example Set a high limit alarm (H) on alarm number 2 of
channel 0001. Set the alarm value to 1.8000V. Use the alarm detection function. When an alarm occurs, output to the relay (DO channel) at number 0205.
SAlarmIO,0001,2,On,H,18000,On,DO, 0205
Description
• You cannot set this on a “Skip” channel.
• If p3=Off, you cannot set p4 or subsequent parameters.
• If p7=Off, you cannot set p8.
• For the alarm values of p5, use the values in the following table.
Channel Type
AI channel
DI channel (1) Within the measurement range (2) –5% to 105% of the scale but within –999999 to
(3) 1 digit to (measurement upper limit – measurement
(4) 1 digit to (scale upper limit – scale lower limit) but
(5) Within the difference measurement range
Input Type
Volt, GS, TC, RTD DI Off
DI
999999 excluding the decimal point
lower limit)
within 1 to 999999 excluding the decimal point
Calculation Type
Off Delta Scale Sqrt
Delta Scale
Same as the DI input of AI channels
Alarm Type H, L, TH, TL
(1) (3) (1) (3) (5) (2) (2) (4) 0, 1 1 (1) (3) (5) (2) (4)
RH, RL DH, DL
• You cannot set DO channels or internal switches whose output type is set to Manual as output destination numbers.
SAlmHysIO
Alarm Hysteresis
Sets the alarm hysteresis for AI and DI channels.
Syntax
SAlmHysIO,p1,p2,p3 p1
Channel number
p2
Alarm number (1 to 4)
p3
Hysteresis
Alarm Type Hysteresis Range
H, L, DH, DL 0.0% to 5.0% of the span
or scale width
Query
SAlmHysIO[,p1[,p2]]?
Example Set a 0.5% hysteresis on alarm 3 of channel
0002.
SAlmHysIO,0002,3,5
Description
Hysteresis specified for delay high and low limit
alarms (TH and TL) and high and low limits on rate-of­change alarms (RH and RL) do not apply.
SAlmDlyIO
Alarm Delay Time
Sets the alarm delay time for an AI or DI channel.
Syntax
Query
SAlmDlyIO,p1,p2,p3,p4 p1
Channel number
p2
Hour (0 to 24)
p3
Minute (0 to 59)
P4
Second (0 to 59)
SAlmDlyIO[,p1]?
Example Set the channel 0001 alarm delay time to 2
minutes 30 seconds.
SAlmDlyIO,0001,0,2,30
Description
• Set the delay time so that it is an integer multiple of the scan interval (SScan command).
STagIO
Tag
Sets a tag to an AI, DI, or DO channel.
Syntax
Query
STagIO,p1,p2,p3 p1
Channel number
p2
Tag (up to 32 characters, UTF-8)
p3
Tag number (up to 16 characters, ASCII)
STagIO[,p1]?
Example Set the channel 0001 tag to “SYSTEM1” and
the tag number to “TI002.”
STagIO,0001,’SYSTEM1’,’TI002’
SColorIO
Channel Color
Sets the color an AI, DI, or DO channel.
Syntax
Query Example Set the channel 0001 display color to red.
SColorIO,p1,p2,p3,p4 p1
Channel number
p2
R value of RGB display colors (0 to 255, see “Description.”)
p3
G value of RGB display colors (0 to 255, see “Description.”)
P4
B value of RGB display colors (0 to 255, see “Description.”)
SColorIO[,p1]?
SColorIO,0001,255,0,0
2-16
IM 04L51B01-17EN
Loading...
+ 80 hidden pages