Professional Documents
Culture Documents
User's Manual
Select Your Hardware Component Hardware Installation Guide I/O Module introduction System Configuration Guide Plan Your Application Program
Copyright Notice This document is copyrighted, 2002, by Advantech Co., Ltd. All rights are reserved. Advantech Co., Ltd., reserves the right to make improvements to the products described in this manual at any time without notice. No part of this manual may be reproduced, copied, translated or transmitted in any form or by any means without the prior written permission of Advantech Co., Ltd. Information provided in this manual is intended to be accurate and reliable. However, Advantech Co., Ltd. assumes no responsibility for its use, nor for any infringements upon the rights of third parties which may result from its use. Acknowledgments IBM and PC are trademarks of International Business Machines Corporation.
Product Warranty Advantech warrants to you, the original purchaser, that each of its products will be free from defects in materials and workmanship for two year from the date of purchase. This warranty does not apply to any product which have been repaired or altered by other than repair personnel authorized by Advantech, or which have been subject to misuse, abuse, accident or improper installation. Advantech assumes no liability as a consequence of such events under the terms of this Warranty. Because of Advantechs high quality-control standards and rigorous testing, most of our customers never need to use our repair service. If an Advantech product ever does prove defective, it will be repaired or replaced at no charge during the warranty period. For out-of-warranty repairs, you will be billed according to the cost of replacement materials, service time and freight. Please consult your dealer for more details. If you think you have a defective product, follow these steps: 1. Collect all the information about the problem encountered (e.g. type of PC, CPU speed, Advantech products used, other hardware and software used etc.). Note anything abnormal and list any on-screen messages you get when the problem occurs. 2. Call your dealer and describe the problem. Please have your manual, product, and any helpful information readily available. 3. If your product is diagnosed as defective, you have to request an RAM number. When requesting an RMA (Return Material Authorization) number, please access ADVANTECH's RMA web site: http://www.advantech.com.tw/rma. If the web sever is shut down, please contact our office directly. You should fill in the "Problem Repair Form", describing in detail the application environment, configuration, and problems encountered. Note that error descriptions such as "does not work" and "failure" are so general that we are then required to apply our internal standard repair process. 4. Carefully pack the defective product, a completely filled-out Repair and Replacement Order Card and a photocopy of dated proof of purchase (such as your sales receipt) in a shippable container. A product returned without dated proof of purchase is not eligible for warranty service. 5. Write the RMA number visibly on the outside of the package and ship it prepaid to your dealer.
Technical Support We want you to get the maximum performance from your products. So if you run into technical difficulties, we are here to help. For most frequently asked questions you can easily find answers in your product documentation. Moreover, there are a huge database about trouble-shooting and knowledge Base as technical reference on our website. These answers are normally a lot more detailed than the ones we can give over the phone. So please consult this manual or the web site first. If you still cannot find the answer, gather all the information or questions that apply to your problem and, with the product close at hand, call your dealer. Our dealers are well trained and ready to give you the support you need to get the most from your Advantech products. In fact, most problems reported are minor and are able to be easily solved over the phone. In addition, free technical support is available from Advantech engineers every business day. We are always ready to give advice on application requirements or specific information on the installation and operation of any of our products. Website information: You can access the most current support on our website: http://www.advantech.com Then click the title of Service & Support for further product information.
Manual Organization
This Manual has six chapters, three appendices. The following table lists each chapter or appendices with its corresponding title and a brief overview of the topics covered in it.
Chapter / Appendix
Title
Topics Covered Introduces the suitable applying industries and the position in an Ethernet remote system. Summarize the features and the common specification of ADAM-6000. Explains the functions of the LED indicators. Provides a briefly selection chart and specification table of ADAM-6000 I/O modules for users to organize their system easily. Give a direction to calculate system capacity and select a certain power supply. Recommend a standard for communication cable and connector. Lists the necessary components and proper environment in installing process. Describes the Hardware dimension and the way to place or mount it. Explains the rule of mapping I/O address. Describes the wiring and connecting detail for ADAM-6000. Introduces the detail specifications, functions and application wiring of each ADAM-6000 I/O modules. Guides users to use Windows Utility for network & security setting, I/O range configuration, accuracy calibration, command setting, and so on.
4 5
Demonstrate the standard web page operation and the customization web page development. Introduces the Planning Your Application Program functions and structure of DLL drivers and command sets. Explain how to integrate these programming tools to plan your application program. Design Worksheets Data Formats and I/O Range Grounding Reference Provides organized worksheets for users to establish system configuration document in order. Provides detail information about Data formats and I/O Range of Analog Module. Explains the concepts about field grounding and shielding.
A B C
How to use this manual The following flow chart demonstrates a thought process that you can use when you plan your ADAM-6000 Ethernet Data Acquisition and Control System.
Chapter 1
Understanding Your System
Using this Chapter If you want to read about Introduction Major Feature Technical Specification LED Status of ADAM-6000 I/O Modules Go to page 1-2 1-3 1-5 1-7
1-1 Introduction ADAM-6000, Ethernet-based data acquisition and control module, provides I/O, data acquisition and networking in one module to build a cost-effective, distributed monitoring, and control solutions for a wide variety of industries and applications. Through de-factor standard Ethernet networking, ADAM-6000 retrieves I/O values from sensors and publishes these real-time I/O value to networking nodes at local area network or Intranet, Internet. With Ethernet-enabled technology, ADAM-6000 series modules build up a cost-effective DA&C system for Building Automation, environmental monitoring, facility management and eManufacturing applications. Please refer to Figure 1-1 to have a brief view of ADAM-6000 system architecture.
1-2-4 Embedded web built web page for remote monitoring and diagnose
Each ADAM-6000 module features a pre-built I/O module web page to display real-time I/O data value, alarm and module status thru LAN or Internet. Just Internet browser, users can easily monitor real-time I/O data value and alarm no matter local site or remote site. Then, the web-enabled monitoring system is completed immediately without any programming effort.
1-4 Dimensions
The following diagrams show the dimensions of the ADAM-6000 l/O module in millimeters.
Chapter 2
Selecting Your Hardware Components
Using this Chapter If you want to read about Selecting I/O Module Selecting Link Terminal & Cable (Ethernet) Selecting Operator Interface Go to page 2-2 2-3 2-4
Choose this type of I/O module: Discrete input module and block I/O module
For these types of field devices or operations (examples): Selector switches, pushbuttons, photoelectric eyes, limit switches, circuit breakers, proximity switches, level switches, motor starter contacts, relay contacts, thumbwheel switches Alarms, control relays, fans, lights, horns, valves, motor starters, solenoids Thermocouple signals, RTD signals, temperature transducers, pressure transducers, load cell transducers, humidity transducers, flow transducers, potentiometers. Analog valves, actuators, chart recorders, electric motor drives, analog meters
Explanation:
Discrete output module and block I/O module Analog input module
Output module signals interface with ON/OFF or OPENED/CLOSED devices. Convert continuous analog signals into input values for host device
Interpret host devices output to analog signals (generally through transducers) for field devices.
PIN NUMBER 1 2 3 4 5 6 7 8
SIGNAL RD+ RDTD+ (Not Used) (Not Used) TD(Not Used) (Not Used)
If you want to read the real-time status of ADAM-6000 modules through the web page from anywhere without any engineering effort, there are many Internet browser software: Internet Explorer, Netscape, and other browser with JAVA Machine
If you want to develop your own web pages in the ADAM-6000 modules, the JAVA Script will be the quick and easy programming tool to design a specific operator interface. J2EE Development Kit
If you want to integrate ADAM-6000 I/O with HMI (Human Machine Interface) software in a SCADA (Supervisory Control and Data Acquisition) system, there are a lot of HMI software packages, which support Modbus/TCP driver. Advantech Studio Wonderware InTouch Intellution Fix of i-Fix Any other software support Modbus/TCP protocol
Moreover, Advantech also provides OPC Server, the most easy-to-use data exchange tool in worldwide. Any HMI software designed with OPC Client would be able to access ADAM-6000 I/O modules. Modbus/TCP OPC Server
If you want to develop your own application, the DLL driver and ActiveX will be the best tools to build up users operator interface. ADAM-6000 DLL driver ADAM-6000 ActiveX
With these ready-to-go application software packages, tasks such as remote data acquisition, process control, historical trending and data analysis require only a few keystrokes.
Chapter 3
Hardware Installation Guide
Using this Chapter If you want to read about Determining the proper environment Module Mounting Wiring and Connection Go to page 3-2 3-3 3-7
10 or 100 Mbps Ethernet Hub (at least 2 ports) Two Ethernet Cable with RJ-45 connector Power supply for ADAM-6000 (+10 to +30 V unregulated)
3-2 Mounting
The ADAM-6000 modules designed with compact size and allowed to install in the field site as following methods.
Chapter 4
I/O Module Introduction
Using this Chapter If you want to read about Analog Input Module Digital Input / Output Module Go to page 4-2 4-7
ADAM-6017
ADAM-6017 Specification
Analog Input:
Effective resolution: 16-bit Channels: 8 differential lnput type: mV, V, mA lnput range: 150 mV, 500 mV, 1 V, 5 V, 10 V, 0-20 mA, 4-20 mA Isolation voltage: 3000 VDC Fault and overvoltage protection: Withstands overvoltage up to 35 V Sampling rate: 10 samples/sec. Input impedance: 20 M ohm Bandwidth: 13.1 Hz @ 50 Hz, 15.72 Hz @ 60 Hz Accuracy: 0.1% or better Zero drift: 6 V/ C Span drift: 25 ppm/ C CMR @ 50/60 Hz: 92 dB min.
Digital Output:
Channel: 2 Open Collector to 30 V 200 mA max. load Optical Isolation: 5000VRMS
Application Wiring
ADAM-6050
ADAM-6050 Specification
Analog Input:
Channel: 18 I/O type: 12 DI & 6 DO Digital Input: Dry Contact: Logic level 0: Close to GND Logic level 1: Open (Logic level status can be inversed by Utility) Digital Output: Open Collector to 30 V 200 mA max. load Optical Isolation: 5000VRMS Power Consumption: 2 W (Typical)
Application Wiring
All Digital Input channels in ADAM-6050 are allowed to use as 32-bit counters (Each counter is consisted of two addresses, Low word and High word). Users could configure the specific DI channels to be counters via Windows Utility. The I/O address will be mapped as Figures 4-10.
ADAM-6051
ADAM-6051 Specification
Channel: 16 I/O type: 12DI / 2DO / 2Counter Digital Input: Dry Contact: Logic level 0: Close to GND Logic level 1: Open (Logic level status can be inversed by Utility) Digital Output: Open Collector to 30 V 200 mA max. load Optical Isolation: 5000VRMS Counter: Maximum Count: 4,294,967,285(32 bit) Input frequency: 0.3 ~ 1000 Hz max. (frequency mode) 5000 Hz max. (counter mode) Isolation voltage: 2500 VRMS Mode: Counter (Up/Down, Bi-direction), Frequency Power Consumption: 2 W (Typical)
Application Wiring
All Digital Input channels in ADAM-6051 are allowed to use as 32-bit counters (Each counter is consisted of two addresses, Low word and High word). Users could configure the specific DI channels to be counters via Windows Utility. The I/O address will be mapped as Figures 4-15.
ADAM-6060
ADAM-6060 Specification
Channel: 12 I/O type: 6 Relay & 6 DI Relay Output (Form A): Contact rating: AC: 120 V @ 0.5 A DC: 30 V @ 1 A Breakdown voltage: 500 VAC (50/60 Hz) Relay on time: 7 msec; Relay off time: 3 msec. Total switching time: 10 msec. Insulation resistance: 1000 MW minimum at 500 VDC Digital Input: Dry Contact: Logic level 0: Close to GND Logic level 1: Open (Logic level status can be inversed by Utility) Optical Isolation: 5000VRMS Power Consumption: 2 W (Typical)
Application Wiring
All Digital Input channels in ADAM-6060 are allowed to use as 32-bit counters (Each counter is consisted of two addresses, Low word and High word). Users could configure the specific DI channels to be counters via Windows Utility. The I/O address will be mapped as Figures 4-20.
Chapter 5
System Configuration Guide
Using this Chapter If you want to read about System Hardware Configuration Install Utility Software I/O Module Configuration I/O Module Calibration Security Setting Technical Emulation Go to page 5-2 5-3 5-10 5-17 5-18 5-19
This chapter explains how to use ADAM Ethernet I/O Utility to configure the ADAM-6000 modules for various applications. Users can learn the hardware connection, software installation, communication setting and every procedure for system configuration from these sections.
System Requirement Host computer IBM PC compatible computer with 486 CPU (Pentium is recommended) Microsoft 95/98/2000/NT 4.0 (SP3 or SP4) or higher versions At least 32 MB RAM 20 MB of hard disk space available VGA color monitor 2x or higher speed CD-ROM Mouse or other pointing devices 10 or 100 Mbps Ethernet Card
10 or 100 Mbps Ethernet Hub (at least 2 ports) Two Ethernet Cable with RJ-45 connector Power supply for ADAM-6000 (+10 to +30 V unregulated)
Make sure to prepare all of the items above, then connect the power and network wiring as figure 5-1.
Notes: This Utility would be able to support ADAM-5000/TCP and ADAM-6000 I/O modules.
Function Menu
Item File contents Exit Function, using to exit this Utility program.
Item Tool contents functions as below: Add Remote Ethernet Device Create a new ADAM-6000 module or ADAM-5000/TCP located in other Ethernet domination, both available to local LAN and Internet application. Search for Ethernet Device Search all ADAM-6000 and ADAM-5000/TCP units in the specific Ethernet domination. (The same with host PCs Ethernet domination) Refresh a Ethernet Device Refresh the specific ADAM-6000 or ADAM-5000/TCP unit to verify the system status.
Terminal Call up the operation screen of Terminal emulation to do the request / response command execution.
Item Setup contents Timeout and Scan Rate setting functions. Please be aware of the time setting for other Ethernet domination usually longer than local network.
Item Help contents on-line help function as users operation guide; the item About contents information about software version, released date, and support modules.
Tool Bar There are five push buttons in the tool bar.
See Figure 5-4, there are also Host PCs information in the status display area, include host name and IP address. Moreover, the Windows Utility provides network connection test tool for user to verify whether the communication is workable. Key-in the specific IP address you want to connect and click the PING button, the testing result will show as Figure 5-5.
Step1. Choose any one station, all I/O modules plugged in the main unit will be listed on the
tree-structure display area. Mean while, the Device Name and Device Description are editable by operators needs.
Step2. Click the Network Tab to configure the TCP/IP network setting
If you want to configure the ADAM-6000 and ADAM-5000/TCP in the host PCs dominating network, only the IP address and Subnet Mask will need to set (The host PC and ADAM Ethernet I/O must belong to same subnet Mask). If you want to configure the ADAM-6000 and ADAM-5000/TCP via Internet or other network domination, you have to ask your network administrator to obtain a specific IP and Gateway addresses, then configure each ADAM-6000 and ADAM-5000/TCP with the individual setting.
Select item Tool\Add Remote Ethernet I/O in function menu or click the
screen will pop up as Figure 5-8. Then key-in the specific IP address and click the Add button. If the communication success, the added ADAM Ethernet I/O unit should appeal on the tree-structure display area.
In addition to monitor the current DI/DO status, the Windows Utility offers a graphical operating interface as figure 5-10. You can read the Digital input status through the change of the indicator icons. Oppositely, you can write the digital output status through clicking the indicator icons.
With intelligent design concept, the digital input channels support counter and signal latch functions. Click the specific channel, there will be four working modes for choosing.
The digital output channels support pulse output and delay output functions. Click the specific channel, there will be four working modes for choosing.
Before acquiring the current data of an analog input module, you have to select the input range and integration time. Then the input data will be scaled as the specified range with engineer unit.
To provide users more valuable information, the ADAM-6000 analog modules have designed with calculation functions, includes Maximum, Minimum, and Average values of individual channels. Click the Maximum value tab, you will see the historical maximum values in each channel unless to press the against Reset buttons.
Moreover, all of the analog channels are allowed to configure the High/Low limitation for alarm trigger function. Once the value of the specific channel over or under the limitation, the alarm status could trigger a digital output channel in the ADM-6017.
Zero Calibration
1. Apply power to the module and let it warm up for 30 minutes. 2. Make sure the module is correctly installed and properly configured for the input range you want to calibrate. 3. Use a precision voltage source to apply a calibration voltage to the V+ and V- terminals of the ADAM-6017 module. 4. Click the Execute button.
For example, select ASCII mode and key-in the ASCII command $01M (read module name), then click Send. The response will show as figure 5-24.
http://java.sun.com/docs/books/tutorial/.
To write an applet that is capable of processing ADAM-6060 input data in a very short time, we provide you with a class which includes all necessary methods. The kernel functions/methods to communicate with our product and display the current, updated status has been fine-tuned for any signal it can process. Four major methods are developed for the purpose, listed in table 1.
boolean ForceCoil(int CoilAddr, boolean IsTrunOn) This method is used for digital output of module channels. The parameter CoilAddr is integer data type and the coil address of the channel. IsTrueOn is the parameter used to indicate ON or OFF. If the method is successful, it will return true. boolean ReadCoil(int StartingAddr, int NoOfPoint, byte ModBusRTU[]) This method is used for digital input of module channels. The parameter StartingAddr is the starting address of desired channel. NoOfPoint is to indicate how many desired channels to be monitored. Both of the parameters are of integer data type. The third parameter, ModBusRTU is an array with data type of byte, which is used to carry digital inputs of the desired channels. The default size is 128.
Table 1. Useful Methods to Communicate ADAM-6000 I/O Series Modules for Digital I/O and Analog I/O
Employing these four methods, you can customize your applet and focus solely on the user interface you intend to create and the number of channels you want to monitor.
An Example
To process ADAM-6060 input and display the result/status on an applet, we will use objects from the standard java class library and the class we develop. Specifically, we provide Modbus class to handle the communication with ADAM-6000 I/O modules. Now were going to teach you step by step how to customize your Web page.
<HTML> <HEAD> <TITLE> ADAM-6000 Ethernet-Enabled DA&C Modules </TITLE> </HEAD> <BODY> <APPLET CODEBASE = "." CODE = "Adam6060.class" ARCHIVE = "Adam6060.jar" NAME = "Adam6060 Relay Module" WIDTH = 500 HEIGHT = 400 HSPACE =0 VSPACE =0 ALIGN = middle > <PARAM NAME = "HostIP" VALUE = "010.000.000.000"> </APPLET> </BODY> </HTML> Table 2. Overview of index.html
Firstly, the HTML file must be named index.html. The name of parameter in <APPLET> cannot change. The lines CODE = "Adam6060.class" and ARCHIVE = "Adam6060.jar" indicate where the class and jar files (your Java Applet program) are for ADAM-6060 module. WIDTH and HEIGHT are parameters to set the visible screen size of your Java Applet Web page. The HTML is a good template for you to create your own embedded Web page; however, the parameter names and most of their values cannot be modified, or it will not work. You can only change the value of WIDTH and HEIGHT parameters, e.g. WIDTH = 640 and HEIGHT = 480. However, you must change the value of CODE and ARCHIVE when you try to write it for another module, say ADAM-6017, and thus you should use Adam6017.class and Adam6017.jar instead of Adam6060.class and Adam6060.jar.
Some Instructions When Writing Java Applet for ADAM-6000 I/O Series
To enable your java applet to communicate with ADAM-6000 I/O modules, you have to include the following code in the very beginning of your program:
import Adam.ModBus.*;
In constructor it is suggested to add the following fragment in your exception handler: Try { HostIP = getParameter("HostIP"); Adam6060Connection = new ModBus(HostIP); if (HostIP == "") labAdamStatusForDIO.setText("Get Host IP is null !!"); else labAdamStatusForDIO.setText("Get Host IP :" + Adam6060Connection.GetHostIP() + " Ver 1.00");
The fragment is used to obtain the host IP value and check if it is null. To acquire the necessary parameter information from the index.html, you need to add the fragment below.
public String[][] getParameterInfo() { String[][] pinfo = { {"HostIP", "String", ""}, }; return pinfo; }
As for mouse/keyboard events and graphical user interface, they are beyond the scope of our discussion here and we will leave them to users.
After you finish your program and compile, it should generate a couple of classes, e.g. ADAM6060.class, ADAM6060$1.class, ADAM6060$2, and myFramPanel.class in our example. Then, follow the standard way to combine the generated classes with ModBus.class which must be placed in the directory path Adam/ModBus/ into a jar file. In this case, the name for the file should be ADAM6060.jar. The figure below shows the structure to make the jar file.
Start your ADAM utility, and open the tab Firmware/Web as shown below. Then, tell the utility where the path is for the JAR and HTML files. In this case, they are ADAM-6060.jar and index.html. Push
button, and a confirmation window pops up. After you confirm, it will start processing.
public class Adam6060 extends Applet { boolean isStandalone = false; String var0; Thread AdamPoilThread; String HostIP; long ErrCnt = 0; boolean IsAdamRuning = false; ModBus Adam6060Connection;
myFramPanel palStatus = new myFramPanel(2); myFramPanel pal1 = new myFramPanel(3); myFramPanel pal2 = new myFramPanel(3); myFramPanel palAdamStatus = new myFramPanel(1);
Label labStartAddress = new Label("Start Address:"); TextField txtStartAddress = new TextField("1"); Label labCount = new Label("No. of coils to read(Max 128):"); TextField txtCount = new TextField("1"); Button btAdam6060 = new Button("Read Coils"); TextArea txtMsg = new TextArea("", 1, 10, 1);
/**Get a parameter value*/ public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) :
/**Constructor*/ public Adam6060() { } /**Applet Initialization*/ public void init() { try { HostIP = getParameter("HostIP"); //create ADAM-6060
Adam6060Connection = new ModBus(HostIP); module object if (HostIP == "") //check the Host IP
labAdamStatusForDIO.setText("Get Host IP is null !!"); else labAdamStatusForDIO.setText("Get Adam6060Connection.GetHostIP() + " Ver 1.00"); Host IP :" +
palStatus.setBackground(Color.lightGray); palAdamStatus.setBackground(Color.lightGray);
palStatus.setBounds(new Rectangle(42, 50, 409, 15 *2 + 0 * 2 + 77 + 152 + 33 )); pal1.setBounds(new Rectangle(12, 15 , 385, 77)); pal2.setBounds(new Rectangle(12, 15 + 77 + 0 , 385, 152)); palAdamStatus.setBounds(new Rectangle(12, 15 + 77 + 0 * 2 + 152, 385,
33));
palStatus.setLayout(null); pal1.setLayout(null); pal1.add(labStartAddress, null); pal1.add(txtStartAddress, null); pal1.add(labCount, null); pal1.add(txtCount, null); pal1.add(btAdam6060, null);
labStartAddress.setBounds(new Rectangle(20, 15, 85, 20)); txtStartAddress.setBounds(new Rectangle(205, 15, 60, 20)); labCount.setBounds(new Rectangle(20, 40, 180, 20)); txtCount.setBounds(new Rectangle(205, 40, 60, 20)); btAdam6060.setBounds(new Rectangle(275, 40, 80, 22));
btAdam6060.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(MouseEvent e) { int i, j; long lAddress, lCount; //mouse event handling
if (Adam6060Connection.ReadCoil((int)Long.parseLong(txtStartAddress.getT ext()), (int)Long.parseLong(txtCount.getText()), ModBusRTU)) { lAddress = Long.parseLong(txtStartAddress.getText()); for( i = 0; i < Long.parseLong(txtCount.getText()); i++) { txtMsg.append("Address:" + String.valueOf(lAddress) + " -> " + String.valueOf((int)ModBusRTU[i]) + "\n"); lAddress++; } } else { try {
Label1.setFont(new java.awt.Font("DialogInput", 3, 26)); Label1.setForeground(Color.blue); Label1.setText("ADAM-6060 DIO Module"); Label1.setBounds(new Rectangle(83, 17, 326, 29)); this.add(Label1, null); this.add(palStatus, null); palStatus.add(pal1, null); palStatus.add(pal2, null);
palStatus.add(palAdamStatus, null);
/**Applet Information Acquisition*/ public String getAppletInfo() { return "Applet Information"; } /**Get parameter info*/ public String[][] getParameterInfo() { String[][] pinfo = { {"HostIP", "String", ""}, }; return pinfo;
/**Main method: for the purpose of laying out the screen in local PC*/
public static void main(String[] args) { Adam6060 applet = new Adam6060(); applet.isStandalone = true; Frame frame; frame = new Frame() { protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); } } public synchronized void setTitle(String title) { super.setTitle(title); enableEvents(AWTEvent.WINDOW_EVENT_MASK); } }; frame.setTitle("Applet Frame"); frame.add(applet, BorderLayout.CENTER); applet.init(); applet.start(); frame.setSize(500,620); Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); frame.setLocation((d.width - frame.getSize().width) / 2, (d.height - frame.getSize().height) / 2); frame.setVisible(true); }
public myFramPanel(int myType, String Msg, int msgTextLength) { //super(); panelType = myType; if (Msg != "") { labMassage.setText(Msg); this.setLayout(null); labMassage.setBounds(new Rectangle(20, 3, msgTextLength, 15)); this.add(labMassage); } }
g.setColor(Color.darkGray); g.drawLine(size.width - 1, 0, size.width - 1, size.height 1); g.drawLine(0, size.height - 1, size.width - 1, size.height - 1);g.setColor(Color.black);
g.setColor(Color.black); g.drawRect(off, off, size.width - 2 - off * 2, size.height - 2 - off * 2); } else if (panelType == 2) g.setColor(Color.white); g.drawRect(0, 0, size.width - 1, size.height - 1); {
g.drawLine(size.width - 1, 0, size.width - 1, size.height 1); g.drawLine(0, size.height - 1, size.width - 1, size.height - 1);g.setColor(Color.black); } else if (panelType == 3) { int off;
g.setColor(Color.darkGray); g.drawLine(size.width - 1, 0, size.width - 1, size.height 1); g.drawLine(0, size.height - 1, size.width - 1, size.height - 1);
Chapter 6
Planning Your Application Program
Using this Chapter If you want to read about DLL Driver Command Structure Modbus Function Code Introduction Apply with ASCII Command - System Command Set - Analog Input Command Set - Analog Input Alarm Command Set - Digital I/O Command Set Go to page 6-2 6-23 6-24 6-29 6-35 6-39 6-56 6-66
6-1 Introduction
After completing the system configuration, you can begin to plan the application program. This chapter introduces two programming tools for users to execute system data acquisition and control. The DLL drivers and command sets provide a friendly interface between your applications and ADAM-6000 I/O modules.
6-2-1 Index
There are eight function libraries common used by ADAM-6000 and ADAM-5000/TCP list as follow: ADAMTCP_Connect ADAMTCP_Disconnection ADAMTCP_GetDLLVersion ADAMTCP_ReadReg ADAMTCP_WriteReg ADAMTCP_ReadCoil ADAMTCP_WriteCoil ADAMTCP_SendReceive5KTCPCmd
In addition, Advantech offers more function libraries especially for various ADAM-6000 applications. ADAMTCP_SendReceive6KTCPCmd ADAMTCP_Read6KDIO ADAMTCP_Write6KDO ADAMTCP_Read6KAI ADAMTCP_Read6KDIOMode ADAMTCP_Write6KDIOMode ADAMTCP_Read6KSignalWidth ADAMTCP_Write6KsignalWidth ADAMTCP_Read6KCounter ADAMTCP_Clear6KCounter ADAMTCP_Start6KCounter ADAMTCP_Stop6KCounter ADAMTCP_Clear6KDILatch
Syntax: int ADAMTCP_Connect(int socket_type, char *szIP, unsigned short port, SOCKET *conn_socket, int iConnectionTimeout, int iSendTimeout, int iReceiveTimeout);
Parameter: socket_type[in]: szIP[in]: port[in]: conn_socket[out]: iConnectionTimeout[in]: iSendTimeout[in]: iReceiveTimeout[in]: to specify the connection type that is UDP or TCP. the IP address for ADAM-6000 that to be connected. the connection port the handle that represent a socket the specified timeout interval for connecting to the ADAM-6000 the specified timeout interval for sending a command to the ADAM-6000 the specified timeout interval for receiving response from the ADAM-6000
Return: Please refer to Chapter 6-2-3 Return Codes for more detail information
ADAMTCP_Disconnect
Description: Disconnect the Windows Sockets connection of the specified ADAM-6000 I/O module.
Parameter: void
Return: Please refer to Chapter 6-2-3 Return Codes for more detail information
ADAMTCP_GetDLLVersion
Description: Read the version of ADAM-6000 DLL driver
Parameter: void
ADAMTCP_ReadReg
Description: Read the holding register value at a specified range described in parameters.
Syntax: int ADAMTCP_ReadReg(SOCKET conn_socket, WORD wStartAddress, WORD wCount, WORD wData[ ])
Parameter: conn_socket[in]: wStartAddress[in]: wCount[in]: wData[out]: the handle that represent the connection socket the starting address that to be read how many holdings register to be read a unsigned 16 bits array that stored the read holding register
Return: Please refer to Chapter 6-2-3 Return Codes for more detail information
Example: // Read input registers demo program //--- In this demo program, reading 16 register starting at register 0(address 1) //--- The IP address for ADAM-6000 module is 172.16.2.200 in this demo program. //--- Change the IP Address to match your ADAM-6000 module
#include <windows.h> #include <winsock2.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include "adv5ktcp.h" #define DEFAULT_PORT 502
SOCKET conn_socket; int WORD WORD WORD char line[80]; iRetVal,iVersion; wStartAddress=1; wCount=16; wData[16];
printf("In this demo, the IP Address of 6000 module is assumed as 172.16.2.200\n"); printf("Please make sure the IP Address for your 6000 module is 172.16.2.200 (Y/N)? "); gets(line); if( toupper( line[0])!='Y' ) return 0;
//--- Firstly, try to create a connection to ADAM-6000 --//--- Please change the following IP address to match your ADAM-6000 module --iRetVal=ADAMTCP_Connect(SOCK_STREAM,"172.16.2.200",502,&conn_socket, iConnectionTimeout, iSendTimeout, iReceiveTimeout);
//--- reading input register --iRetVal=ADAMTCP_ReadReg(conn_socket, wStartAddress, wCount,wData); if( iRetVal ) { printf("ADAMTCP_ReadReg() Fail !!! ADAMTCP_Disconnect(); exit(0); } code=%d\n",iRetVal);
//--- Lastly, disconnection to 6000 I/O Modules --ADAMTCP_Disconnect(); printf("ADAMTCP_Discennect() successful !\n"); }
ADAMTCP_WriteReg
Description: Write the holding register value at a specified range described in parameters.
Syntax: int ADAMTCP_WriteReg(SOCKET conn_socket, WORD wStartAddress, WORD wCount, WORD wData[ ])
Parameter: conn_socket[in]: wStartAddress[in]: wCount[in]: wData[out]: the handle that represent the connection socket the starting address that to be read how many holdings register to be read a unsigned 16 bits array that stored the value write to holding value
Return: Please refer to Chapter 6-2-3 Return Codes for more detail information
ADAMTCP_ReadCoil
Description: Read the coils value at a specified range described in parameters.
Syntax: int ADAMTCP_ReadCoil(SOCKET conn_socket, WORD wStartAddress, WORD wCount, BYTE byData[ ])
Parameter: conn_socket[in]: wStartAddress[in]: wCount[in]: byData[out]: the handle that represent the connection socket the starting address that to be read how many coils to be read a 8 bit array that stored the read coil
Return: Please refer to Chapter 6-2-3 Return Codes for more detail information
ADAMTCP_WriteCoil
Description: Write the coils value at a specified range described in parameters.
Syntax: int ADAMTCP_WriteCoil(SOCKET conn_socket, WORD wStartAddress, WORD wCount, BYTE byData[ ])
Parameter: conn_socket[in]: wStartAddress[in]: wCount[in]: byData[out]: the handle that represent the connection socket the starting address that to be read how many coils to be read a 8-bit array that stored the read coil
Return: Please refer to Chapter 6-2-3 Return Codes for more detail information
ADAMTCP_SendReceive5KTCPCmd
Description: This function is just for user's convenience, accepting the ASCII format string as a command. Then transform it to meet the Modbus/TCP specification.
Syntax: int ADAMTCP_SendReceive5KTCPCmd(SOCKET conn_socket, char szSendToTCP[ ], char szReceiveFromTCP[ ], char szModbusSend[ ], char szModbusReceive[ ])
Parameter: conn_socket[in]: szSendToTCP[in]: szReceiveFromTCP[out]: szModbusSend[out]: szModbusReceive[out]: the handle that represent the connection socket the ASCII format string that send to a ADAM-6000 module the ASCII format string that response from a ADAM-6000 module the Modbus/TCP format string that send to a ADAM-6000 module the Modbus/TCP format string that response from a ADAM-6000 module
Return: Please refer to Chapter 6-2-3 Return Codes for more detail information
ADAMTCP_SendReceive6KTCPCmd
Description: This function is specific for 6000 series. It accepts the command in ASCII format string. Then transform it to follow the Modbus/TCP communication protocol.
Syntax: int ADAMTCP_SendReceive6KTCPCmd(char szIP[], char szSendToTCP[], char szReceiveFromTCP[] char szModbusSend[], char szModbusReceive[])
Parameter: szIP[in]: szSendToTCP[in]: szReceiveFromTCP[out]: szModbusSend[out]: szModbusReceive[out]: the IP Address of the target ADAM-6000 module to be connected. the ASCII format string that send to the ADAM-6000. the ASCII format string that response from the ADAM-6000. the Modbus/TCP format string that send to the ADAM-6000. the Modbus/TCP format string that response from the ADAM-6000.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information
ADAMTCP_Read6KDIO
Description: To read the DI/DO status in the specific ADAM-6000 module.
Syntax: int ADAMTCP_Read6KDIO(char szIP[], WORD wModule, WORD wIDAddr, BYTE byDI[], BYTE byDO[])
Parameter: szIP[in]: wModule[in]: the IP Address of the target ADAM-6000 module to be connected. the module name of the ADAM-6000 module to be connected. (For example, 6050, 6051, or 6060) wIDAddr[in]: byDI[out]: byDO[out]: the Modbus device ID for an ADAM-6000 module. (Always 1) an 8-bit array that stored the DI status of the specific ADAM-6000. an 8-bit array that stored the DO status of the specific ADAM-6000.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Write6KDO
Description: Set D/O status to an specific ADAM-6000 module.
Syntax: int CALLBACK ADAMTCP_Write6KDO(char szIP[], WORD wModule, WORD wIDAddr, WORD wStartDO, WORD wCount, BYTE byDO[])
Parameter: szIP[in]: wModule[in]: the IP Address of the target ADAM-6000 module to be connected. the module name of the ADAM-6000 module to be connected. (For example, 6050, 6051, or 6060) wIDAddr[in]: wStartDO[in]: wCount[in]: byDO[out]: the Modbus device ID for an ADAM-6000 module. (Always 1) the starting channel to be written. the total channels to be written. an 8-bit array that stored the DO status of the specific ADAM-6000.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Read6KAI
Description: To read analog input channel's value for an ADAM-6000 module.
Syntax: int ADAMTCP_Read6KAI(char szIP[], WORD wModule, WORD wIDAddr, WORD wGain[], WORD wHex[], double dlValue[])
Parameter: szIP[in]: wModule[in]: the IP Address of the target ADAM-6000 module to be connected. the module name of the ADAM-6000 module to be connected. (For example, 6050, 6051, or 6060) wIDAddr[in]: wGain[in]: the Modbus device ID for an ADAM-6000 module. (Always 1) the range code against analog input range for individual channels stored in this array. wHex[out]: dlValue[out]: an unsigned 16-bit array that stored the value reading from AI channels. an array that stored the values in engineer unit format that reading from AI channels.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Read6KDIOMode
Description: To read the working mode of each DI/O channels in a specific ADAM-6000 module.
Syntax: int ADAMTCP_Read6KDIOMode(char szIP[], WORD wModule, WORD wIDAddr, BYTE byDIMode[], BYTE byDOMode[])
Parameter: szIP[in]: wModule[in]: the IP Address of the target ADAM-6000 module to be connected. the module name of the ADAM-6000 module to be connected. (For example, 6050, 6051, or 6060) wIDAddr[in]: byDIMode[out]: the Modbus device ID for an ADAM-6000 module. (Always 1) an 8-bit array that stored DI channels working modes which represent in numeric format as follows: 0: this channel is in 'DI' mode 1: this channel is in 'Counter' mode 2: this channel is in 'Lo to Hi latch' mode 3: this channel is in 'Hi to Lo latch' mode byDOMode[out]: an 8-bits array that stored DO channels working modes which represent in numeric format as follows: 0: this channel is in 'DO' mode 1: this channel is in 'Pulse Output' mode 2: this channel is in 'Lo to Hi Delay' mode 3: this channel is in 'Hi to Lo Delay' mode
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Write6KDIOMode
Description: To set the working modes for each DI/O channels in a specific ADAM-6000 module.
Syntax: int ADAMTCP_Wirte6KDIOMode(char szIP[], WORD wModule, WORD wIDAddr, BYTE byDIMode[], BYTE byDOMode[])
Parameter: szIP[in]: wModule[in]: the IP Address of the target ADAM-6000 module to be connected. the module name of the ADAM-6000 module to be connected. (For example, 6050, 6051, or 6060) wIDAddr[in]: byDIMode[in]: the Modbus device ID for an ADAM-6000 module. (Always 1) an 8-bit array that stored DI channels working modes which represent in numeric format as follows: 0: this channel is in 'DI' mode 1: this channel is in 'Counter' mode 2: this channel is in 'Lo to Hi latch' mode 3: this channel is in 'Hi to Lo latch' mode byDOMode[in]: an 8-bit array that stored D/O channels working modes which represent in numeric format as follows: 0: this channel is in 'DO' mode 1: this channel is in 'Pulse Output' mode 2: this channel is in 'Lo to Hi Delay' mode 3: this channel is in 'Hi to Lo Delay' mode
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Read6KSignalWidth
Description: To read the minimal high/low signal width of each D/I channel in a specific ADAM-6000 module.
Syntax: int ADAMTCP_Read6KSignalWidth(char szIP[], WORD wModule, WORD wIDAddr, unsigned long ulLoWidth[], unsigned long ulHiWidth[])
Parameter: szIP[in]: wModule[in]: the IP Address of the target ADAM-6000 module to be connected. the module name of the ADAM-6000 module to be connected. (For example, 6050, 6051, or 6060) wIDAddr[in]: ulLoWidth[out]: the Modbus device ID for an ADAM-6000 module. (Always 1) an unsigned 32-bit array that stored the minimal low signal width of each DI channel. The unit is 0.1 msec. ulHiWidth[out]: an unsigned 32-bit array that stored the minimal high signal width of each DI channel. The unit is 0.1 msec.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Write6KSignalWidth
Description: To set the minimal high/low signal width of each DI channel in a specific ADAM-6000 module.
Syntax: int ADAMTCP_Write6KSignalWidth(char szIP[], WORD wModule, WORD wIDAddr, unsigned long ulLoWidth[], unsigned long ulHiWidth[])
Parameter: szIP[in]: wModule[in]: the IP Address of the target ADAM-6000 module to be connected. the module name of the ADAM-6000 module to be connected. (For example, 6050, 6051, or 6060) wIDAddr[in]: ulLoWidth[out]: the Modbus device ID for an ADAM-6000 module. (Always 1) an unsigned 32-bit array that stored the minimal low signal width of each DI channel. The unit is 0.1 msec. ulHiWidth[out]: an unsigned 32-bit array that stored the minimal high signal width of each DI channel. The unit is 0.1 msec.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Read6KCounter
Description: To read the counter value when a DI channel configured in 'Counter' mode.
Syntax: int ADAMTCP_Read6KCounter(char szIP[], WORD wModule, WORD wIDAddr, unsigned long ulCounterValue[]);
Parameter: szIP[in]: wModule[in]: the IP Address of the target ADAM-6000 module to be connected. the module name of the ADAM-6000 module to be connected. (For example, 6050, 6051, or 6060) wIDAddr[in]: ulCounterValue[out]: the Modbus device ID for an ADAM-6000 module. (Always 1) an unsigned 32-bit array that stored the counter value of each DI channel.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Clear6KCounter
Description: To clear the counter value when a DI channel configured in 'Counter' mode.
Syntax: int ADAMTCP_Clear6KCounter(char szIP[], WORD wIDAdd, WORD wChIndex, WORD wData)
Parameter: szIP[in]: wIDAddr[in]: wChIndex[in]: wData[in]: the IP Address of the target ADAM-6000 module to be connected. the Modbus device ID for an ADAM-6000 module. (Always 1) the specific DI channel need to be cleared the counter value. always 1.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Start6KCounter
Description: Start counting when a DI channel configured as 'Counter' mode.
Parameter: szIP[in]: wIDAddr[in]: wChIndex[in]: the IP Address of the target ADAM-6000 module to be connected. the Modbus device ID for an ADAM-6000 module. (Always 1) the specific DI channel need to start or stop counting.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Stop6KCounter
Description: Stop counting when a DI channel configured as 'Counter' mode.
Parameter: szIP[in]: wIDAddr[in]: wChIndex[in]: the IP Address of the target ADAM-6000 module to be connected. the Modbus device ID for an ADAM-6000 module. (Always 1) the specific DI channel need to start or stop counting.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAMTCP_Clear6KDILatch
Description: To clear the latch when a DI channel configured as 'Lo to Hi Latch' or 'Hi to Lo Latch'.
Parameter: szIP[in]: wIDAddr[in]: wChIndex[in]: the IP Address of the target ADAM-6000 module to be connected. the Modbus device ID for an ADAM-6000 module. (Always 1) the specific DI channel need to be cleared the latch status.
Return: Please refer to Chapter 6-2-3 "Return Codes" for more detail information.
ADAM5KTCP_NoError ADAM5KTCP_StartupFailure ADAM5KTCP_SocketFailure ADAM5KTCP_UdpSocketFailure ADAM5KTCP_SetTimeoutFailure ADAM5KTCP_SendFailure ADAM5KTCP_ReceiveFailure ADAM5KTCP_ExceedMaxFailure ADAM5KTCP_CreateWsaEventFailure ADAM5KTCP_ReadStreamDataFailure ADAM5KTCP_InvalidIP ADAM5KTCP_ThisIPNotConnected ADAM5KTCP_AlarmInfoEmpty ADAM5KTCP_NotSupportModule ADAM5KTCP_ExceedDONo ADAM5KTCP_InvalidRange
(0) (-1) (-2) (-3) (-4) (-5) (-6) (-7) (-8) (-9) (-10) (-11) (-12) (-13) (-14) (-15)
Example: If you want to read the first two values of ADAM-6017 (address: 40001~40002), the request command should be:
Code (Hex) 01 02 03 04 05 06 08 15 16
Name Usage Read Coil Status Read Discrete Output Bit Read Input Status Read Discrete Input Bit Read Holding Registers Read 16-bit register. Used to read integer or floating point process data. Read Input Registers Force Single Coil Write data to force coil ON/OFF Preset Single Register Write data in 16-bit integer format Loopback Diagnosis Diagnostic testing of the communication port Force Multiple Coils Write multiple data to force coil ON/OFF Preset Multiple Registers Write multiple data in 16-bit integer format Table 6-1 Response Comment Structure
Function Code 01
The function code 01 is used to read the discrete outputs ON/OFF status of ADAM-6000 modules in a binary data format. Request message format for function code 01:
Command Body Station Function Start Address Start Address Requested Number Requested Number Address Code High Byte Low Byte of Coil High Byte of Coil Low Byte
Example: Read coil number 1 to 8 (address number 00017 to 00024) from ADAM-6000 Modules 01 01 00 17 00 08
Byte Count
Data
Data
Example: Coils number 2 and 7 are on, all others are off.
Function Code 02
The function code 02 is used to read the discrete inputs ON/OFF status of ADAM-6000 in a binary data format. Request message format for function code 02:
Command Body Station Function Start Address Start Address Requested Number Requested Number Address Code High Byte Low Byte of Input High Byte of Input Low Byte
Example: Read coil number 1 to 8 (address number 00001 to 00008) from ADAM-6000 modules 01 01 00 01 00 08
Byte Count
Data
Data
Example: input number 2 and 3 are on, all others are off.
Command Body Station Function Start Address Start Address Requested Number Requested Number Address Code High Byte Low Byte of Register High Byte of Register Low Byte
Example: Read Analog inputs #1 and #2 in addresses 40001 to 40002 as floating point value from ADAM-6017 module 01 04 00 01 00 02
Command Body Station Function Address Code Byte Count Data Data
Example: Analog input #1 and #2 as floating point values where AI#1=100.0 and AI#2=55.32 01 04 08 42 C8 00 00 47 AE 42 5D
Function Code 05
Force a single coil to either ON or OFF. The requested ON/OFF state is specified by a constant in the query data field. A value of FF 00 hex requests it to be ON. A value of 00 00 hex requests it to be OFF. And a value of FF FF hex requests it to release the force. Request message format for function code 05:
Command Body Station Function Coil Address Address Code High Byte
01 05 00 03 FF 00
Response message format for function code 05: The normal response is an echo of the query, returned after the coil state has been forced.
Command Body Station Function Coil Address Address Code High Byte
Function Code 06
Presets integer value into a single register. Request message format for function code 06:
Command Body Station Function Register Address Register Address Preset Data Preset Data Address Code High Byte Low Byte High Byte Low Byte
Example: Preset register 40002 to 00 04 hex in ADAM-6000 module 01 06 00 02 00 04
Response message format for function code 06: The normal response is an echo of the query, returned after the coil state has been preset.
Command Body Station Function Register Address Register Address Preset Data Preset Data Address Code High Byte Low Byte High Byte Low Byte
Function Code 08
Echoes received query message. Message can be any length up to half the length of the data buffer minus 8 bytes. Request message format for function code 08:
Command Body Station Function Any data, length limited to approximately half the Address Code length of the data buffer
Example: 01 08 00 02 00 04
Command Body
Station Function Start Address Start Address Requested Number Requested Number Byte Force Data Force Data Address Code High Byte Low Byte of Coil High Byte of Coil Low Byte Count High Byte Low Byte
Example: Request to force a series of 10 coils starting at address 00017 (11 hex) in ADAM-6000 module. 01 0F 00 11 00 0A 02 CD 01 The query data contents are two bytes: CD 01 hex, equal to 1100 1101 0000 0001 binary. The binary bits are mapped to the addresses in the following way. Bit: 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1 26 25
Address (000XX): 24 23 22 21 20 19 18 17
Response message format for function code 08: The normal responses return the station address, function code, start address, and requested number of coil forced.
Command Body Station Function Start Address Start Address Requested Number Requested Number Address Code High Byte Low Byte of Coil High Byte of Coil Low Byte
Example: 01 0F 00 11 00 0A
Command Body
Station Function Start Address Start Address Address Code High Byte Low Byte
01 10 00 09 00 02 04 42 C8 00 00
Requested Number Requested Number Byte Data of Register High Byte of Register Low Byte Count
Response message format for function code 08: The normal responses return the station address, function code, start address, and requested number of registers preset.
Command Body Station Function Start Address Start Address Requested Number Requested Number Address Code High Byte Low Byte of Register High Byte of Register Low Byte
Example: 01 10 00 09 00 02
TCP Format Modbus Format ASCII Command Figure 6-3 ASCII Command Structure in ADAM-6000
6-4-1 Syntax of ASCII
Command Syntax: [delimiter character][address][slot][channel][command][data][checksum][carriage return] Every command begins with a delimiter character. There are two valid characters: $ and # The delimiter character is followed by a two-character address (hex-decimal) that specifies the target system. The two characters following the address specified the module and channel.
Depending on the command, an optional data segment may follow the command string. An optional twocharacter checksum may also be appended to the command string. Every command is terminated with a carriage return (cr).
The command set is divided into the following three categories: System Command Set Analog Input Command Set Analog Input Alarm Command Set Digital I/O Modules Command Set Every command set category starts with a command summary of the particular type of module, followed by datasheets that give detailed information about individual commands. Although commands in different subsections sometime share the same format, the effect they have on a certain module can be completely different than that of another. Therefore, the full command sets for each type of modules are listed along with a description of the effect the command has on the given module.
#aa
Command Name Description Set Integration Time Sets the integration time for a specified module Get Integration Time Get the integration time from a specified module Set Input Range Set the input range to the specified channel in the analog input module Read Input Range Read the input range of the specified channel in the analog input module Read Analog Input Return the input value from the from Channel N specified channel in the analog input module Read Analog Input Return the input values from all from all channels channels of the specified analog input module Span Calibration Calibrate the analog input module to correct the gain error Offset Calibration Calibrate the analog input module to correct the offset error Read Channels Status Asks a specified input module to return the status of all channels Enable/Disable Enables/Disables multiplexing multiplexing simultaneously for separate channels of the specified input module
#aaMH #aaMHn #aaML #aaMLn $aaEmm $aaE #aaDnd $aaCjAhs $aaCjAh $aaCjAhEs $aaCjCh $aaCjAhCCn
Read the maximum data from all channels in the specified module Read single Max. Read the maximum date from a Data specified channel in the module Read all Min. Data Read the minimum data from all channels in the specified module Read single Min. Read the minimum data from a Data specified channel in the module Enable/Disable Enables/Disables the specified Channels to Average channels for data average function Read Ave. Channels Identify which channels are included in average function Set Digital Output Set the status of the specified digital output in the ADAM-6017 module Set Alarm Mode Set the High/Low alarm in either Momentary or Latching mode Read Alarm Mode Returns the alarm mode for the specified channels Enable/Disable AlarmEnables/Disables the high/low alarm of the specified channels Clear Latch Alarm Resets a latched alarm Connects the High/Low alarm of a specified input channel to interlock with a specified output channel Read Alarm Returns the alarm configuration of a Connection specified input channel Set Alarm Limit Set the High/Low alarm limit value to a specified channel Read Alarm Limit Returns the High/Low alarm limit value of the specified channel Read Alarm Status Reads whether an alarm occurred in the specified channel Read Firmware Return the firmware version code Version from the specified ADAM-6000 module. Read Module Name Return the module name from the specified module Set Alarm Connection
$aaM
$aa5
$aaF
$aaM
Command Name Description Configuration Sets the integration time for a specified module Read Channels Status Asks a specified input module to return the status of all channels Write Digital Output Writes specified values to either a single channel or all channels simultaneously Reset Status Indicates whether a specified digital I/O module was reset after the last time the $aa5 command was issued Read Firmware Return the firmware version code Version from the specified ADAM-6000 module. Read Module Name Return the module name from the specified module
$aa5
$aaF
$aaM
Command Name Description Configuration Sets the integration time for a specified module Read Channels Status Asks a specified input module to return the status of all channels Write Digital Output Writes specified values to either a single channel or all channels simultaneously Reset Status Indicates whether a specified digital I/O module was reset after the last time the $aa5 command was issued Read Firmware Return the firmware version code Version from the specified ADAM-6000 module. Read Module Name Return the module name from the specified module
$aa5
$aaF
$aaM
Command Name Description Configuration Sets the integration time for a specified module Read Channels Status Asks a specified input module to return the status of all channels Write Digital Output Writes specified values to either a single channel or all channels simultaneously Reset Status Indicates whether a specified digital I/O module was reset after the last time the $aa5 command was issued Read Firmware Return the firmware version code Version from the specified ADAM-6000 module. Read Module Name Return the module name from the specified module
$aaAff
Name Description Syntax Set Integration Time Sets an integration time to a specified ADAM-6000 module. $aaAff(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module you want to configure. (Always 01) A is I/O module configuration command. ff represents the integration time. 50 60 means 50ms (Operation Under 60 Hz power) means 60ms (Operation Under 50 Hz power)
Response
!aa(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh)
Example
command: $01A50(cr) response: !01(cr) The ADAM-6000 module at address 01h is configured to an integration time 50ms (60Hz). The response indicates that the command has been received.
Note: An analog input module requires a maximum of 7 seconds to perform auto calibration and ranging after it is reconfigured. During this time span, the module cannot be addressed to perform any other actions.
$aaB
Name Description Syntax Read Integration Time Setting Read the integration time setting of a specified ADAM-6000 module. $aaB(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module you want to configure. (Always 01) B is I/O module configuration reading command. 51 60 means 50ms (Operation Under 60 Hz power) means 60ms (Operation Under 50 Hz power)
Response
!aaff(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal address of an ADAM-6000 module. ff represents the integration time. 50 60 means 50ms (Operation Under 60 Hz power) means 60ms (Operation Under 50 Hz power)
Example
command: $01B(cr) response: !0150(cr) The ADAM-6000 module at address 01h is configured to an integration time 50ms (60Hz).
$aaM
Name Description Syntax Read Module Name Returns the module name from a specified ADAM-6000 module. $aaM(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module you want to interrogate. (Always 01) M is the Module Name command. (cr) is the terminating character, carriage return (0Dh).
Response
!aa60bb(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error, communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was in-valid. aa (range 00-FF) represents the 2-character hexadecimal address of an ADAM-6000 module. bb (range 00-FF) represents the 2-character model number of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh).
Example
command: $01M(cr) response: !0150(cr) The command requests the system at address 01h to send its module name. The system at address 01h responds with module name 6050 indicating that there is an ADAM-6050 at address 01h.
$aaF
Name Description Syntax Read Firmware Version Returns the firmware version code from a specified ADAM-6000 module. $aaF(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module you want to interrogate. (Always 01) F is the Firmware Version command. (cr) is the terminating character, carriage return (0Dh).
Response
!aa(version)(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error, communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal address of an ADAM-6000 module. (version) represents the firmware version of the ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh).
Example
command: $01F(cr) response: !01A1.01(cr) The command requests the system at address 01h to send its firmware version. The system responds with firmware version A1.01.
#aa
Command Name Description Set Input Range Set the input range to the specified channel in the analog input module Read Input Range Read the input range of the specified channel in the analog input module Read Analog Input Return the input value from the from Channel N specified channel in the analog input module Read Analog Input Return the input values from all from all channels channels of the specified analog input module Span Calibration Calibrate the analog input module to correct the gain error Offset Calibration Calibrate the analog input module to correct the offset error Read Channels Status Asks a specified input module to return the status of all channels Enable/Disable Enables/Disables multiplexing multiplexing simultaneously for separate channels of the specified input module Read all Max. Data Read the maximum data from all channels in the specified module Read single Max. Read the maximum date from a Data specified channel in the module Read all Min. Data Read the minimum data from all channels in the specified module Read single Min. Read the minimum data from a Data specified channel in the module Enable/Disable Enables/Disables the specified Channels to Average channels for data average function Read Ave. Channels Identify which channels are included in average function Set Digital Output Set the status of the specified digital output in the ADAM-6017 module
$aaAnntt
Name Description
Set Input Range Sets the input range for a specified channel of a specified analog input module.
Syntax
$aaAnntt $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module you want to configure. (Always 01) A represents the set input range command. nn (range 00-07) represents the specific channel you want to set the input range. tt (range 0x07-0x0D) represents the 2-character code of the input type. (Refer to the table below) (cr) is the terminating character, carriage return (0Dh).
Signal Type and Range Against Code 4 ~ 20mA 07 -10V ~ 10V 08 0V ~ 5V 09 -1V ~ 1V 0A 0mV ~ 500mV 0B -100mV ~ 100mV 0C 0 ~ 20mA 0D Table 6-4 ADAM-6017 Analog Input Range mapping Table
Response
?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh).
Example
command: $01A0107(cr) response: !01(cr) Channel 1 of the ADAM-6017 module at address 01h is set to the input range 4-20 mA. The response indicates that the command has been received as a valid command.
$aaBnn
Name Description
Read Input Range Returns the input range for a specified channel of a specified analog input module.
Syntax
$aaBnn $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module you want to interrogate. (Always 01) B represents the read input range command. nn (range 00-07) represents the specific channel you want to read the input range. (cr) is the terminating character, carriage return (0Dh).
Response
!aatt(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. tt (range 0x07-0x0D) represents the 2-character code of the input type. (Refer to the Table 6-4) (cr) is the terminating character, carriage return (0Dh).
Example
command: $01B01(cr) response: !0107(cr) Channel 1 of the ADAM-6017 module at address 01h responds with an input range 4-20 mA.
$aan
Name Description
Read Analog Input from Channel N Returns the input data from a specified channel in a specified analog input module.
Syntax
$aan $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module you want to interrogate. (Always 01) n (range 0-8) represents the specific channel you want to read the input data. (cr) is the terminating character, carriage return (0Dh).
Response
>(data)(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. (cr) is the terminating character, carriage return (0Dh).
Example
command: $012(cr) response: >+10.000 Channel 2 of the ADAM-6017 module at address 01h responds with an input value +10.000.
$aa
Read Analog Input from All Channels Returns the input data from all channels in a specified analog input module. $aa $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module you want to interrogate. (Always 01) (cr) is the terminating character, carriage return (0Dh).
Response
>(data)(data)(data)(data)(data)(data)(data)(data)(data)(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. (cr) is the terminating character, carriage return (0Dh).
Note: The latest data returned is the Average value of the preset channels in this module.
Example
$aa0
Span Calibration Calibrates a specified analog input module to correct for gain errors $aa0(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module which is to be calibrated. (Always 01) 0 represents the span calibration command. (cr) is the terminating character, carriage return (0Dh)
Response
!aa(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh)
$aa1
Zero Calibration Calibrates a specified analog input module to correct for offset errors $aa1(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module which is to be calibrated. (Always 01) 1 represents the zero calibration command. (cr) is the terminating character, carriage return (0Dh)
Response
!aa(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh)
Note: In order to successfully calibrate an analog input module's input range, a proper calibration input signal should be connected to the analog input module before and during the calibration process.
$aa6
Read Channels Status Asks a specified input module to return the status of all channels $aa6(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module you want to interrogate. (Always 01) 6 is the read channels status command. (cr) is the terminating character, carriage return (0Dh)
Response
!aamm(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. mm are two hexadecimal values. Each value is interpreted as 4 bits. The first 4-bit value represents the status of channels 4-7, the second 4 bits represents the status of channels 0-3. A value of 0 means the channel is disabled, while a value of 1 means the channel is enabled. (cr) is the terminating character, carriage return (0Dh)
Example
command: $016(cr) response: !01FF(cr) The command asks the analog input module in slot 1 of the system at address 01h to send the status of its input channels. The analog input module responds that all its multiplex channels are enabling (FF equals 1111 and 1111).
$aa5mm
Name Description
Enable/Disable Channels for multiplexing Enables/Disables multiplexing for separate channels of the specified input module
Syntax
$aa5mm(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module. (Always 01) 5 identifies the enable/disable channels command. mm (range 00-FF) are two hexadecimal characters. Each character is interpreted as 4 bits. The first 4-bit value represents the status of channels 4-7; the second 4-bit value represents the status of channels 0-3. A value of 0 means the channel is disabled, while a value of 1 means the channel is enabled. (cr) is the terminating character, carriage return (0Dh)
Response
!aa(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh)
Example
command: $01581(cr) response: !01(cr) The command enables/disables channels of the analog input module at address 01h. Hexadecimal 8 equals binary 1000, which enables channel 7 and disables channels 4, 5 and 6. Hexadecimal 1 equals binary 0001, which enables channel 0 and disables channels 1, 2 and 3.
#aaMH
Name Description
Read Maximum Value Read the Maximum values from all channels in a specified analog input module
Syntax
$aaMH(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module to be read. (Always 01) MH represents the read maximum value command. (cr) is the terminating character, carriage return (0Dh)
Response
>(data)(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh)
Example
Note: The latest data returned is the Average value of the preset channels in this module.
#aaMHn
Name Description
Read Maximum Value from channel N Read the Maximum values from a specific channel in a specified analog input module
Syntax
$aaMHn(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module to be read. (Always 01) MH represents the read maximum value command. n (range 0-8) represents the specific channel you want to read the input data. Note: The latest data returned is the Average value of the preset channels in this module. (cr) is the terminating character, carriage return (0Dh)
Response
>(data)(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh)
Example
#aaML
Name Description
Read Minimum Value Read the Minimum values from all channels in a specified analog input module
Syntax
$aaML(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module to be read. (Always 01) ML represents the read minimum value command. (cr) is the terminating character, carriage return (0Dh)
Response
>(data)(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh)
Example
Note: The latest data returned is the Average value of the preset channels in this module.
#aaMLn
Name Description
Read Minimum Value from channel N Read the Minimum values from a specific channel in a specified analog input module
Syntax
$aaMLn(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module to be read. (Always 01) ML represents the read minimum value command. n (range 0-8) represents the specific channel you want to read the input data. Note: The latest data returned is the Average value of the preset channels in this module. (cr) is the terminating character, carriage return (0Dh)
Response
>(data)(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh)
Example
#aaEmm
Name Description
Enable/Disable Channels for Average Enables/Disables the specific channels in the analog input module for the average function.
Syntax
$aaEmm(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module to be read. (Always 01) E represents the enable/disable channel for average command. mm (range 00-FF) are two hexadecimal characters. Each character is interpreted as 4 bits. The first 4-bit value represents the status of channels 4-7; the second 4-bit value represents the status of channels 0-3. A value of 0 means the channel is disabled, while a value of 1 means the channel is enabled. (cr) is the terminating character, carriage return (0Dh)
Response
!aa(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh)
Example
command: $01E03(cr) response: !01 The command enables/disables channels for average function in the analog input module at address 01h. Hexadecimal 03 equals binary 00000011, which enables channel 0, 1 and disables the rest of other channels.
#aaE
Name Description
Read the Average Enable/Disable Status Read the average enable/disable status of all channels in the specific analog input module.
Syntax
$aaE(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module to be read. (Always 01) E represents the enable/disable channel for average command. (cr) is the terminating character, carriage return (0Dh)
Response
!aamm(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. mm (range 00-FF) are two hexadecimal characters. Each character is interpreted as 4 bits. The first 4-bit value represents the status of channels 4-7; the second 4-bit value represents the status of channels 0-3. A value of 0 means the channel is disabled, while a value of 1 means the channel is enabled. (cr) is the terminating character, carriage return (0Dh)
Example
command: $01E(cr) response: !0103 The command set ON status to the channel 0 in the analog input module at address 01h.
#aaDnd
Set Digital Output Set the digital output status in ADAM-6000 analog input module. $aaDnd(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of the ADAM-6000 module to be read. (Always 01) D represents the digital output setting command. n (range 0-1) represents the specific channel you want to set the output status. d (range 0-1) represents the status you want to set to the specific channel (cr) is the terminating character, carriage return (0Dh)
Response
!aa(cr) if the command is valid. ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (cr) is the terminating character, carriage return (0Dh)
Example
command: $01D01(cr) response: !01 The command set ON status to the channel 0 in the analog input module at address 01h.
Set the High/Low alarm in either Momentary or Latching mode Read Alarm Mode Returns the alarm mode for the specified channels Enable/Disable AlarmEnables/Disables the high/low alarm of the specified channels Clear Latch Alarm Resets a latched alarm Set Alarm Connection Read Alarm Connection Set Alarm Limit Read Alarm Limit Read Alarm Status Connects the High/Low alarm of a specified input channel to interlock with a specified output channel Returns the alarm configuration of a specified input channel Set the High/Low alarm limit value to a specified channel Returns the High/Low alarm limit value of the specified channel Reads whether an alarm occurred in the specified channel
$aaCjAhs
Name Description
Set Alarm Mode Sets the High/Low alarm of the specified input channel in the addressed ADAM-6000 module to either Latching or Momentary mode.
Syntax
$aaCjAhs(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of an ADAM-6000 module. (Always 01) Cj identifies the desired channel j (j : 0 to 7). A is the Set Alarm Mode command. h indicates alarm types (H = High alarm, L = Low alarm) s indicates alarm modes (M = Momentary mode, L = Latching mode) (cr) represents terminating character, carriage return (0Dh)
Response
!aa(cr) if the command was valid ?aa(cr) if an invalid operation was entered. There is no response if the system detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. aa represents the 2-character hexadecimal address of the corresponding ADAM-6000 module. (cr) represents terminating character, carriage return (0Dh)
Example
command: $01C1AHL(cr) response: !01(cr) Channel 1 of the ADAM-6000 module at address 01h is instructed to set its High alarm in Latching mode. The module confirms that the command has been received.
$aaCjAh
Name Description
Read Alarm Mode Returns the alarm mode for the specified channel in the specified ADAM-6000 module.
Syntax
$aaCjAh(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of an ADAM-6000 module. (Always 01) Cj identifies the desired channel j (j : 0 to 7). A is the Read Alarm Mode command. h indicates the alarm types (H = High alarm, L = Low alarm) (cr) represents terminating character, carriage return (0Dh)
Response
!aas(cr) if the command was valid ?aa(cr) if an invalid operation was entered. There is no response if the system detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. aa represents the 2-character hexadecimal address of the corresponding ADAM-6000 module. s indicates alarm modes (M = Momentary mode, L = Latching mode) (cr) represents terminating character, carriage return (0Dh)
Example
command: $01C1AL(cr) response: !01M(cr) Channel 1 of the ADAM-6000 module at address 01h is instructed to return its Low alarm mode. The system responds that it is in Momentary mode.
$aaCjAhEs
Name Description
Enable/Disable Alarm Enables/Disables the High/Low alarm of the specified input channel in the addressed ADAM-6000 module
Syntax
$aaCjAhEs(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of an ADAM-6000 module. (Always 01) Cj identifies the desired channel j (j : 0 to 7). AhEs is the Set Alarm Mode command. h indicates alarm type (H = High alarm, L = Low alarm) s indicates alarm enable/disable (E = Enable, D = Disable) (cr) represents terminating character, carriage return (0Dh)
Response
!aa(cr) if the command was valid ?aa(cr) if an invalid operation was entered. There is no response if the system detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. aa represents the 2-character hexadecimal address of the corresponding ADAM-6000 module. (cr) represents terminating character, carriage return (0Dh)
Example
Channel 1 of the ADAM-6000 module at address 01h is instructed to enable its Low alarm function.
The module confirms that its Low alarm function has been enabled.
Note:
An analog input module requires a maximum of 2 seconds after it receives an Enable/Disable Alarm command to let the setting take effect. During this interval, the module cannot be addressed to perform any other actions.
$aaCjCh
Name Description
Clear Latch Alarm Sets the High/Low alarm to OFF (no alarm) for the specified input channel in the addressed ADAM-6000 module
Syntax
$aaCjCh(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of an ADAM-6000 module. (Always 01) Cj identifies the desired channel j (j : 0 to 7). Ch is the Clear Latch Alarm command. h indicates alarm type (H = High alarm, L = Low alarm) (cr) represents terminating character, carriage return (0Dh)
Response
!aa(cr) if the command was valid ?aa(cr) if an invalid operation was entered. There is no response if the system detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. aa represents the 2-character hexadecimal Modbus network address of the corresponding ADAM-6000 module. (cr) represents terminating character, carriage return (0Dh)
Example
command: $01C1CL(cr) response: !01(cr) Channel 1 of the ADAM-6000 module at address 01h is instructed to set its Low alarm state to OFF. The system confirms it has done so accordingly.
$aaCjAhCCn
Name Description
Set Alarm Connection Connects the High/Low alarm of the specified input channel to interlock the specified digital output in the addressed ADAM-6000 module
Syntax
$aaCjAhCCn(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of an ADAM-6000/TCP module. (Always 01) Cj identifies the desired analog input channel j (j : 0 to 7). AhC is the Set Alarm Connection command. h indicates alarm type (H = High alarm, L = Low alarm) Cn identifies the desired digital output channel n (n : 0 to 1). To disconnect the digital output, n should be set as *. (cr) represents terminating character, carriage return (0Dh)
Response
!aa(cr) if the command was valid ?aa(cr) if an invalid operation was entered.
There is no response if the system detects a syntax error or communication error or if the specified address does not exist.
! delimiter character indicating a valid command was received. aa represents the 2-character hexadecimal Modbus network address of the corresponding ADAM-6000 module. (cr) represents terminating character, carriage return (0Dh)
Example
command: $01C1ALCC0(cr) response: !01(cr) Channel 1 of the ADAM-6000 module at address 01h is instructed to connect its Low alarm to the digital output of channel 0 in the specific ADAM-6000 module. The system confirms it has done so accordingly.
$aaCjRhC
Name Description
Read Alarm Connection Returns the High/Low alarm limit output connection of a specified input channel in the addressed ADAM-6000 module
Syntax
$aaCjRhC(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus address of an ADAM-6000 module. (Always 01) Cj identifies the desired analog input channel j (j : 0 to 7). RhC is the Read Alarm Connection command. h indicates alarm type (H = High alarm, L = Low alarm) (cr) represents terminating character, carriage return (0Dh)
Response
!aaCn(cr) if the command was valid ?aa(cr) if an invalid operation was entered.
There is no response if the system detects a syntax error or communication error or if the specified address does not exist.
! delimiter character indicating a valid command was received. aa represents the 2-character hexadecimal Modbus network address of the corresponding ADAM-6000 module. Cn identifies the desired digital output channel n (n : 0 to 1) whether interlock with the alarm of the specific analog input channel. If the values of n are *, the analog input has no connection with a digital output point. (cr) represents terminating character, carriage return (0Dh)
Example
command: $01C1RLC(cr) response: !01C0(cr) Channel 1 of the ADAM-6000 module at address 01h is instructed to read its Low alarm output connection. The system responds that the Low alarm output connects to the digital output at channel 0 in the specific ADAM-6000 module.
$aaCjAhU
Name Description
Set Alarm Limit Sets the High/Low alarm limit value for the specified input channel of a specified ADAM-6000 module.
Syntax
$aaCjAhU(data)(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of an ADAM-6000 module. (Always 01) Cj identifies the desired analog input channel j (j : 0 to 7). AhU is the Set Alarm Limit command. h indicates alarm type (H = High alarm, L = Low alarm) (data) represents the desired alarm limit setting. The format is always in engineering units. (cr) represents terminating character, carriage return (0Dh)
Response
!aa(cr) if the command was valid ?aa(cr) if an invalid operation was entered. There is no response if the system detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. aa represents the 2-character hexadecimal Modbus network address of the corresponding ADAM-6000 module. (cr) represents terminating character, carriage return (0Dh)
Example
command: $01C1AHU+080.00(cr) response: !01(cr) The high alarm limit of the channel 1 in the specific ADAM-6000 module at address 01h is been set +80. The system confirms the command has been received.
Note:
An analog input module requires a maximum of 2 seconds after it receives a Set Alarm Limit command to let the settings take effect. During this interval, the module cannot be addressed to perform any other actions.
$aaCjRhU
Name Read Alarm Limit
Description
Returns the High/Low alarm limit value for the specified input channel in the addressed ADAM-6000 module
Syntax
$aaCjRhU(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of an ADAM-6000 module. (Always 01) Cj identifies the desired analog input channel j (j : 0 to 7). RhU is the Read Alarm Limit command. h indicates alarm type (H = High alarm, L = Low alarm) (cr) represents terminating character, carriage return (0Dh)
Response
!aa(data)(cr) if the command was valid ?aa(cr) if an invalid operation was entered. There is no response if the system detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. aa represents the 2-character hexadecimal Modbus network address of the corresponding ADAM-6000 module. (data) represents the desired alarm limit setting. The format is always in engineering units. (cr) represents terminating character, carriage return (0Dh)
Example
command: $01C1RHU(cr) response: !01+2.0500(cr) Channel 1 of the ADAM-6000 module at address 01h is configured to accept 5V input. The command instructs the system to return the High alarm limit value for that channel. The system responds that the High alarm limit value in the desired channel is 2.0500 V.
$aaCjS
Name Description Read Alarm Status Reads whether an alarm occurred to the specified input channel in the specified ADAM-6000 module
Syntax
$aaCjS(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of an ADAM-6000 module. (Always 01) Cj identifies the desired analog input channel j (j : 0 to 7). S is the Read Alarm Status command. (cr) represents terminating character, carriage return (0Dh)
Response
!aahl(cr) if the command was valid ?aa(cr) if an invalid operation was entered. There is no response if the system detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. aa represents the 2-character hexadecimal address Modbus of the corresponding ADAM-6000 module. h represents the status of High alarm. 1 means the High alarm occurred, 0 means it did not occur. l represents the status of Low alarm. 1 means the Low alarm occurred, 0 means it did not occur. (cr) represents terminating character, carriage return (0Dh)
Example
command: $01C1S(cr) response: !0101(cr) The command asks the module at address 01h to return its alarm status for channel 1. The system responds that a High alarm has not occurred, but the Low alarm has occurred.
Command Name Description Read Channels Status Asks a specified input module to return the status of all channels
#aabb
Write Digital Output Writes specified values to either a single channel or all channels simultaneously
$aa6
Name Description Read Channel Status This command requests that the specified ADAM-6000 module return the status of its digital input channels and a read-back value of its digital output channels. Syntax $aa6(cr) $ is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of the ADAM-6000 module. (Always 01) 6 is the Digital Data In command. (cr) is the terminating character, carriage return (0Dh)
Response
!aa(data)(data)00(cr) if the command is valid. (ADAM-6050/6051/6060) ?aa(cr) if an invalid operation was entered. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. ! delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of an ADAM-6000 module. (data) a 2-character hexadecimal value representing the values of the digital input module. (cr) is the terminating character, carriage return (0Dh)
Example
command: $016(cr) response: !01112200(cr) The command asks the specific ADAM-6000 module at address 01h to return the values of all channels. The first 2-character portion of the response indicates the address of the ADAM-6000
module. The second 2-character portion of the response, value 11h (00010001), indicates that digital input channels 8 and 12 are ON, channels 9, 10, 11, 13, 14 and 15 are OFF. The third 2-character portion of the response, value 22h (00100010), indicates that digital input channels 1 and 5 are ON, and channels 0, 2, 3, 4, 6 and 7 are OFF.
#aabb(data)
Name Description Write Digital Output This command sets a single or all digital output channels to the specific ADAM-6000 module.
Syntax
#aabb(data)(cr) # is a delimiter character. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of the ADAM-6000 module. (Always 01) bb is used to indicate which channel(s) you want to set. Writing to all channels (write a byte): both characters should be equal to zero (BB=00). Writing to a single channel (write a bit): first character is 1, second character indicates channel number which can range from 0h to Fh. (data) is the hexadecimal representation of the digital output value(s). When writing to a single channel (bit) the first character is always 0. The value of the second character is either 0 or 1. When writing to all channels (byte) 2 or 4-characters are significant. The digital equivalent of these hexadecimal characters represent the channels' values.
Response
>(cr) if the command was valid. ?aa(cr) if an invalid command has been issued. There is no response if the module detects a syntax error or communication error or if the specified address does not exist. > delimiter character indicating a valid command was received. ? delimiter character indicating the command was invalid. aa (range 00-FF) represents the 2-character hexadecimal Modbus network address of an ADAM-6000 module that is responding. (cr) is the terminating character, carriage return (0Dh)
Example
An output bit with value 1 is sent to channel 2 of a digital output module at address 01h. Channel 2 of the digital output module is set to ON.
command: #010012(cr)
response: >(cr)
An output byte with value 12h (00010010) is sent to the digital output module at address 01h. Channels 1and 4 will be set to ON, and all other channels will be set to OFF.
Note: If any channel of the digital output module is configured as the output for an analog input alarm, it cannot be reconfigured via digital output commands. Channels used for analog input alarms always have a higher priority.
Appendix A
Design Worksheets
An organized system configuration will lead to efficient performance and reduce engineer effort. This Appendix provides the necessary worksheet, helping users to configure their DA&C system in order. Follow these working steps to build up your system relational document: Step 1. Asking questions and getting answers for your control strategy. 1) What will be monitored and controlled? (List the equipment) 2) What will be monitored and controlled separately? (Divide the function area) 3) What will be monitored and controlled by ADAM-6000 I/O? (List the target equipment in different function areas)
Step 2. Identify the I/O types of each equipment and full-fill Table A-1 to establish the I/O data base.
Function Equipment Input or I/O Module I/O Module Voltage of Current of Special Area Output Type Product No. Range Range Requirements
Step 3. Mapping the I/O data base into ADAM-6000 I/O modules. 1) In column A, note the ADAM-6000/TCP IP addresses mapped for individual function areas. 2) In column B, list the I/O modules product number. 3) In column C, enter the maximum number of I/O points available per module. 4) In column D, total the number of the I/O point you need. 5) In column E, calculate the total number of these modules that you will need. 6) In column F, enter the number of spare modules that you may need for future expansion in your systems. 7) In column G, enter the total number (Required + Spare) of these modules that you need for these systems. <A> <B> <C> <D> <E> <F> <G>
ADAM-6000 I/O Module I/O Points Total I/O Points I/O Module Spare Total IP Address Product No. per Module Required Required I/O Modules I/O Modules
ADAM-6000 IP Address
I/O Type
Tag Name
These several worksheets are very useful to hardware wiring and software integration, please make copies to establish your own system configuration documentation.