3.9.2INIT* State settings: .......................................................................................................................... 25
Chapter 4 Specification and wiring ............................................................................................... 26
4.1EDAM-4250 10 DI and 6 DO channels Digital I/O Module ................................................ 26
5.1 System Requirement ............................................................................................................... 33
5.2 Install Utility Software on Host PC ........................................................................................... 33
5.3 EDAM Ethernet I/O Utility Overvie w ........................................................................................ 34
5.4 Main Menu ............................................................................................................................... 34
5.4.1Function Menu ................................................................................................................................... 34
5.4.2Tool Bar .............................................................................................................................................. 35
5.5.1Module IP ........................................................................................................................................... 36
5.9 Data /Event Stream .................................................................................................................. 40
5.10 Digital I/O Module Settings ...................................................................................................... 42
5.10.1Digital Test Tab .................................................................................................................................. 42
12.8.1Low to High Delay output .................................................................................................................. 168
12.8.2High to Low Delay output .................................................................................................................. 168
12.9DO Auto-Off Time Mode ........................................................................................................ 169
8
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Chapter 1Product Overview
1.1Introduction
EDAM-4200 is based on the popular Ethernet networking standards used today in most business environments.
Users can easily add EDAM-4200 I/O modules to existing Ethernet networks or use EDAM-4200 modules in new
Ethernet-enabled Manufacturing networks. EDAM-4200 module features a 10/100 Mbps Ethernet switching chip to
allow Daisy Chain connections in an Ethernet network, making it easier to deploy, and supports industrial popular
Modus/TCP protocol over TCP/IP for data connection. EDAM-4200 also supports UDP protocol over Ethernet
networking. With UDP/IP, EDAM-4200 I/O modules can actively send I/O data stream to 8 Ethernet nodes. Through
Ethernet networking HMI/SCADA system and controller can access or gather real-time data from EDAM-4200
Ethernet enabled DA&C modules. And, these real-time data can be integrated with business system to create
valuable, competitive business information immediately.
1.2 Daisy Chain connection with auto-bypass protection
EDAM-4200 module has built in two-port Ethernet switches to allow daisy chain connections in an Ethernet
network, making it easier to deploy, and helping improve scalability. The two Ethernet ports are fully compliant
with IEEE 802.3u 10/100Mbpst through standard RJ-45 connectors Although daisy chain topology brings attractive
benefits for users, it still comes with the risk that once any device in the daisy-chain network suffers power outage,
it will cause the disconnection of all devices downstream, to prevent this critical issue from happening, inLog
especially refined the hardware design of EDAM-4200 so that it(Auto-bypass protection) can rapidly recover the
network connection in about 1 seconds, Therefore, the damage will be greatly minimized.
Note: Auto-Bypass Protection feature guarantees the Ethernet communication. It will automatically active to
continue the network traffic when the EDAM-4200 modules loses its power after 2 second.
1.3 Mixed I/O in One Module to fit all applications
EDAM-4200 mixed I/O module design concept provides the most cost-effective I/O usage for application system.
The most common used I/O type for single function unit are collected in ONE module. This design concept not only
save I/O usage and spare modules cost but also speed up I/O relative operations. For small DA&C system or
standalone control unit in a middle or large scale, EDAM-4200 mixed I/O design can easily fit application needs by
one or two modules only. With additional embedded control modules, EDAM-4200 can easily create a localized, less
complex, and more distributed I/O architecture.
1.4 Industrial standard Modbus/TCP protocol supported for open connectivity
EDAM-4200 modules support the popular industrial standard, Modbus/TCP protocol, to connect with Ethernet
Controller or HMI/SCADA software built with Modbus/TCP driver. Inlog also provides OPC server for Modbus/TCP to
integrate EDAM-4200 I/O real-time data value with OPC client enabled software. Users don’t need to take care of
special driver’s development.
9
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦
♦
1.5 Features
1.5.1 DIO Synchronization (Mirror DI to Local /Remote Device DO)
EDAM-4200 series modules also provide a DIO Synchronization function. A Local/Remote device single digital
output channel can be activated (1 or 0) dependent on the digital input channels value. When the specific DI
channels value changed from "match" to "mismatch" (or "mismatch" to "match")DI mask pattern, the Local/Remote
device corresponding DO will be set to active state(1 or 0) dependent on the DO setting (For more detailed
information refer to “Appendix”).
1.5.2 DO Auto-Off Time Mode
This function is used to force the specific DO channel to work as a monostable operation. After a certain period of
time, the DO returns to the stable state until another triggering command is applied.
(For more detailed information refer to “Appendix”).
♦ Low to High DO(n) pulse output
High to Low DO(n) pulse output
10
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
1.5.3 High/Low delay output mode
EDAM-4200 series modules supports high-to-low and low-to-high delay output function.
(For more detailed information refer to “Appendix”).
Low to High Delay output:
High to Low Delay output:
1.5.4 Power-on & Safe valu
Power-on value:
Power-on value is used to set the module default output value when the module is turned-on or watch dog timeout
reset. This function is especially importance in some application where the specific initial output states are required
User can set power on value by sending Set power-on/safe value command
Safe value:
Safe value are used to set the module outputs into the specific values when Host watchdog timeout If The host
watchdog timer is enabled by sending Set host watchdog timeout value, the host should send Host OK command
periodically within Timeout value to refresh the timer, otherwise the module will be forced to safety state.
11
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
1.6 Common technical specification of EDAM-4200
♦ Ethernet: 10 BASE-T IEEE 802.3 100 BASE-TX IEEE 802.3u
♦ Wiring: UTP, category 5 or greater
♦ Bus Connection: Two-port RJ45 modular jack(Auto-bypass protection)
♦ Comm. Protocol: Modbus/TCP on TCP/IP and UDP
♦ Data Transfer Rate: Up to 100 Mbps
♦ Unregulated 10 to 30VDC
♦ Protection: Over-voltage and power reversal
♦ Status Indicator: Power, CPU, Communication (Link, Collide, 10/100 Mbps, Tx, Rx)
♦ Mounting: DIN rail or wall
♦ Wiring: I/O cable 14 to #28 AWG wire for terminal block.
♦ Operating Temperature: - 10 to 70º C (14 to 158º F)
♦ Storage Temperature: - 25 to 85º C (-13 to 185º F)
♦ Humidity: 5 to 95%, non-condensing
♦ Atmosphere: No corrosive gases
NOTE:
Equipment will operate below 30% humidity. However, static electricity problems occur much more frequently at
lower humidity levels. Make sure you take adequate precautions when you touch the equipment. Consider using
ground straps, anti-static floor coverings, etc. if you use the equipment in low humidity environments.
1.7 Software Support
Based on the Modbus/TCP standard, the EDAM-4200 firmware is a built-in Modbus/TCP server. Therefore, Inlog
provides the necessary DLL drivers, and Windows Utility for users for client data for the EDAM-4200. Users can
configure this DA&C system via Windows Utility; integrate with HMI software package via Modbus/TCP driver or
Modbus/TCP OPC Server. Even more, you can use the DLL driver and ActiveX to develop your own applications.
1.8 Package Information
The package of EDAM-4200 series module will contain the following items. Please check and feel free to contact us
if any part missing or damaged after purchasing EDAM-4200 product.
EDAM-4200 module (assembled with DIN Rail)
Product CD
Panel mounting bracket
Start-up manual
1.9 Product Warranty (1 years)
Inlog warrants to you, the original purchaser, that each of its products will be free from defects in materials and
workmanship for one year from the date of purchase. This warranty does not apply to any products which have
been repaired or altered by persons other than repair personnel authorized by Inlog, or which have been subject to
misuse, abuse, accident or improper installation. Inlog assumes no liability under the terms of this warranty as a
consequence of such events.
Because of Inlog’s high quality-control standards and rigorous testing, most of our customers never need to use our
repair service. If an Inlog product is 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.
12
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
1.10 Dimensions
The following diagrams show the dimensions of the EDAM-4200 l/O module in millimeters.
♦EDAM-4200 series
13
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
DC Input and DC Output modules
Module
DI ch.
Input type
DO ch.
Output type
Pg.
Contact(common source or ground)
Contact (common ground)
2
Iso. with differential counter input
Contact(common source)
1.11 Summary of DIO modules
The EDAM-4200 provides a series of digital input or output modules to sense the digital signal or to control the
remote devices.
4250 10 Isolated single ended with Dry/Wet
4251
4251A
4254 5 differential digital input,
4255 8 Isolated single ended with Dry/Wet
4260
4264
10 Isolated single ended with Dry
10 Isolated single ended with Wet
2 Iso. with differential counter input
(common source or ground)
Contact(common source or ground)
7 Isolated single ended with Dry
Contact (common source).
4 differential digital input,
(common source or ground)
6 Isolation with Open collector (NPN) 15
4 Isolation with Open collector (NPN)
4 Isolation with Open collector (NPN)
8 Isolated with open drain (P-MOSFET),
750mA/channel.
8 Isolated with open drain (P-MOSFET),
750mA/channel.
4 Relay output,0.6A@125VAC/2A@30VDC,
RL0,RL1,RL2 Form C and RL3 Form A.
4 Relay output,0.6A@125VAC/2A@30VDC,
RL0,RL1,RL2 Form C and RL3 Form A.
16
17
18
19
20
21
14
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Dry Contact
Wet Contact
Note: To use wet contact , the DI.GND pin must be opened.
Open collector output
Chapter 2 Block diagram of DIO modules
2.1 EDAM-4250
2.1.1 Block diagram
2.1.2 Wire connection
15
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Dry Contact
Counter Input
Open collector output
2.2 EDAM-4251
2.2.1 Block diagram
2.2.2 Wire connection
16
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Counter Input
Wet Contact
Open collector output
2.3 EDAM-4251A
2.3.1Block diagram
2.3.2 Wire connection
17
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Wet Contact
Digital output
2.4 EDAM-4254
2.4.1 Block diagram
2.4.2 Wire connection
18
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Dry Contact
Wet Contact
Note: To use wet contact , the DI.GND pin must be opened.
Open collector output
2.5 EDAM-4255
2.5.1Block diagram
2.5.2 Wire connection
19
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Dry Contact
Wet Contact
Note: To use wet contact , the DI.GND pin must be opened.
Relay output
2.6 EDAM-4260
2.6.1 Block diagram
2.6.2 Wire connection
20
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Wet Contact
Relay output
2.7 EDAM-4264
2.7.1 Block diagram
2.7.2 Wire connection
21
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Chapter 3System Requirements
♦ IBM PC compatible computer with 486 CPU (Pentium is recommended)
♦ Microsoft 95/98/2000/NT 4.0 (SP3 or SP4)/XP/Win 7,8,10 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 EDAM-4200 (+10 to +30 V unregulated)
3.1 Wiring and Connections
This section provides basic information on wiring the power supply, I/O units, and network connection.
3.2 Power supply wiring
Although the EDAM-4200/TCP systems are designed for a standard industrial unregulated 24 V DC power supply,
they accept any power unit that supplies within the range of +10 to +30 VDC. The power supply ripple must be
limited to 200 mV peak-to-peak, and the immediate ripple voltage should be maintained between +10 and +30 VDC.
Screw terminals +Vs and GND are for power supply wiring.
Note: The wires used should be sized at least 2 mm.
22
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
No.
Color
LED Status
Definition
EDAM-4200 module’s Ethernet wiring is connected
Ethernet.
3.3 Status LED indicator for EDAM-4200I/O modules
There are Tow flash types of the Status LED indicator on the front panel of EDAM-4200 series.
1 Yellow (Power-LED) On Power-LED, Always ON.
2 Green (LINK-LED) On (LINK) This LED is normal on whenever the
3 Green (LINK-LED) Blinking (COM) Blinks whenever EDAM-4200 module is
transmitting or receiving data(I/O command) via
3.4 Ethernet LED indicator of EDAM-4200
There are two ports of RJ-45 ethernet connector. Each RJ-45 port LEDs built with two indicators to represent the
EDAM-4200 ethernet status as explained below:
♦ Yellow indicator (Speed): This LED is always ON.
♦ Green indicator(Link): This LED is normal on whenever the EDAM-4200 module’s Ethernet
wiring is connected.
3.5 Reset
There is a RESET push button on the front panel. After press the reset button the module will be rebooted.
3.6 I/O modules wiring
The system uses a plug-in screw terminal block for the interface between I/O modules and field devices. The
following information must be considered when connecting electrical devices to I/O modules. The terminal block
accepts wires from # 14 AWG ~ 28 AWG. Always use a continuous length of wire. Do not combine wires to make
them longer.
1. Insert the screw driver into the left hole of the terminal.
2. Insert the wiring into the left hole of the terminal.
23
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
3.7 Rear side installation
3.8 Daisy Chain Limitations
In general, an ethernet cable distance of each 100BASE-TX network segment is can be run 100 meters (about 328
feet). However, cables can pick up electrical noise on long runs. Based on this limitation, the maximum total
connection length in daisy chain wiring should also be 100m as if auto-bypass protection active. For example, the
distance from first to second module is 50m, so as second to third. When the power fails on second (middle)
module, the auto-bypass will activate to bridge the network connection. The total distance from first to the 3rd will
become 100m, that means the total network segment is close to limitation.
24
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
3.9 Initializing a Module
All EDAM modules in an Ethernet network must have a unique IP address. Therefore, to configure the brand-new
EDAM before using is necessary.
All EDAM-4200 I/O modules have a special slide-switch as INIT-SWITCH (Ref. Appendix). The I/O modules must
be set at “INIT” State when you want to change the default settings, such as the IP address, Subnet Mask,
Gateway, Password etc. If the “INIT” switch set to “INIT-ON” mode when power ON, Under this state the default
configuration is set as following :
Note: Each module must has a unique ID number to be identified when the DHCP enabled, because you would
not know the module IP address when DHCP enabled, but if with the different ID number. You can call
provided function call( TCP_GetIPFromID() in TCPDAQ.dll) to get correct IP address for each ID number
25
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Chapter 4Specification and wiring
4.1 EDAM-4250 10 DIand 6 DO channels Digital I/O Module
The EDAM-4250 is a high-density I/O module built-in two port(RJ-45) 10/100 based-T interface for seamless
Ethernet connectivity. It provides 10 digital input and 6 digital output channelswith 3750VRMS Isolating
protection. All of the Digital Input channels support input latch function for important signal handling. Mean while,
these DI channels allow to be used as 300Hz counter. Opposite to the intelligent DI functions, the EDAM-4250
Digital Output channels also support pulse output function, Auto-Off Time of digital output and DIO Synchronization
function.
4.1.1 Specification
Digital input : Isolated single ended with common source/ground
Channel : 10 channels (DI0~DI9).
Input Level : Logic level status can be inversed via ASCII/Modbus command.
Dry Contact : Single ended with common source.
Logic level 0 (active): Close to GND.
Logic level 1 (inactive): Open.
Wet Contact : To use Wet Contact , the DI.GND pin must be opened.
Digital Output : Isolated Open collector (NPN) output channels.
Channel : 6 channels (DO0~DO5) .
Logical level : Logic level status can be inversed via ASCII/Modbus command.
Open Collector : +5V~30V/500 mA max. load
Pulse Output : Each channel supports 300Hz pulse output
Optical Isolation Voltage : 3750Vrms
Display: 10 digital inputs & 6 digital output status LED
Power requirements: Unregulated +10 ~ +30 VDC
Power Consumption: 3.5 W (Typical)
4.1.2Application Wiring
26
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
4.2 EDAM-4251 10 DI , 4 DO and 2 Counter chs DIO Module
The EDAM-4251 is a high-density I/O module built-in two port(RJ-45) 10/100 based-T interface for seamless
Ethernet connectivity. It provides 10 digital input(Dry contact), 4 digital output, and 2 counter channels with
3750VRMS Isolating protection. All of the Digital Input channels support input latch function for important signal
handling. Mean while, these DI channels allow to be used as 300Hz(DI0~9)/4.5KHz(C0~C1) counter. Opposite to the
intelligent DI functions, the EDAM-4251 Digital Output channels also support pulse output function, Auto-Off Time of digital output and DIO Synchronization function.
4.2.1 Specification
Digital Input : Isolated single ended with common source (Dry Contact).
Channel: 10 channels (DI0~DI9)
Input level: Logic level status can be inversed via ASCII/Modbus command.
Dry contact: Single ended with common ground.
Display : 10 digital inputs, 2 Counter & 4 digital output status LED
Power requirements : Unregulated +10 ~ +30 VDC
Power Consumption : 3.5 W (Typical)
4.2.2Application Wiring
27
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
4.3 EDAM-4251A 10 DI , 4 DO and 2 Counter chs DIO Module
The EDAM-4251A is a high-density I/O module built-in two port(RJ-45) 10/100 based-T interface for seamless
Ethernet connectivity. It provides 10 digital input(Wet contact), 4 digital output, and 2 counter channels with
3750VRMS Isolating protection. All of the Digital Input channels support input latch function for important signal
handling. Mean while, these DI channels allow to be used as 300Hz(DI0~9)/4.5KHz(C0~C1) counter. Opposite to the
intelligent DI functions, the EDAM-4251A Digital Output channels also support pulse output function, Auto-Off Time of digital output and DIO Synchronization function.
4.3.1 Specification
Digital Input : Isolated single ended with common source/ground (Wet Contact).
Channel : 10 channels (DI0~DI9)
Input level : Logic level status can be inversed via ASCII/Modbus command.
Wet Contact : Single ended digital input with common source/ground.
Display : 10 digital inputs, 2 Counter & 4 digital output status LED
Power requirements : Unregulated +10 ~ +30 VDC
Power Consumption : 3.5 W (Typical)
4.3.2Application Wiring
28
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
4.4 EDAM-4254 5 differential DI and 8 DO channels Digital I/O Module
The EDAM-4260 is a high-density I/O module built-in two port(RJ-45) 10/100 based-T interface for seamless
Ethernet connectivity. It is a high-density I/O module. It provides 5 differential digital input and 8 digital output
channels with 3750VRMS Isolating protection. The EDAM-4254 Digital Input channels support 5 isolated differential
digital input (sink/source) channels and All of the Digital Input channels support input latch function for important
signal handling. Meanwhile, these DI channels allow to be used as 300Hz counter. Opposite to the intelligent DI
functions, the EDAM-4254 Digital Output channels also support pulse output function, Auto-Off Time of digital
output and DIO Synchronization function.
4.4.1 Specification
Digital input : Isolated differential digital inputs.
Channel : 5 (DI0~DI4) isolated differential input channels (sink/source).
Input Level : Logic level status can be inversed via ASCII/Modbus command.
Digital Output: Isolated open drain (P-MOSFET) output channels.
Channel: 8 channels (DO0~DO7) .
Logical level : Logic level status can be inversed via ASCII/Modbus command.
Load voltage : +10V ~ +30Vdc
Load current : 750mA/ channel Max. (with short-circuit protection)
Pulse Output: Each channel supports 300Hz pulse output
Optical Isolation Voltage: 3750Vrms
Display: 5 digital inputs & 8 digital outputs status LED
Power requirements: Unregulated +10 ~ +30 VDC
Power Consumption:
3.6 W (Typical)
4.4.2Application Wiring
29
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
4.5 EDAM-4255 8 DI and 8 DO channels Digital I/O Module
The EDAM-4255 is a high-density I/O module built-in two port(RJ-45) 10/100 based-T interface for seamless
Ethernet connectivity. It provides 8 digital input channels, and 8 digital output channels. All of the digital input
channels support the input latch function for important signal handling. The digital output channels support source
type output. Opposite to the intelligent DI functions, the EDAM-4255 Digital Output channels also support pulse
output function, Auto-Off Time of digital output and DIO Synchronization function.
4.5.1 Specification
Digital input: Isolated single ended with common source/ground.
Channel : 8 channels (DI0~DI7).
Input Level : Logic level status can be inversed via ASCII/Modbus command.
Dry Contact : Single ended with common Ground.
Logic level 0 (active) : Close to DI.GND
Logic level 1 (inactive): Open
Wet Contact : To use Wet Contact , the DI.GND pin must be opened.
Digital Output: Isolated open drain (P-MOSFET) output channels.
Channel: 8 channels (DO0~DO7) .
Logical level : Logic level status can be inversed via ASCII/Modbus command.
Load voltage : +10V ~ +30Vdc
Load current : 750mA/ channel Max. (with short-circuit protection)
Pulse Output: Each channel supports 300Hz pulse output
Optical Isolation Voltage: 3750Vrms
Display: 8 digital inputs & 8 digital outputs status LED
Power requirements: Unregulated +10 ~ +30 VDC
Power Consumption:
3.6 W (Typical)
4.5.2Application Wiring
30
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
4.7 EDAM-4260 7-channel Digital Input and 4 RELAY output Module
The EDAM-4260 is a high-density I/O module built-in two port(RJ-45) 10/100 based-T interface for seamless
Ethernet connectivity. It provides 7 isolated digital input channels and 4 relay output channels(0.6A/125Vac,
2A/30Vdc). All of the Digital Input channels support input latch function for important signal handling. Mean while,
these DI channels allow to be used as 300Hz counter. All relay output channels are differential with individually
common . Opposite to the intelligent DI functions, the EDAM-4260 Digital Output channels also support Auto-Off Time of digital output and DIO Synchronization function.
4.7.1 Specification
Digital input: Isolated single ended with common source.
Channel : 7 channels (DI0~DI6).
Input Level : Logic level status can be inversed via ASCII/Modbus command.
Dry Contact : Single ended with common Ground.
Logic level 0 (active) : Close to DI.GND
Logic level 1 (inactive): Open
Wet Contact : To use Wet Contact , the DI.GND pin must be opened.
Logic level 0 (active) : +5V to +30VDC max.
Logic level 1 (inactive) : +2VDC max.
Counter mode: Supports up to 300Hz counter(by software, 32-bit + 1-bit overflow)
Optical Isolation Voltage : 3750Vrms
Relay Output :
Output channels : 4 relay output channels
(RL0,RL1,RL2 Form C(SPDT) and RL3 Form A(SPST NO).
Display : 7 digital input & 4 Relay output status LED
Power requirements : Unregulated, +10V ~ +30 VDC
Power Consumption : 2.5 W (Typical)
4.7.2 Application Wiring
♦ Digital Input & Relay output:
Note: Relay(x): RLx CM=Common, RLx NO=Normal open, RLx NC=Normal Close
31
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
4.8 EDAM-4264 4-channel differential Digital Input and 4 RELAY output Module
The EDAM-4264 is a high-density I/O module built-in two port(RJ-45) 10/100 based-T interface for seamless
Ethernet connectivity. It provides 4 isolated differential digital input channels and 4 relay output
channels(0.6A/125Vac, 2A/30Vdc). All input channels are sdifferential digital input (sink/source) and support input
latch function for important signal handling. Mean while, these DI channels allow to be used as 300Hz counter. All
relay output channels are differential with individually common . Opposite to the intelligent DI functions, the
EDAM-4264 Relay Output channels also support Auto-Off Time of Relay output and DIO Synchronization function.
4.8.1 Specification
Digital input : Isolated differential digital inputs (sink/source).
Channel : 4 (DI0~DI3) isolated differential input channels (sink/source).
Input Level : Logic level status can be inversed via ASCII/Modbus command.
Output channels : 4 relay output channels (RL0,RL1,RL2 Form C(SPDT) and RL3 Form A(SPST NO).
Surge strength : 500V
Relay contact rating : 0.6A/125Vac, 2A/30Vdc
Operate Time : 3mS max.
Release Time : 2mS max.
Min Life : 5*105 ops
Pulse Output : Each channel supports 300Hz pulse output
Display : 4 digital input & 4 Relay output status LED
Power requirements : Unregulated, +10V ~ +30 VDC
Power Consumption : 2.5 W (Typical)
4.8.2 Application Wiring
♦ Digital Input & Relay output:
Note: Relay(x): RLx CM=Common, RLx NO=Normal Open, RLx NC=Normal Close
32
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Chapter 5EDAM-4200 Utility Guide
In order to properly configure EDAM series. You will need following items to complete your system hardware
configuration.
5.1 System Requirement
Host computer
♦ IBM PC compatible computer with 486 CPU (Pentium is recommended)
♦ Microsoft 95/98/2000/NT 4.0 (SP3 or SP4)/Win 7,8,10 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 EDAM-4200 (+10 to +30 V unregulated), ( for 94xx: option).
♦ Make sure to prepare all of the items above, then connect the power and network wiring as Figure 5-1
Figure 5-1 Power wiring
5.2 Install Utility Software on Host PC
Inlog provide free download Manual and Utility software for EDAM-4200 modules’ operation and configuration.
Link to the web site: www.inlog.com.tw and click into the “Download Area” to get the latest version EDAM-4200
manual and Ethernet I/O Utility. Once you download and setup the Utility software, there will be a shortcut of the
Utility executive program on Windows’ desktop after completing the installation.
33
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
5.3 EDAM Ethernet I/O Utility Overview
The Utility software offers a graphical interface that helps you configure the EDAM-4200 modules. It is also very
convenient to test and monitor your remote DAQ system. The following guidelines will give you some brief
instructions on how to use this Utility.
Setup : Contents Timeout and Scan Rate setting functions. Please be aware of the time
setting for other Ethernet domination usually longer than local network.
Help : Contents on-line help function as user’s operation guide; the item “About”
contents information about software version, released date, and support modules.
5.4.2 Tool Bar
There are five push buttons in the tool bar.
♦ Exit : Exit utility program
♦ Terminal : Terminal Call up the operation screen of Terminal emulation to do the request / response
command execution.
♦ Search: Search all the EDAM modules you connected in local Ethernet
♦ Add : Add remote EDAM I/O module
♦ Monitor: Monitor the Stream/Event Data
5.4.3 List Sort
The searched units will be listed in the tree-structure display area in order by “Sort” selection
♦ Module IP : Sort by module IP
♦ Module ID: Sort by module ID
♦ Module No : Sort by module name
35
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
5.5 Network Setting
As the moment you start up this Windows Utility, it will search all EDAM-4200 I/O modules on the host PC’s
domination Ethernet network automatically. Then the tree-structure display area will appeal with the searched
units and the relative IP address.
Since Utility software detects the EDAM-4200 on the network, user can begin to setup each unit.
Choose any one I/O module listed on the tree-structure display area and entry the correct password. The module
basic configuration table is listed as shown in for setting
Figure 5-3
5.5.1Module IP
MAC Address : This is also called Ethernet address and needs no further configuration.
IP Address, Subnet Mask, and Default Gateway:
The IP address identifies your EDAM-4200 devices on the global network. Each EDAM-4200 has same
default IP address 10.0.0.1. Therefore, please do not initial many EDAM-4200 at the same time to avoid the
Ethernet collision. If you want to configure the EDAM-4200 in the host PC’s dominating network, only the IP
address and Subnet Mask will need to set (The host PC and EDAM Ethernet I/O must belong to same subnet
Mask).
If you want to configure the EDAM-4200 via Internet or other network domination, you have to ask your
network administrator to obtain a specific IP and Gateway addresses, and then configure each EDAM-4200 with
the individual setting.
DHCP : (default Disabled)
Allow you to get IP address from the DHCP server without setting IP address by manual.
DHCP timeout : (default 20 sec)
Allow you to set timeout to search for the DHCP servo. If there is no DHCP servo exist, the module will reboot and
use static IP address assigned by E9KUtility.exe
Web Server : (default Disabled)
Allow you monitor and control I/O status on EDAM-4200 modules remotely through web browser.
Module ID : (default 01)
(default 10.0.0.1, 255.255.255.0 and 10.0.0.1)
36
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Protocol
Port (dec)
Description
Each module must has a unique ID number to be identified when the DHCP enabled, because you would not
know the module IP address when DHCP enabled, but if with the different ID number. You can call provided
function call(TCP_GetIPFromID() in TCPDAQ.DLL) to get correct IP address for each ID number
Password : (default 00000000)
Allow you to change the password of the module
5.5.2 TCP/IP port:
EDAM-4200 series use four ports to communication with Host as shown below table
TCP 502 MODBUS/TCP
UDP 1025 ASCII Command
UDP 5168 Event/Stream trigger
TCP 80 HTTP (web)
5.5.3 Stream/Alarm(for DI latch Mode) IP
Stream/Alarm event Enable Setting : Set Stream /Event data Destination IP (default all disabled),
Active Stream time period : Set time interval for sending stream data (for DI latch Mode, default 1 sec)
37
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
5.6 Add Remote Stations
To meet the remote monitoring and maintenance requirements, The EDAM-4200 system does not only available to
operate in local LAN, but also allowed to access from Internet or Intranet. Thus users would able to configure an
EDAM-4200 easily no matter how far it is.
Select item Tool\Add Remote Ethernet I/O in function menu or click the button, the adding station screen will pop
up as Figure1 6 Add remote module. Then key-in the specific IP address and click the “Ping” button. If the
communication success, click “Add” to add EDAM Ethernet I/O unit into the tree-structure display area.
Figure5-4 Add remote module
Note:
♦ There is several conditions need to be sure before adding a remote EDAM-4200 system in the Window Utility.
♦ Be sure the specific IP is existed and available.
♦ Be sure to complete the network linkage for both sides.
♦ Be sure to adjust the best timing of timeout setting.
♦ Even you are not sure whether the communication is workable or not, there is also a “Ping” function for testing
the network connection.
5.7 Security Setting
Though the technology of Ethernet discovered with great benefits in speed and integration, there also exist risk
about network invading form anywhere. For the reason, the security protection design has built-in EDAM-4200 I/O
modules. Once user setting the password into the EDAM-4200 firmware, the important system configurations
(Network, Firmware, Password) are only allowed to be changed by password verification.
Note:
The default password of EDAM-4200 is “00000000”. Please make sure to keep the correct password by yourself. If
you lose it, please contact to Inlog’s technical support center for help.
38
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
5.8 Terminal Emulations
You can issue commands and receive response by clicking the Terminal button on the tool bar. There are two kinds
of command format supported by this emulating function. Users can choose ASCII or ModBus Hexadecimal mode as
their communication base. If the ASCII mode has been selected, the Windows Utility will translate the request and
response string in ASCII format.
ASCII Command mode: Shown as ASCII Command Terminal
Figure 5-5 ASCII Command Terminal
ModBus Hexadecimal mode: shown as Chapter 9
Figure 5-6 ModBus Terminal
39
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
5.9 Data /Event Stream
Data Stream Configuration:
In addition to TCP/IP communication protocol, EDAM-4200 supports UDP communication protocol to regularly
broadcast data to specific host PCs. Click the tab of Data Stream, then configure the broadcasting interval and the
specific IP addresses which need to receive data from the specific EDAM-4200 I/O module. This UDP Data Stream
function broadcasts up to 8 host PCs simultaneously, and the interval is user-defined from 50ms to 7 Days.
Event Stream Configuration:
In addition to TCP/IP communication protocol, EDAM-4200 supports UDP communication protocol to regularly
broadcast data to specific host PCs. Click the tab of Data Stream, then configure the broadcasting interval and the
specific IP addresses which need to receive data from the specific EDAM-4200 I/O module. This UDP Data Stream
function broadcasts up to 8 host PCs simultaneously, and the interval is user-defined from 50ms to 7 Days.
Data Stream Monitoring:
After finishing the configuration of Data Stream, you can select the tab “Stream Monitor” in the function bar or
click icon to call up operation display as Figure 1 7 Stream display.
Select the IP address of the EDAM-4200 you want to read data, then click “Start ” button. The Utility software
will begin to receive the stream data on this operation display.
Figure 5-7 Stream display
40
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Data Event Monitoring:
After finishing the configuration of Data Event(for DI latch Mode), you can select the tab “Event Monitor” in the
function bar or click icon to call up operation display as Figure Event display.
Select the IP address of the EDAM-4200 you want to read DI data, then click “Start” button. The Utility software will
begin to receive the stream DI data(DI changed) on this operation display.
Figure 5-8 Event display
41
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
5.10 Digital I/O Module Settings
Selecting EDAM-4200 Digital Modules and select “Test” tab, user can read following information from the Utility.
5.10.1 Digital Test Tab
Figure 5-9 ModBus location and I/O status
Digital I/O Module Test tab”
Location : Standard Modbus address. EDAM Ethernet I/O Utility shows the Modbus mapping address of
each I/O channel. And the addresses will be the indexes for applying into the database of HMI
or OPC Server.
Channel : Indicate the channel number of digital I/O module.
Type : Data Type of the I/O channel. The data type of Digital I/O modules is always “Bit”.
Value : The current status on each channel of I/O Module. The value of digital I/O modules
could be “0” (OFF) or “1” (ON).
Mode :Describes the I/O types of the specific module. In addition to monitor the current DI/DO
status, the Windows Utility offers a graphical operating interface as Figure1 12 DI/O
status display. 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.
Figure 5-10 DI/O status display
42
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
5.10.2 Digital Input Settings Tab
The digital input channels support counter and signal latch functions. Click the specific channel, there will be five
working modes for choosing.
Figure 5-11 Direct input mode
Figure 5-12 Counter mode
43
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Figure 5-13 Input latch mode
Note:
1. The new working mode setting will take effective after click the “Update” button.
2. If necessary, users could invert the original single for flexible operation needs.
3. Supported Data Event Monitoring.
44
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
5.10.3 Digital Output Settings Tab
The digital output channels support pulse output and delay output functions. Click the specific channel, there will
be four working modes for choosing.
Figure 5-14
Direct output mode
Figure 5-15
Pulse output mode
45
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Figure 5-16
Low to High Delay mode
Figure 5-17
High to Low Delay mode
46
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Figure 5-18
Auto DIO SYNC. mode
Figure 5-19
Auto-Off Time(L->H->L) Mode
47
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Figure 5-20
Auto-Off Time(H->L->H) Mode
48
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Chapter 6What is TCPDAQ ActiveX Control ?
TCPDAQ.OCX is a collection of ActiveX controls for performing I/O operations within any compatible ActiveX control
container, such as Visual Basic, Delphi, etc. You can easily perform the I/O operations through properties, events
and methods. Specific information about the properties, methods, and events of the TCPDAQ ActiveX controls can
be found later in this manual.
With TCPDAQ ActiveX Control, you can perform versatile I/O operations to control your Inlog EDAM-4200 module
series.
The TCPDAQ ActiveX Control setup program installs TCPDAQ.OCX through a process that may take several minutes.
Installing the necessary software to use the TCPDAQ.OCX in your application involves two main steps: Installing the
TCPDAQ ActiveX Control
Use the Inlog EDAM-4200 utility to configure the modules that is attached to your computer.
You can use these ActiveX controls in any development tool that supports them, including Microsoft Visual C++,
Microsoft Visual Basic, Borland C++ Builder, Borland Delphi
6.1 Installing the TCPDAQ ActiveX Controls
Before using the TCPDAQ ActiveX Control, you must install the TCPDAQ.OCX first
♦ Insert the TCPDAQ installation CD-ROM disc into your computer.
♦ The installation program should start automatically. If autorun is not enabled on your computer, use your
Windows Explorer or the Windows Run command to execute Setup.exe on the TCPDAQ installation CD-ROM disc
(Assume "d" is the letter of your CD-ROM disc drive): D: \Setup.exe
49
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
6.2 Building TCPDAQ ActiveX Control with Various Tools
This chapter describes how you can use the TCPDAQ ActiveX Control with the following development tools:
♦ Microsoft Visual C++ version 6.0 (SP5)
♦ Microsoft Visual Basic version 6.0 (SP5)
♦ Borland Delphi version 4.0 (with the Delphi 6 Update Pack fixes for ActiveX installed)
♦ Borland C++ Builder version 5.0
This chapter assumes that you are familiar with the basic concepts of using Visual Basic, Delphi, Borland C++ Builder,
and Visual C++, including selecting the type of application, designing the form, placing the control on the form,
configuring the properties of the control, creating the code (event handler routines) for this control.
Note: For Borland Delphi 6, the Delphi 6 Update Pack fixes for ActiveX must be installed.
50
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
6.3 Building TCPDAQ Applications with Visual Basic
♦Start Visual Basic.
51
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦Select Standard EXE icon and press the Open button. A new project is created. Click on Components... from the
Project menu. The Components dialog box is loaded as shown below:
♦ Place a TCPDAQ control from the Toolbox on the form. Use the default name.
♦ Your form should look similar to the one shown below:
52
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
6.4 Building TCPDAQ Applications with Delphi
♦ Start Delphi, Delphi will launch as shown below:
♦ Select Import ActiveX Control... from the Component menu. The Import ActiveX dialog box loads:
♦ Select the TCPDAQ ActiveX Control Module and press the Install... button. A dialog box is displayed as follows:
The TCPDAQ control is loaded into the Component Palette. You can check it by clicking on Install Package... from
the Component menu. A dialog box is shown as below.
53
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦ Switch to the form and select the ActiveX tab from the Component Palette.
♦ Place a TCPDAQ control from the Component Palette on the form. Use the default names TCPDAQ1.
♦ Your form should look similar to the one shown below:
54
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
6.5 Building TCPDAQ Applications with Visual C++
♦ Start Visual C++ program.
♦ Select Add to Project→ Components and Controls from the Project menu, and double-click on Registered
ActiveX Controls. The result should be as below:
55
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦ Scroll down to the TCPDAQ Control and press the Insert button. A Class Confirm dialog box is displayed, Press OK
button.
56
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦ The TCPDAQ control will be showed in Visual C++ Toolbar.
♦ Place a TCPDAQ control from the Controls Toolbar on the dialog-based form.
57
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
6.6 Building TCPDAQ Applications with Borland C++ Builder
♦ Start Borland C++ Builder (BCB), BCB will launch as shown below:
♦ Select Import ActiveX Control... from the Component menu. The Import ActiveX dialog box loads:
♦ Select the TCPDAQ Control and press the Install... button. A dialog box is displayed as follows:
58
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦ Enter "TCPDAQ" into the File name field under the Into new package tab, and press OK button. A Confirm dialog
box is displayed. press “Yes” button.
♦ The TCPDAQ control is loaded into the Component Palette. You can check it by clicking on Install Package... from
the Component menu. A dialog box is shown as below.
59
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Name
Type
Description
Avaliable Model(s)
AOValue
double
Set the analog output voltage
All models
from module
module
operation.
“Count/Frequency mode”
0=No latched)
0=Stop)
(1=Active, 0=Inactive)
read/write operation.
“Pulse output mode”
mode” (1=Active, 0=Inactive)
(True=Enable, False=Disable)
LastError
short
Return the Error code of operation
All models
MoudleIDNo
short
Return the module ID number
All models
ModuleIP
string
Set the remote module IP address
All models
ModuelName
string
Return the module name
All models
TCPTimeOut
long
Return/set the TCP/IP Timeout (ms)
All models
interval(ms)
Name
Arguments
Returned type
Description
called before accessing properties at run time)
terminating the APP)
short coildata[]
6.7 Properties of TCPDAQ ActiveX Control
ASCIICommandReceive string Return the ASCII response message
ASCIICommandSend string Send the ASII command message to
DIChannelIndex short Specifies the digital input channel to
perform other DI properties read/write
DIounterValue long Return the counting value for the
specific DI channel which functions in
DILatchStatus short Return the latch status for the specific
DI channel which functions in
“Lo-Hi/Hi-Lo latch mode” (1=Latched,
DIStartCount boolean Start/stop counting for the specific DI
channel which functions in
“Count/Frequency mode” (True=Start,
DIStatus short Return the status for the specific DI
channel which functions in “DI mode”
DOChannelIndex short Specifies the digital output channel to
perform other DO properties
All models
All models
All DIO models
All DIO models
All DIO models
All DIO models
All DIO models
All DIO models
DOCount long Set the output count value for the
specific DO channel which functions in
DOStatus short Return/set the status for the specific
UpdateTimeInterval long Return/set data update time
All DIO models
All DIO models
All models
All models
6.8 Methods of TCPDAQ ActiveX Control
Open None None Open TCPDAQ.OCX to start operation (Must be
Close None None Close TCPDAQ.OCX(Must be called before
ModBusReadCoil short Startaddress
short Counts
None Read coil data from remote module, and stored
into coildata[] buffer
60
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
short coildata[]
short regdata[]
short regdata[]
Name
Arguments
Returned type
Description
string Errmsg(out)
short EventValue(out)
ModBusWriteCoil shot StartAddress
short Counts
Write coil data stored in coildata[] buffer to
remote module
ModBusReadReg short Startaddress
short Counts
ModBusWriteReg shot StartAddress
short Counts
None Read holding register data from remote module,
and stored into regdata[] buffer
Write register data stored in regdata[] buffer to
remote module
6.9 Events of TCPDAQ ActiveX Control
OnError short ErrCode(out)
EventDataArrival string Datetime(out)
short EventChannel(out)
short EventType(out)
short EventStatus(out)
(*): Please see TCPDAQ_Data_Structure.pdf file to understand the means of parameters
None be called when error occurred
None be called when received an event data
from the remote module (*)
6.10 Building TCPDAQ ActiveX Applications with Various Development Tools
The demo programs of TCPDAQ AvtiveX control module are included in the provided DISC. The Installed folders
include the demo programs for various development tools.
61
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
NO.
Function Name
Description
Sec. 1 TCP_Open
To initiate the TCPDAQ.dll to use.
2
TCP_Close
To terminates use of the TCPDAQ.dll.
connection to a specific EDAM-4200(A)
EDAM-4200 modules
EDAM-4200
6
TCP_SendData
Send data to a specific EDAM-4200(A) module
7 TCP_RecvData
Receive data to a specific EDAM-4200(A) module
response from EDAM-4200(A)
connection to a specific EDAM-4200(A)
EDAM-4200(A) modules
EDAM-4200(A)
12
UDP_SendData
Send data to a specific EDAM-4200(A) module
13
UDP_RecvData
Receive data to a specific EDAM-4200(A) module
receive the response from EDAM-4200(A)
15
TCP_GetModuleIPinfo
Return module IP information of a specific module
16
TCP_GetModuleID
Return module ID number of a specific module
17
TCP_GetIPFromID
Return IP address of a specific module ID number
18
TCP_ScanOnLineModules
Scan all on-line EDAM-4200(A) modules
TCPDAQ.DLL
20
TCP_GetModuleNo
Return the module name of a specific IP address
21
TCP_GetLastError
Return the error code of the latest called function
22
TCP_PingIP
Ping to Remote IP address
EDAM-4200
TCP_StopStream
To instruct the PC to stop receiving stream data from all modules
EDAM-4200(A)
from EDAM-4200
modules
EDAM-4200(A)
Chapter 7 TCPDAQ DLL API
7.1 Common Functions
3 TCP_Connect To create a Window TCP socket then establishing a
4 TCP_Disconnect Disconnecting the Window TCP socket from all
5 TCP_ModuleDisconnect Disconnecting the Window TCP socket from a specific
8 TCP_SendReceiveASCcmd To accept an ASCII format string as a command, and
transform it to meet the Modbus/TCP's specification.
Then sending it to EDAM-4200(A) and receiving the
9 UDP_Connect To create a Window UDP socket then establishing a
10 UDP_Disconnect Disconnecting the Window UDP socket from all
11 UDP_ModuleDisconnect Disconnecting the Window UDP socket from a specific
14 UDP_SendReceiveASCcmd Direct send an ASCII format string as a command, and
19 TCP_GetDLLVersion Return the DLL's version, that is the version of
7.2 Stream/Event Functions
TCP_StartStream To instruct the PC to start to receive stream data that coming from
TCP_ReadStreamData To receive stream data that coming from the specific
TCP_StartEvent To instruct the PC to start to receive alarm event data that coming
TCP_StopEvent To instruct the PC to stop receiving alarm event data from all
TCP_ReadEventData To receive alarm event data that coming from the specific
62
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
parameters
parameters.
in parameters
described in parameters
EDAM-4200(A) module
TCP_ReadDIO
To read DI/DO's status for an EDAM-4200(A) module
an EDAM-4200(A) module
an EDAM-4200(A) module
'Counter' mode
'Counter' mode
mode
mode
or 'Hi to Lo Latch'
'Counter' mode
module
during runtime
EDAM-4200(A) DIO modules
EDAM-4200(A) DIO modules
7.3 Digital I/O Functions
TCP_ReadDIOMode
TCP_ReadDISignalWidth To read the minimal high/low signal width of each D/I channel for
TCP_WriteDISignalWidth To set the minimal high/low signal width of each D/I channel for
TCP_ReadDICounter To read the counter value when a D/I channel function in
TCP_ClearDICounter To clear the counter value when a D/I channel function in
TCP_StartDICounter To start the counting when a D/I channel function in 'Counter'
TCP_StopDICounter To stop the counting when a D/I channel function in 'Counter'
TCP_ClearDILatch To clear the latch when a D/I channel function as 'Lo to Hi Latch'
TCP_ReadDILatch To read the counter value when a D/I channel function in
TCP_WriteDO To write some value to D/O channels for an EDAM-4200(A)
TCP_WriteDOPulseCount To write the pulse output count for EDAM-4200(A) DIO modules
To read the type for every D/I & D/O channels of an
TCP_WriteDODelayWidth To set the pulse and delay signal widths to the specific
TCP_ReadDODelayWidth To read the pulse and delay signal width from the specific
7.4 MODBUS/TCP Functions
TCP_MODBUS_ReadCoil To read the coil values at a specific range described in
TCP_MODBUS_WriteCoil To write the coil values at a specific range described in
TCP_MODBUS_ReadReg To read the holding register value at a specific range described
TCP_MODBUS_WriteReg To write values to the holding registers at a specific range
63
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
7.5 Function Description
The TCPDAQ.DLL function declarations are all included in following files that are attached with the provided DISC.
♦ TCPDAQ.h: Include file for both VC++ and Borland C++ Builder
♦ TCPDAQ.lib: Library file for VC++
♦ TCPDAQ_BC.lib: Library file for Borland C++ Builder
♦ TCPDAQ.bas : Module file for Visual Basic
♦ TCPDAQ.pas : Module file for Delphi
You need to add the above file into your AP project before using TCPDAQ.DLL functions
7.5.1 TCP_Open
Description: To initiate the TCPDAQ.dll to use.
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Sub TCP_Open Lib "TCPDAQ.dll" Alias "_TCP_Open@0" ()
♦Borland C++ Builder: (see TCPDAQ.h)
int TCP_Open();
♦ Delphi: (see TCPDAQ.pas)
function TCP_Open(); StdCal;
♦VC++: (see TCPDAQ.h)
int TCP_Open();
Parameters: void
Return Code: refer to the Error code.
7.5.2 TCP_Close
Description: To terminates use of the TCPDAQ.dll.
Syntax:
♦Visual Basic: (see TCPDAQ.bas)
Declare Sub TCP_Close Lib "TCPDAQ.dll" Alias "_TCP_Close@0" ()
♦Borland C++ Builder: (see TCPDAQ.h)
int TCP_ Close();
♦Delphi: (see TCPDAQ.pas)
function TCP_ Close(); StdCall;
♦VC++:(see TCPDAQ.h)
int TCP_ Close();
Parameters: void
Return Code: refer to the Error code.
7.5.3 TCP_Connect
Description: to create a Window TCP socket then establishing a connection to a specific EDAM-4200
Syntax:
♦Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_Connect Lib "TCPDAQ.dll" Alias "_TCP_Connect@20" ( ByVal szIP As String, ByVal port As
Integer, ByVal ConnectionTimeout As Long, ByVal SendTimeout As Long, ByVal ReceiveTimeout
As Long) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
int TCP_Connect( char szIP[],u_short port,int ConnectionTimeout, int SendTimeout,int ReceiveTimeout);
int TCP_Connect(char szIP[],u_short port,int ConnectionTimeout, int SendTimeout, int ReceiveTimeout);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
port[in] : the TCP/IP port used by Modbus/TCP, it is 502
ConnectionTimeout[in] : Connection timeout value (msec)
SendTimeout[in] : Send timeout value (msec)
ReceiveTimeout[in] : Receive timeout value (msec)
Return Code: refer to the Error code.
7.5.4 TCP_Disconnect
Description: disconnecting the Window TCP socket from all EDAM-4200 modules
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Sub TCP_Disconnect Lib "TCPDAQ.dll" Alias "_TCP_Disconnect@0" ()
♦Borland C++ Builder: (see TCPDAQ.h)
void TCP_Disconnect(void);
♦ Delphi: (see TCPDAQ.pas)
procedure TCP_Disconnect ; StdCall;
♦ VC++: (see TCPDAQ.h)
void TCP_Disconnect(void);
Parameters: void
Return Code: none.
7.5.5 TCP_ModuleDisconnect
Description: disconnecting the Window TCP socket to a specific EDAM-4200
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ModuleDisconnect Lib "TCPDAQ.dll" Alias "_TCP_ModuleDisconnect@4" (ByVal szIP
As String) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
Int TCP_ModuleDisconnect(char szIP[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_ModuleDisconnect (szIP: PChar): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_ModuleDisconnect(char szIP[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
Return Code: refer to the Error code.
7.5.6 TCP_SendData
Description: to send data to a specific EDAM-4200 module
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_SendData Lib "TCPDAQ.dll" Alias "_TCP_SendData@12" ( ByVal szIP As String,
ByRef pData As Byte, ByVal wDataLen As Integer) As Long
65
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦Borland C++ Builder: (see TCPDAQ.h)
Int TCP_SendData(char szIP[],char *pData,u_short wDataLen);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_SendData (szIP: PChar; pData: PByte; wDataLen: Integer): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_SendData(char szIP[],char *pData,u_short wDataLen);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
pData[in] : 8 bit data array
wDataLen[in] : length of data be sent
Return Code: refer to the Error code.
7.5.7 TCP_RecvData
Description: receive data to a specific EDAM-4200 module
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_RecvData Lib "TCPDAQ.dll" Alias "_TCP_RecvData@12" ( ByVal szIP As String, ByRef pData
As Byte, ByVal wDataLen As Integer) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
Int TCP_RecvData(char szIP[],char *pData,u_short wDataLen);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_RecvData (szIP: PChar; pData: PByte; wDataLen: Integer): Longint; StdCall;
♦VC++:(see TCPDAQ.h)
Int TCP_RecvData(char szIP[],char *pData,u_short wDataLen);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
pData[out] : 8 bit data array
wDataLen [in] : length of data array
Return Code:
If return value >=0, it represents the length of received data
If return value<0, it represents Error code.
7.5.8 TCP_SendReceiveASCcmd
Description: to accept an ASCII format string as a command, and transform it to meet the Modbus/TCP's
specification. Then sending it to EDAM-4200 and receiving the response from EDAM-4200
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_SendReceiveASCcmd Lib "TCPDAQ.dll" Alias "_TCP_SendReceiveASCcmd@12" ( ByVal szIP
As String, ByVal Sendbuf As String, ByVal Recvbuf As String) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
Int TCP_SendReceiveASCcmd(Char szIP[], char Sendbuf [], char Recvbuf []);
♦Delphi: (see TCPDAQ.pas)
Function TCP_SendReceiveasCcmd (szIP: PChar; Sendbuf: PChar; Recvbuf: PChar): Longint; StdCall;
♦VC++: (see TCPDAQ.h)
Int TCP_SendReceiveASCcmd(Char szIP[], char Sendbuf[], char Recvbuf[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
Sendbuf [in] : 8 bit data array to be sent
Recvbuf [out] : 8 bit data array that stored the received data
66
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Return Code: refer to the Error code.
7.5.9 UDP_Connect
Description: to create a Window UDP socket then establishing a connection to a specific EDAM-4200
Syntax:
♦Visual Basic: (see TCPDAQ.bas)
Declare Function UDP_Connect Lib "TCPDAQ.dll" Alias "_UDP_Connect@24" ( ByVal szIP As String, ByVal s_port
As Integer, ByVal d_port As Integer, ByVal ConnectionTimeout As Long, ByVal SendTimeout As Long,
ByVal ReceiveTimeout As Long) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
Int UDP_Connect(char szIP[],u_short s_port,u_short d_port, int ConnectionTimeout,
Int UDP_Connect(char szIP[],u_short s_port,u_short d_port,int ConnectionTimeout,
int SendTimeout,int ReceiveTimeout);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
s_port : source port number
d_port : destination port number
ConnectionTimeout : timeout value for connection (msec)
SendTimeout : timeout value for sending (msec)
ReceiveTimeout : timeout value for receiving (msec)
Return Code: refer to the Error code.
7.5.10 UDP_Disconnect
Description: disconnecting the Window UDP socket from all EDAM-4200 modules
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Sub UDP_Disconnect Lib "TCPDAQ.dll" Alias "_UDP_Disconnect@0" ()
♦Borland C++ Builder: (see TCPDAQ.h)
void UDP_Disconnect(void);
♦Delphi: (see TCPDAQ.pas)
procedure UDP_Disconnect ; StdCall;
♦VC++:(see TCPDAQ.h)
void UDP_Disconnect(void);
Parameters: void
Return Code: None
7.5.11 UDP_ModuleDisconnect
Description: disconnecting the Window UDP socket from a specific EDAM-4200
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function UDP_ModuleDisconnect Lib "TCPDAQ.dll" Alias "_UDP_ModuleDisconnect@4" (ByVal szIP As
String) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
int UDP_ModuleDisconnect(Char szIP[]);
67
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦ Delphi: (see TCPDAQ.pas)
Function UDP_ModuleDisconnect (szIP: PChar): Longint; StdCall;
♦ VC++:(see TCPDAQ.h)
int UDP_ModuleDisconnect(char szIP[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be disconnected
Return Code: refer to the Error code.
7.5.12 UDP_SendData
Description: send data to a specific EDAM-4200 module (Datagram)
Syntax:
♦Visual Basic: (see TCPDAQ.bas)
Declare Function UDP_SendData Lib "TCPDAQ.dll" Alias "_UDP_SendData@12"
(ByVal szIP As String, ByRef pData As Byte, ByVal wDataLen As Integer) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
int UDP_SendData(char szIP[],char *pData,u_short wDataLen);
♦ Delphi: (see TCPDAQ.pas)
Function UDP_SendData (szIP: PChar; pData: PByte; wDataLen: Integer): Longint; StdCall;
♦VC++:(see TCPDAQ.h)
int UDP_SendData(char szIP[],char *pData,u_short wDataLen);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
pData[in] : points to data buffer
wDataLen[in] : length of data be sent
Return Code: refer to the Error code.
7.5.13 UDP_RecvData
Description: receive data to a specific EDAM-4200 module (Datagram)
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function UDP_RecvData Lib "TCPDAQ.dll" Alias "_UDP_RecvData@12"
(ByVal szIP As String, ByRef pData As Byte, ByVal wDataLen As Integer) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
int UDP_RecvData(char szIP[],char *pData,u_short wDataLen);
♦ Delphi: (see TCPDAQ.pas)
Function UDP_RecvData (szIP: PChar; pData: PByte; wDataLen: Integer): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int UDP_RecvData(char szIP[],char *pData,u_short wDataLen);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
pData[out] : 8 bit array that stored the received data
wDataLen [in] : length of received data
Return Code: refer to the Error code.
7.5.14 UDP_SendReceiveASCcmd
Description: send an ASCII format string as a command to EDAM-4200 and receiving the response
from EDAM-4200.
Syntax:
68
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function UDP_SendReceiveASCcmd Lib "TCPDAQ.dll" Alias "_UDP_SendReceiveASCcmd@12"
(ByVal szIP As String, ByVal Txdata As _ String, ByVal Rxdata As String) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
int UDP_SendReceiveASCcmd(char szIP[],char Txdata [],char Rxdata []);
♦ Delphi: (see TCPDAQ.pas)
Function UDP_SendReceiveAsCcmd (szIP: PChar; Txdata:PChar; Rxdata: PChar): Longint; StdCall;
♦VC++:(see TCPDAQ.h)
int UDP_SendReceiveASCcmd(char szIP[],char Txdata [],char Rxdata []);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
Txdata [in] : 8 bit array that stored the data to be sent
Rxdata [out] : 8 bit array that stored the received data
Return Code: refer to the Error code.
7.5.15 TCP_GetModuleIPinfo
Description: return module IP information of a specific module
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_GetModuleIPinfo Lib "TCPDAQ.dll" Alias "_TCP_GetModuleIPinfo@8" (ByVal szIP As String,
ByRef ModuleIP As ModuleInfo) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
Int TCP_GetModuleIPinfo( char szIP[],struct ModuleInfo *ModuleIP);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_GetModuleIPinfo (szIP: PChar; var ModuleIP: TModuleInfo): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_GetModuleIPinfo( char szIP[],struct ModuleInfo *ModuleIP);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
ModuleIP[out] : a structure array that stroes the module IP information
Return Code: refer to the Error code.
7.5.16 TCP_GetModuleID
Description: return ID number of a specific module.
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_GetModuleID Lib "TCPDAQ.dll" Alias "_TCP_GetModuleID@8" (ByVal szIP As String, ByRef
ModuleID As Byte) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
Int TCP_GetModuleID(char szIP[], char * ModuleID);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_GetModuleID(szIP: PChar; ModuleID: PByte): Longint; StdCall;;
♦ VC++: (see TCPDAQ.h)
Int TCP_GetModuleID(char szIP[], char * ModuleID);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
ModuleID [in] : the ID number
Return Code: refer to the Error code.
69
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
7.5.17 TCP_GetIPFromID
Description: get IP address for a specific module ID number. This function is helpful when the module is DHCP
enabled
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_GetIPFromID Lib "TCPDAQ.dll" Alias "_TCP_GetIPFromID@8" (ByVal szID As Byte, ByRef
szIP As String) As Long
♦Borland C++ Builder: (see TCPDAQ.h)
Int TCP_GetIPFromID(u_char szID ,char szIP[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_GetIPFromID(szID: Byte; szIP: PChar): Longint; StdCall;
♦ VC++:(see TCPDAQ.h)
Int TCP_GetIPFromID(u_char szID ,char szIP[]);
Parameters:
szID[in] : module ID number (0~255)
szIP[out] : 8 bit array that stored the IP address string(such as “192.168.0.2”)
Return Code: refer to the Error code.
7.5.18 TCP_ScanOnLineModules
Description: search on-line EDAM900 modules in the same subnet
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ScanOnLineModules Lib "TCPDAQ.dll" Alias "_TCP_ScanOnLineModules@8" (ModuleIP As
ModuleInfo, ByVal Sortkey As Byte) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_ScanOnLineModules( struct ModuleInfo ModuleIP[], u_char SortKey);
♦ Delphi: (see TCPDAQ.pas)
Function Scan_OnLineModules (var ModuleIP: TModuleInfo; Sortkey: Byte): Longint; StdCall;
♦ VC++:(see TCPDAQ.h)
Int TCP_ScanOnLineModules( struct ModuleInfo ModuleIP[], u_char SortKey);
Parameters:
ModuleIP[out] : points to ModuleInfo structure array
SortKey[in] : sortkey word (by IP address,by ID number, or by Module no)
=SORT_MODULE_IP ,sort by IP address
=SORT_MODULE_ID ,sort by ID number
=SORT_MODULE_NO ,sort by module number
Return Code: refer to the Error code.
7.5.19 TCP_GetDLLVersion
Description: return the version number of TCPDAQ.dll
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_GetDLLVersion Lib "TCPDAQ.dll" Alias "_TCP_GetDLLVersion@0" () As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_GetDLLVersion(void);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_GetDLLVersion: Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_GetDLLVersion(void);
70
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Parameters: void
Return Code: the version number.
7.5.20 TCP_GetModuleNo
Description: return the module name of a specific IP address
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_GetModuleNo Lib "TCPDAQ.dll" Alias "_TCP_GetModuleNo@8" _
(ByVal szIP As String, ByRef Mname As Byte) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_GetModuleNo(char szIP[], char Mname[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_GetModuleNo (szIP: PChar; Mname: PByte): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_GetModuleNo(char szIP[], char Mname[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
Mname[out] : 8 bit array that stored the module name string
Return Code: refer to the Error code.
7.5.21 TCP_GetLastError
Description: return the error code of the latest called function
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_GetLastError Lib "TCPDAQ.dll" Alias "_TCP_GetLastError@0" () As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_GetLastError(void);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_GetLastError: Longint ; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_GetLastError(void);
Parameters: void
Return Code: refer to the Error code
7.5.22 TCP_PingIP
Description: ping to remote IP address
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_PingIP Lib "TCPDAQ.dll" Alias "_TCP_PingIP@8" (ByVal IPadr As String, ByVal PingTimes As
Integer) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_PingIP(char szIP[],int PingTimes);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_PingIP(szIP: PChar;PingTimes: Integer): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_PingIP(char szIP[],int PingTimes);
Parameters:
71
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
szIP[in] : the IP address for an EDAM-4200 that to be connected
PingTimes [in] :Timeout value
Return Code: = -1, no response from remote IP
>0, response time from remote IP
7.5.23 TCP_StartStream
Description:to instruct the PC to start to receive stream data that coming from EDAM-4200
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_StartStream Lib "TCPDAQ.dll" Alias "_TCP_StartStream@8" (ByVal IP As String, ByVal
EventFromApp As Long) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_StartStream(char szIP[],HANDLE EventFromApp);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_StartStream (szIP: PChar; EventFromApp: Longint): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_StartStream(char szIP[],HANDLE EventFromApp);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
EventFromApp : event handle (be signaled, when stream data arrived)
Return Code: refer to the Error code.
7.5.24 TCP_StopStream
Description: to instruct the PC to stop receiving stream data from all modules.
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_StopStream Lib "TCPDAQ.dll" Alias "_TCP_StopStream@0" () As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_StopStream(void);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_StopStream: Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_StopStream(void);
Parameters: void
Return Code: refer to the Error code.
7.5.25 TCP_ReadStreamData
Description: to read stream data that coming from the specific EDAM-4200
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ReadStreamData Lib "TCPDAQ.dll" Alias "_TCP_ReadStreamData@8" (ByVal szIP As String,
ByRef lpData As StreamData) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_ReadStreamData (char szIP[], struct _StreamData *lpData);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_ReadStreamData (szIP: PChar; Var lpData: TStreamData): integer; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_ReadStreamData (char szIP[], struct _StreamData *lpData);
72
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
lpData[out] : points to stream data structure that stored the stream data
Return Code: refer to the Error code.
7.5.26 TCP_StartEvent
Description: to start listening the alarm event trigger
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_StartEvent Lib "TCPDAQ.dll" Alias "_TCP_StartEvent@8" (ByVal IPadr As String, ByVal
EventFromApp As Long) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_StartEvent(char szIP[],HANDLE EventFromApp);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_StartEvent(szIP: PChar; EventFromApp: Longint): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_StartEvent(char szIP[],HANDLE EventFromApp);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
EventFromApp : event handle (be signaled, when alarm event occured)
Return Code: refer to the Error code.
7.5.27 TCP_StopEvent
Description: to stop listening the alarm event trigger from all module
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_StopEvent Lib "TCPDAQ.dll" Alias "_TCP_StopEvent@0" () As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_StopEvent(void);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_StopEvent: Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_StopEvent(void);
Parameters: void
Return Code: refer to the Error code.
7.5.28 TCP_ReadEventData
Description: to read triggered alarm event message
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ReadEventData Lib "TCPDAQ.dll" Alias "_TCP_ReadEventData@8" (ByVal szIP As String,
ByRef lpData As AlarmData) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_ReadEventData (char szIP[], struct _AlarmInfo *lpData);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_ReadEventData (SzIP: PChar; Var lpData: TEventInfo): integer; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_ReadEventData (char szIP[], struct _AlarmInfo *lpData);
73
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
lpData[out] : points to alarm event data structure that stored event message (ref. to TCPDAQ.H)
Return Code: refer to the Error code.
7.5.29 TCP_ReadDIOMode
Description:to read the mode of D/I & D/O channels of an EDAM-4200 module.
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ReadDIOMode Lib "TCPDAQ.dll" Alias "_TCP_ReadDIOMode@12" _
(ByVal szIP As String, ByRef DImode As Byte, ByRef DOmode As Byte) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_ReadDIOMode(char szIP[],u_char DImode[],u_char DOmode[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_ReadDIOMode (szIP: PChar; DImode: PByte; DOmode: PByte): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_ReadDIOMode(char szIP[],u_char DImode[],u_char DOmode[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
DImode[out] : an 8 bit array that stored the DI channel mode
DOmode[out] : an 8 bit array that stored the DO channel mode
Return Code: refer to the Error code.
7.5.30 TCP_ReadDIO
Description:to read DI/DO's status for an EDAM-4200 module
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ReadDIO Lib "TCPDAQ.dll" Alias "_TCP_ReadDIO@12" _
(ByVal szIP As String, ByRef ByDi As Byte, ByRef ByDo As Byte) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_ReadDIO(char szIP[],u_char byDI[],u_char byDO[] );
♦ Delphi: (see TCPDAQ.pas)
Function TCP_ReadDIO (szIP: PChar; ByDi: PByte; ByDo: PByte): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_ReadDIO(char szIP[],u_char u_byDI[],u_char byDO[] );
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
byDI[out] : an 8 bit array that stored the DI channel status (ex: byDI[0]= 0 → DI channel 0 = 0)
byDO[out] : an 8 bit array that stored the DO channel status (ex: byDO[3] = 1 → channel 3 = 1)
Return Code: refer to the Error code.
7.5.31 TCP_ReadDISignalWidth
Description:to read the minimal high/low signal width of all D/I channels
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ReadDISignalWidth Lib "TCPDAQ.dll" Alias "_TCP_ReadDISignalWidth@12" (ByVal szIP As
String, ByRef ulLoWidth As Long, ByRef ulHiWidth As Long) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_ReadDISignalWidth(char szIP[],u_long ulLoWidth[],u_long ulHiWidth[]);
74
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦ Delphi: (see TCPDAQ.pas)
Function TCP_ReadDISignalWidth (szIP: PChar; var ulLoWidth:array of Longword; var ulHiWidth:array of
Longword): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_ReadDISignalWidth(char szIP[],u_long ulLoWidth[],u_long ulHiWidth[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
ulLoWidth[out] : an 32 bit array that stored channel low width value
ulHiWidth[out] : an 32 bit array that stored channel high width value
Return Code: refer to the Error code.
7.5.32 TCP_WriteDISignalWidth
Description: to set the minimal high/low signal width of all D/I channels
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_WriteDISignalWidth Lib "TCPDAQ.dll" Alias "_TCP_WriteDISignalWidth@12" (ByVal szIP As
String, ByRef ulLoWidth As Long, ByRef ulHiWidth As Long) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_WriteDISignalWidth(char szIP[],u_long ulLoWidth[],u_long ulHiWidth[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_WriteDISignalWidth(szIP: PChar; var ulLoWidth:array of Longword; var ulHiWidth:array of
Longword): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_WriteDISignalWidth(char szIP[],u_long ulLoWidth[],u_long ulHiWidth[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
ulLoWidth[in] : an unsigned 32 bits array that stored the minimal low signal width for
each D/I channel. The unit is 0.5 mSec
ulHiWidth[in] : an unsigned 32 bits array that stored the minimal high signal width for
each D/I channel. The unit is 0.5 mSec
Return Code: refer to the Error code.
7.5.33 TCP_ReadDICounter
Description:to read the counter value of all D/I channels (the counter value is available only for channel that
functions in 'Counter' mode
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ReadDICounter Lib "TCPDAQ.dll" Alias "_TCP_ReadDICounter@8"
(ByVal szIP As String, ByRef ulCounterValue As Long) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_ReadDICounter(Char szIP[],u_long ulCounterValue[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_ReadDICounter (szIP: PChar; var ulCounterValue:array of Longword): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_ReadDICounter(Char szIP[],u_long ulCounterValue[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
ulCounterValue[out] :an unsigned 32 bits array that stored the counter value for
each D/I channel
75
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Return Code: refer to the Error code.
7.5.34 TCP_ClearDICounter
Description: to clear the counter value when a D/I channel function in 'Counter' mode
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ClearDICounter Lib "TCPDAQ.dll" Alias "_TCP_ClearDICounter@8"
(ByVal szIP As String, ByVal wChno As Integer) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_ClearDICounter(char szIP[],u_short wChNo);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_ClearDICounter (szIP: PChar; wChno: Integer): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_ClearDICounter(char szIP[],u_short wChNo);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wChNo[in] : the D/I channel to be cleared.
Return Code: refer to the Error code.
7.5.35 TCP_StartDICounter
Description: to start the counting when a D/I channel function as 'Counter' mode
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_StartDICounter Lib "TCPDAQ.dll" Alias "_TCP_StartDICounter@8" (ByVal szIP As String,
ByVal wChno As Integer) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_StartDICounter(Char szIP[],u_short wChNo);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_StartDICounter (szIP: PChar; wChno: Integer): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_StartDICounter(Char szIP[],u_short wChNo);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wChNo[in] : the channel number that is enabled to count
Return Code: refer to the Error code.
7.5.36 TCP_StopDICounter
Description:to stop the counting when a D/I channel function as 'Counter' mode
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_StopDICounter Lib "TCPDAQ.dll" Alias "_TCP_StopDICounter@8"
(ByVal szIP As String, ByVal wChno As Integer) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_StopDICounter(char szIP[],u_short wChNo);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_StopDICounter (szIP: PChar; wChno: Integer): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_StopDICounter(char szIP[],u_short wChNo);
76
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wChNo[in] : the channel number that is disabled to count
Return Code: refer to the Error code.
7.5.37 TCP_ClearDILatch
Description: to clear the latch when a D/I channel function as 'Lo to Hi Latch' or 'Hi to Lo Latch’
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ClearDILatch Lib "TCPDAQ.dll" Alias "_TCP_ClearDILatch@8" (ByVal szIP As String, ByVal
wChno As Integer) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_ClearDILatch(char szIP[],u_short wChNo);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_ClearDILatch(szIP: PChar; wChno: Integer): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_ClearDILatch(char szIP[],u_short wChNo);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wChNo[in] : the channel number that latch status is cleared
Return Code: refer to the Error code.
7.5.38 TCP_ReadDILatch
Description:to read the DI latch status when a D/I channel function in 'Lo to Hi Latch' or 'Hi to Lo Latch’
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_ReadDILatch Lib "TCPDAQ.dll" Alias "_TCP_ReadDILatch@8" (ByVal szIP As String, ByRef
wLatch As Byte) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_ReadDILatch(char szIP[],u_char wLatch[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_ReadDILatch (szIP: PChar; wLatch: PByte): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_ReadDILatch(char szIP[],u_char wLatch[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wLatch[out] : an unsigned 8 bits array that stored the latch stsatus for each D/I channel
Return Code: refer to the Error code.
7.5.39 TCP_WriteDO
Description:to write some value to D/O channels for an EDAM-4200 module
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_WriteDO Lib "TCPDAQ.dll" Alias "_TCP_WriteDO@16" _
ByVal szIP As String, ByVal wStartDO As Integer, ByVal wCount As Integer,
ByRef ByDo As Byte) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_WriteDO(Char szIP[], u_short wStartDO, u_short wCount,u_char byDO[]);
77
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
♦ Delphi: (see TCPDAQ.pas)
Function TCP_WriteDO(szIP: PChar; wStartDO: Integer; wCount: Integer;ByDo: PByte): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_WriteDO(Char szIP[], u_short wStartDO, u_short wCount,u_char byDO[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wStartDO[in] : the starting channel that to be written.
wCount[in] : how many channels to be written.
byDO[in] : an 8 bit array that stored the values that written to the connected EDAM-4200
Return Code: refer to the Error code.
7.5.40 TCP_WriteDOPulseCount
Description:to write the pulse output count for EDAM-4200 DIO modules during runtime
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_WriteDOPulseCount Lib "TCPDAQ.dll" Alias _ "_TCP_WriteDOPulseCount@12" (ByVal szIP
As String, ByVal wDoChannel As Integer, ByVal ulPulseCount As Long) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_WriteDOPulseCount(char szIP[],u_short wDoChannel,u_long ulPulseCount);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_WriteDOPulseCount(szIP: PChar; wDoChannel: Integer; ulPulseCount: Longint): Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_WriteDOPulseCount(char szIP[],u_short wDoChannel,u_long ulPulseCount);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wDoChannel[in] : the channel index for writing
ulPulseCount[in] : the pulse output count.
Return Code: refer to the Error code.
7.5.41 TCP_WriteDODelayWidth
Description:to set the pulse and delay signal widths to specific EDAM-4200 DIO modules
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_WriteDODelayWidth Lib "TCPDAQ.dll" Alias "_TCP_WriteDODelayWidth@24" (ByVal szIP
As String, ByVal wChno As Integer, ByVal ulLoPulseWidth As Long, ByVal ulHiPulseWidth As Long,
ByVal ulLoDelayWidth As Long, ByVal ulHiDelayWidth As Long) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_WriteDODelayWidth(Char szIP[], u_short wChno,u_long ulLoPulseWidth,u_long ulHiPulseWidth,
u_long ulLoDelayWidth,u_long ulHiDelayWidth);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_WriteDODelayWidth (szIP: PChar; wChno: Integer; ulLoPulseWidth: Longint; ulHiPulseWidth:
int TCP_ReadDODelayWidth(char szIP[],u_short wChno, u_long *ulLoPulseWidth,lu_long *ulHiPulseWidth,
u_long *ulLoDelayWidth,u_long *ulHiDelayWidth);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wChno[in] : the channel index for reading
ulLoPulseWidth[out] : the pulse output signal width at low level
ulHiPulseWidth[out] : the pulse output signal width at high level
ulLoDelayWidth[out] : the delay output signal width at low level
ulHiDelayWidth) [out]: the delay output signal width at high level
Return Code: refer to the Error code.
7.5.43 TCP_MODBUS_ReadCoil
Description: to read the coil values at a specific range described in parameters
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_MODBUS_ReadCoil Lib "TCPDAQ.dll" Alias "_TCP_MODBUS_ReadCoil@16"
(ByVal szIP As String, ByVal wStartAddress As Integer, ByVal wCount As Integer,
ByRef DATA As Byte) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_MODBUS_ReadCoil(char szIP[],u_short wStartaddress,u_short wCount,u_char byData[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_MODBUS_ReadCoil (szIP: PChar; wStartAddress: Integer; wCount: Integer; Data: PByte):
Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_MODBUS_ReadCoil(char szIP[],u_short wStartAddress,u_short wCount,u_char byData[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wStartAddress[in] : start address of coil registers (1 ~ 255)
wCount[in] : the count that coil data be read
byData[in] : the 8 bit array that stored the coil data (0=set, 1=reset)
79
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Return Code: refer to the Error code.
7.5.44 TCP_MODBUS_WriteCoil
Description:to write the coil values at a specific range described in parameters.
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_MODBUS_WriteCoil Lib "TCPDAQ.dll" Alias "_TCP_MODBUS_WriteCoil@16"
(ByVal szIP As String, ByVal wStartAddress As Integer, ByVal wCount As Integer,
ByRef DATA As Byte) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
int TCP_MODBUS_WriteCoil(char szIP[],u_short wStartAddress,u_short wCount,u_char byData[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_MODBUS_WriteCoil(szIP: PChar; wStartAddress: Integer; wCount: Integer; Data: PByte):
Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
int TCP_MODBUS_WriteCoil(char szIP[],u_short wStartAddress,u_short wCount,u_char byData[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wStartAddress[in] : start address of coil registers (1 ~ 255)
wCount[in] : the count that coil data be written
byData[in] : the 8 bit array that stored the coil data (0=set, 1=reset)
Return Code: refer to the Error code.
7.5.45 TCP_MODBUS_ReadReg
Description: to read the holding register value at a specific range described in parameters
Syntax:
♦ Visual Basic: (see TCPDAQ.bas)
Declare Function TCP_MODBUS_ReadReg Lib "TCPDAQ.dll" Alias "_TCP_MODBUS_ReadReg@16"
(ByVal szIP As String, ByVal wStartAddress As Integer, ByVal wCount As Integer,
ByRef DATA As Integer) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_MODBUS_ReadReg(char szIP[],u_short wStartAddress,u_short wCount,u_short wData[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_MODBUS_ReadReg (szIP: PChar; wStartAddress: Integer; wCount: Integer; Data: PWord):
Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_MODBUS_ReadReg(char szIP[],u_short wStartAddress,u_short wCount,u_short wData[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wStartAddress[in] : start address of holding registers (1 ~ 255)
wCount[in] : the count that holding data be read
byData[in] : the 16 bit array that stored the holding data
Return Code: refer to the Error code.
7.5.46 TCP_MODBUS_WriteReg
Description:to write values to the holding registers at a specific range described in parameters
Syntax:
♦Visual Basic: (see TCPDAQ.bas)
80
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Declare Function TCP_MODBUS_WriteReg Lib "TCPDAQ.dll" Alias "_TCP_MODBUS_WriteReg@16"
(ByVal szIP As String, ByVal wStartAddress As Integer, ByVal wCount As Integer,
ByRef DATA As Integer) As Long
♦ Borland C++ Builder: (see TCPDAQ.h)
Int TCP_MODBUS_WriteReg(char szIP[],u_short wStartAddress,u_short wCount,u_short wData[]);
♦ Delphi: (see TCPDAQ.pas)
Function TCP_MODBUS_WriteReg(szIP: PChar; wStartAddress: Integer; wCount: Integer; Data: PWord):
Longint; StdCall;
♦ VC++: (see TCPDAQ.h)
Int TCP_MODBUS_WriteReg(char szIP[],u_short wStartAddress,u_short wCount,u_short wData[]);
Parameters:
szIP[in] : the IP address for an EDAM-4200 that to be connected
wStartAddress[in] : start address of holding registers (1 ~ 255)
wCount[in] : the count that holding data be read
byData[in] : the 16 bit array that stored the holding data
Return Code: refer to the Error code.
81
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Chapter 8ASCII Commands for EDAM-4200 Modules
8.1 About ASCII Commands
For users do not familiar to Modbus protocol, Inlog offers a function library as a protocol translator, integrating
ASCII command into Modbus/TCP structure. Therefore, users familiar to ASCII command can access EDAM-4200
easily. Before explaining the structure of ASCII command packed with Modbus/TCP format. Let’s see how to use an
ASCII command and how many are available for your program.
EDAM-4200 series also integrate ASCII command into UDP protocol with port 1025. User can simply send the
Command of ASCII format through UDP protocol (such as UPD_send (Dest_IP, “$01M”) ).
8.2 Syntax of ASCII
Command Syntax: [delimiter character][address][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 specific the module and channel.
Depending on the command, an optional data segment may follow the command string. An optional two-character
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 five categories:
♦ System Command Set
♦ Analog Input Command Set
♦ Analog Input Alarm Command Set
♦ Universal I/O Command Set
♦ Digital I/O 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.
Note: All commands should be issued in UPPERCASE characters only!
82
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Command
Function
Description
Modules
Pg.
$AAM
Read Module Name
Returns the module name from a specific
module
All
86
$AAF
Read Firmware Version
Returns the firmware version from a specific
module.
All
87
$AAID
Read module ID
Read user define module address(ID)
88
$AAIDFF
Set Module ID number
Set user define module address(ID)
(for tcpdaq.dll device driver).
All
$AAMD(data)
Write module description
Write module description(max 30 characters)
All
$AAMD
Read module description
Read module description
All
91
$AAS1
Reloads the module
factory default
Reloads the module factory default
All
92
value
$AARS
Reboot the module
Reboot the module to the power-on state
All
95
$AA5
Reads the Reset Status of a
module
Reads the Reset Status of a module
All
96
~AADNNNNN
Set timout to search DHCP
Set timout to search DHCP
All
97
~AAD
Read timout to search
DHCP
Read timout to search DHCP
All
98
^AAMAC
Read MAC address
Read MAC address
All
99
channel N
$AACONN
Read a single DO mode
for channel N
Read a single DO mode for channel N
All
101
$AACINNDD
Set a single DI mode for
channel N
Set a single DI mode for channel N
All
102
$AACINN
Read a single DI mode
for channel N
Read a single DI mode for channel N
All
103
~AADSMN
Set DI/O active state
Set digital input/output active state
All
104
~AADS
Read DI/O active state
Read digital input/output active sta te
All
105
$AA6
Read DI/O Channel
Read the status of all DI(0~15) and DO(0~15)
All
106
@AA
Read DI/O Status
Read the status of all DI(0~15) and DO(0~15)
All
107
#AA00DD
Write DO channels(0~7)
Write a value to digital output channels(0~7)
All
108
#AA1NDD
Set a single DO channel
Set a single digital output channel
All
109
@AA6DDDD
Write DO channels
Write a value to digital output channels(0~15)
All
110
@AA6ONSS
Set a single DO channel
Set a single digital output channel(0~1 5)
All
111
@AA6ON
Read single digital
Read a single digital output for channel (0~15)
All
112
8.3 ASCII Command Set
8.3.1 General commands
(for tcpdaq.dll driver)
All
89
90
~AAI Soft INIT* command
(Enable)
~AATNN Sets the soft INIT* timeout
Soft INIT* command (Enable)
Sets the soft INIT* timeout value All 94
All 93
8.3.2 Digital I/O commands
Command Function Description Modules Pg.
$AACONNDD Set a single DO mode for
Set a single DO mode for channel N All 100
Status
channels. (Same as “@AA”)
channels. (Same as “@AA6”)
83
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
output for channel N
@AA6
Read the status of all
DIO channels
Read the status of all DIO(0~15) channels.
All
113
input for channel N
$AA7
Read DI latch status
Read DI latch status
All
115
$AACLSNN
Clear DI latch status
Clear DI latch status for channe l N
All
116
DI match DO latch
DI match DO latch mode
Remote DO channel )
Remote DO channel )
(for DIO sync. mode)
synchronize
parameters
status
$AAYMPN
Read DO Sync. remote
device IP for DO ch. N
Read remote device IP for DO channel N
(for DIO sync. mode)
All
123
#AA2NPPPPPPPP
Write DO pulse counts
Write DO pulse counts to the specific DO
channel (For High/Low delay mode)
All
124
$AA9PNNLLLL
HHHH
Set DO pulse low/high
width for channel N
Set DO pulse low/high width for channel N.
(For High/Low delay mode)
All
125
$AA9NN
Read DO pulse low/high
Read DO pulse low/high width and DO
Auto-Off Time Mode )
All
126
$AA9DNNHHHH
Set DO low/high delay
Set DO Low/high delay output width for
Auto-Off Time Mode )
All
127
@AA6IN Read a sin gle d igital
Read a single digital input for channel ( 0~15) All 114
8.3.3 DIO Synchronization Mode(Mirror Local DI to Local /Remote DO) Commands
Command Function Description Modules Pg.
$AAYM5CRPS
TTTT (data)
$AAYM6CRPS
TTTT (data)
$AAYMNDDDD
DDDD
$AAYMRCS Sta rt(Run)/Stop DIO
$AAYM4C Read DIO Sync. Mode
$AAYMS Read DIO Sync. DO active
Set
mode of DIO Sync.
Set DI mismatch DO latch
mode of DIO Sync.
Set remote device IP for
DO channel N
Set
( For Mirror Local DI to Local DO channel &
Set DI mismatch DO latch mode forDIO Sync.
( For Mirror Local DI to Local DO channel &
Set remote device IP for DO channel N
(for DIO sync. mode)
Start(Run)/Stop DIO sync. oper a tion All 121
Read DIO Sync. Mode parameters All 120
Read DIO Sync. DO active status All 122
of DIO Sync.
All 117
All 118
All 119
8.3.4 DO Pulse Output mode & Digital output Auto-Off Time mode commands
Command Function Description Modules Pg.
width for channel N
LLLL
width for channel N
Low/high delay output width for ch. N,
( For High/Low delay mode and Digital output
channel N (00~15), unit: 0.5ms.
( For High/Low delay mode and Digital output
84
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Command
Function
Description
Modules
Pg.
(No reply from modbus response
~AA**
Host ok
host ok. Refresh WDT counter of the specific
module (Response : !01)
All
136
~AA0
Read host watchdog
Read host watchdog timeout sta tus.
bit(2) - watchdog timeout(1) status)
All
137
~AA1
Reset host watc hd og
timeout status
Reset host watchdog timeout status
All
138
Timeout value .
(0.1sec)
~AA3EVVV
Set Host watchdog timeout
interval.
Enable Host watchdog and set timeout interval
(unit=0.1sec)
All
140
~AA4V
Read the power-on DO
of a module
Read the power-on DO value or the safe DO
All
142
~AA5V
Sets the current value as
the safe DO value
Sets the current value as the power-on DO
All
143
~AA3PPP
Set module Power-on
delay time.
Set module Power-on delay time (unit=0.1sec)
to start host communication timeout watchdog
All
144
~AA3P
read module Power-on
Read module Power-on delay time
timeout watchdog
All
145
Command
Function
Description
Modules
Pg.
$AA0MCC
Read DI counter filter
(debounce time)
Read DI counter pre-debounce and
post-debounce of channel N (unit = 0.5ms)
4251
129
$AA0MCC
(data1)(data2)
Set DI counter filter
(debounce time)
Set DI counter pre-debounce and
post-debounce of channel N (unit = 0.5ms)
Except
4251
130
$AAECN
Start/Stop DI counter
Start/Stop counter of the specific DI channel.
All
131
$AACN
Clear DI counter
Clear DI counter of the specific DI channel.
All
132
#AAN
Read DI counter
Read counter value of the specific DI channel.
All
133
#AARN
Read DI counter with
overflow
Read a single DI channel counter with
overflow.
All
134
8.3.5 Digital Input Counter commands
All Except
8.3.6 WatchDog commands
~** Host ok host ok. Refre sh WDT counte r of all modules
via broadcast,
timeout status
~AA2 Read host communication
value or the safe DO value
the power-on DO value or
delay time
bit(7) - watchdog Enable/Disable,
Read host communication Timeout value.
value of a module
value or the safe DO value
(unit=0.1sec) to start host communica tion
All 135
All 139
85
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Read the module name
Command:
$AAM[CHK](cr)
$
Command leading code
AA
Module address ID (01 to FF , Always 01)
M
Command for Read Module Name
CHK
Check sum
(cr)
Carriage return
!AA(data)[CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
(data)
A string showing the name of the module (max. 8 chars.)
CHK
Check sum
(cr)
Carriage return
8.4 ASCII Command Description
8.4.1 $AAM Read Module Name
Syntax:
Response:
Example:
The command requests the system at address 01h to send its module name. The system at address 01h
responds with module name 9050A indicating that there is an EDAM-9050A at address 01h.
Command: $01M(cr)
Response: !019050A(cr)
86
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Returns the firmware version from a specific module.
Command:
$AAF[CHK](cr)
$
Command leading code
AA
Module address ID (01 to FF , Always 01)
F
is the Firmware Version command
CHK
Check sum
(cr)
Carriage return
!AA(data)[CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
(data)
A string showing the firmware version of the module (max. 6 chars.)
CHK
Check sum
(cr)
Carriage return
8.4.2 $AAF Read Firmware Version
Syntax:
Response:
Example:
The command requests the system at address 01h to send its firmware version. The system responds with
firmware version 6.080
Command: $01F(cr)
Response: !01 6.080 (cr)
87
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Read user define module address(ID). (for tcpdaq.dll device driver)
Command:
$AAID[CHK](cr)
$
Command leading code
AA
Module address ID (01 to FF , Always 01)
ID
is the ID command.
CHK
Check sum
(cr)
Carriage return
!AANN[CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
NN
represents the ID number of the module.
CHK
Check sum
(cr)
Carriage return
8.4.3 $AAID Read module ID number
Syntax:
Response:
Example:
The command requests the system at address 01h to send its ID number. The system responds with ID number
10(0AH).
Command: $01ID (cr)
Response: !010A (cr)
Related command: $AAIDFF
88
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Set user define module address(ID) (for tcpdaq.dll device driver)
Command:
$AAIDFF[CHK](cr)
$
Command leading code
AA
Module address ID (01 to FF , Always 01)
ID
is the ID command.
FF
Module address (range 01-FF)
CHK
Check sum
(cr)
Carriage return
!AA[CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
CHK
Check sum
(cr)
Carriage return
8.4.4 $AAIDFF Set module ID number
Syntax:
Response:
Example:
The command Sets the ID of the module 01 to be “1A " and returns a valid response.
Command: $01ID1A (cr)
Response: !01 (cr)
Related command: $AAID
89
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Set module description
Command:
$AAMD(data)[CHK](cr)
$
Command leading code
AA
Module address ID (01 to FF , Always 01)
MD
Set module description command.
(data)
module description (max 30 characters)
CHK
Check sum
(cr)
Carriage return
!AA[CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
CHK
Check sum
(cr)
Carriage return
8.4.5 $AAMD(data) Set module description
Syntax:
Response:
Example:
Set the desc. of the module 01 to be “12DI8DO " and returns a valid response.
Command: $01MD12DI8DO(cr)
Response: !01 (cr)
Related command: $AAMD
90
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Read module description
Command:
$AAMD [CHK](cr)
$
Command leading code
AA
Module address ID (01 to FF , Always 01)
MD
Set module description command.
CHK
Check sum
(cr)
Carriage return
!AA(data)[CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
(data)
module description (max 30 characters)
CHK
Check sum
(cr)
Carriage return
8.4.6 $AAMD Read module description
Syntax:
Response:
Example:
Set the desc. of the module 01 to be “12DI8DO " and returns a valid response.
Command: $01MD12DI8DO(cr)
Response: !01 (cr)
Related command: $AAMD(data)
91
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Reloads the module factory default
Command:
$AAS1 [CHK](cr)
$
Command leading code
AA
Module address ID (01 to FF , Always 01)
S1
command to reload the factory default.
CHK
Check sum
(cr)
Carriage return
!AA [CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
CHK
Check sum
(cr)
Carriage return
8.4.7 $AAS1 Reloads the module factory default
Syntax:
Response:
Note: Before the command is issued, The Soft INIT* switch should be set to enable via
“set the soft INIT* “ command. (ref. ~AAI, ~AATnn)
Example :
(1) Sets the soft INIT* timeout value of module 01 to 32 seconds and returns a valid response.
Command: ~01T32(cr)
Response: !01(cr)
(2) Sets the soft INIT* enable and returns a valid response.
Command: ~01I(cr)
Response: !01(cr)
(3) Reloads the module factory default
Command: $01S1(cr)
Response: !01(cr)
Related command: ~AATnn, ~AAI
92
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
The Soft INIT* command is used to enable modification of the IP, Gateway and communication
protocol settings using software only.
Command:
~AAI [CHK](cr)
~
Command leading code
AA
Module address ID (01 to FF , Always 01)
I
command to set the Soft INIT* enable
CHK
Check sum
(cr)
Carriage return
!AA [CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
CHK
Check sum
(cr)
Carriage return
8.4.8 ~AAI Set the Soft INIT*
Syntax:
Response:
Example :
1. Sets the soft INIT* timeout value of module 01 to 16 seconds and returns a valid response.
Command: ~01T10(cr)
Response: !01(cr)
2. Sets the soft INIT* enable and returns a valid response.
Command: ~01I(cr)
Response: !01(cr)
3. Reloads the module factory default
Command: $01S1(cr)
Response: !01(cr)
Related command: ~AATnn, $AAS1
93
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
The Soft INIT* command is used to enable modification of the IP, Gateway and communication
protocol settings using software only.
Command:
~AATNN [CHK](cr)
~
Command leading code
AA
Module address ID (01 to FF , Always 01)
T
command to Sets the soft INIT* timeout value
NN
Two hexadecimal digits representing the timeout value in seconds. The
CHK
Check sum
(cr)
Carriage return
!AA [CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
CHK
Check sum
(cr)
Carriage return
8.4.9 ~AATNN Sets the soft INIT* timeout value
Syntax:
maximum timeout value is 60 seconds. When changing the IP or Gateway
settings without altering the INIT* slide switch, the ~AAI and (or $AAS1)
commands should be sent consecutively and the time interval between the
two commands should be less than the soft INIT* timeout. If the soft INIT*
timeout is 0, then the IP and Gateway settings cannot be changed using
software only. The power-on reset value of the soft INIT timeout is 0.
Response:
Example :
1. Sets the soft INIT* timeout value of module 01 to 16 seconds and returns a valid response.
Command: ~01T10(cr)
Response: !01(cr)
2. Sets the soft INIT* enable and returns a valid response.
Command: ~01I(cr)
Response: !01(cr)
3. Reloads the module factory default
Command: $01S1(cr)
Response: !01(cr)
Related command: ~AAI, $AAS1
94
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Reboot the module to the power-on state
Command:
$AARS [CHK](cr)
$
Command leading code
AA
Module address ID (01 to FF , Always 01)
RS
command to reboot the module to the power-on state
CHK
Check sum
(cr)
Carriage return
!AA [CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
CHK
Check sum
(cr)
Carriage return
8.4.10 $AARS Reboot the module to the power-on state
Syntax:
Response:
Example:
command: $01RS(cr)
response: !01(cr) ; Reboot the module to the power-on state.
Related command: $AA5
95
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Reads the Reset Status of a module
Command:
$AA5 [CHK](cr)
$
Command leading code
AA
Module address ID (01 to FF , Always 01)
5
Command for read reset status
CHK
Check sum
(cr)
Carriage return
!AAS [CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
S the Reset Status of a module.
= 1 - the module is been reseted.
CHK
Check sum
(cr)
Carriage return
8.4.11 $AA5 Reads the Reset Status of a module
Syntax:
Response:
= 0 - the module is not been reseted.
Example 1:
command: $015(cr)
response: !011(cr); the module is been reseted
Example 2:
command: $015(cr)
response: !010(cr); the module is not been reseted
Related command: $AARS
96
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Set timout to search DHCP
Command:
~AADNNNNN [CHK](cr)
~
Command leading code
AA
Module address ID (01 to FF , Always 01)
D
is set DHCP search timeout command.
NNNNN
DHCP timeout value (10~1800 sec, dec)
CHK
Check sum
(cr)
Carriage return
!AA [CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
CHK
Check sum
(cr)
Carriage return
8.4.12 ~AADNNNNN Set timout to search DHCP
Syntax:
Response:
Example:The command set timeout value to search DHCP servo. If there is no DHCP exist and timeout reached,
the module will reboot and use static (Fixed) IP assigned by E9KUtiliy.exe
command: ~01D01200(cr)
response: !01(cr)
Related command: ~AAD
97
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Set timout to search DHCP
Command:
~AAD [CHK](cr)
~
Command leading code
AA
Module address ID (01 to FF , Always 01)
D
is read DHCP search timeout command.
CHK
Check sum
(cr)
Carriage return
!AANNNNN,D [CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
NNNNN
DHCP timeout value (10~1800 sec, dec)
,
Delimiter for DHCP IP OK
D DHCP IP OK,
= 0 - none
CHK
Check sum
(cr)
Carriage return
8.4.13 ~AAD Read timout to search DHCP
Syntax:
Response:
= 1 - DHCP IP OK, otherwise
Example:
The command read timeout is 1200 seconds and None DHCP IP.
command: ~01D(cr)
response: !0101200,0(cr)
Related command: ~AADNNNNN
98
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Read MAC address
Command:
^AAMAC [CHK](cr)
^
Command leading code
AA
Module address ID (01 to FF , Always 01)
MAC
ccommand for read MAC address
CHK
Check sum
(cr)
Carriage return
!AAMMMMMM
MMMMMM [CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
MMMMMMMMMMMM
MAC address(hex)
CHK
Check sum
(cr)
Carriage return
8.4.14 ^AAMAC Read MAC address
Syntax:
Response:
Example:
command: ^01MAC(cr)
response: !0100E04C360629(cr) ; MAC Address: 00E04C360629
99
Printed Date: 27 February 2018
EDAM-4200 Series User’s manual Version 1.03
Description:
Set a single DO channel mode.
Command:
$AACONNDD [CHK](cr)
^
Command leading code
AA
Module address ID (01 to FF , Always 01)
CO
command for set a single DO mode for channel N
NN
Channel number (00~1F)
DO mode setting (2 characters),
= 07 - DO Auto-Off Time Mode for DO High to Low to High.
CHK
Check sum
(cr)
Carriage return
!AA [CHK](cr)
Valid command
?AA[CHK](cr)
Invalid command
!
Delimiter for valid command
?
Delimiter for invalid command
AA
Module address ID
CHK
Check sum
(cr)
Carriage return
8.4.15 $AACONNDD Set a single DO channel mode
Syntax:
Response:
Example:
Set DO channel(0) to Low to high delay mode.
Command: $01CO0002(cr)
Response: !01(cr)
Related command: $AACONN, $AACIINNDD, $AACINN
DD
= 00 - Direct DO output(default)
= 01 - Pluse output mode
= 02 - Low to high delay
= 03 - High to low delay
= 04 - Automatic DIO Synchronization Mode
= 05 - reserved
= 06 - DO Auto-Off Time Mode for DO Low to High to Low.
100
Printed Date: 27 February 2018
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.