3. 43. Host is OK.............................................................................................3-52
ii Contents
1. Introduction
1. 1. About the OMR Counter/Frequency Modules
The OMR provides a counter / frequency input module, which has two 32 bit counter input channels with built in
programmable timer for frequency measure function.
OMR-6080: counter/frequency input module with digital output.
1. 2. Overview of OMR-6080
What is OMR-6080?
OMR-6080 is a counter / frequency input module. It has two 32-bit counter input channels with built in
programmable timer for frequency measurement and supports both photo isolated and non-isolated input
mode. The maximum counting value is 4,294,967,295 for counter input channel and the frequency-input
range is from 1 Hz to 100 kHz. A programmable digital filter can be enable for both high and low level
minimum signal width to reduce noise spike. Besides the programmable threshold for non -isolated input can
further reject noise on the input signal level.
The module provides the counter comparator or the alarm function. The alarm limit of two counters can be
set independently by programming. The alarm status can be send to digital output channels if this function is
ON. The supervisor of a factory can ‘see’ or ‘hear’ the alarm if the digital output channel control a real alarm
device. The two digital output channel can be set for general purpose used if the alarm is disable. For
example, connecting relay devices to DO channels, the OMR-6080 can be used to control the high power
devices.
Introduction 1-1
Features of OMR-6080
• Two 32 bit counter / frequency input channel
• Two digital output channels of open collector type
• 5000 Vrms isolation voltage for isolated input mode
• External gate control for counter input
• Alarm function with alarm output
• Programmable digital filter for noise rejection
• Programmable threshold setting of trigger level for non-isolated input mode
• Programmable host watchdog timer for host failure protection
• Internal watchdog timer for device failure protection
control of counter 0
16 GATE0+ Differential positive external gate
control of counter 0
17 IN0- Differential negative input of counter
0
18 IN0+ Differential positive input of counter 0
19 DO0 Digital output of channel 0 or counter
0 alarm output
20 DO1 Digital output of channel 1 or counter
1 alarm output
1-4 Introduction
A Look at OMR-6080 & Pin Assignment
Power Input
Power
Regulator & Filter
RS-485
EEPROM
Safe Value
Watchdog/Power Failure
1-bit
2-bits
Digital Output
DO0
DO1
Default*
+5V
+5V
Programmable
+5V
+5V
Counter 1
+10V ~ +30V
Data +
Data -
Counter 0
Supervisor
Rec/Drv
Config Data
Programmable
Digital
Noise
Filter
Micro
Processor
Counter 0
Counter 1
Digital Input
PHTO/TTL
Input
Select and
GATE
Control
+ 5V
GND
Pin
GATE0+
GATE0-
GATE1+
GATE1-
CH0+
CH0-
CH1+
CH1-
CH1 (TTL)
Threshold
Voltage
CH1 (TTL)
GATE0 (TTL)
GATE1 (TTL)
Introduction 1-5
Functional Block Diagram of OMR-6080
GATE1-
10
Input Module
IN0
CODE
SIGNAL
20
DO1
DO0
IN0+
OMR-6080
IN0-
GATE0+
GATE0-
Counter/Frequency
IN1+
IN1-
GATE1+
11
50 COUNTER
51 FREQUENCY
GATE0
1
GND
IN1
GATE1
DEFAULT*
DATA+
DATA-
+Vs
GND
1-6 Introduction
2. Initialization & Installation
2. 1. Software Installation
1. If you had installed “OMR Administration” then skip other steps.
2. Backup your software diskette
3. Insert “OMR Administration” diskette into floppy drive A:
4. Change drive to A:
5. Installation command syntax
INSTALL drive:
Drive name is C to Z.
Example 1: install to drive C:
A:\> INSTALL C:
Example 2: install to drive F:
A:\> INSTALL F:
6. OMR Administration Utility will be installed in the directory C: \OMR
Initialization & Installation 2-1
2. 2. Initializing a Brand-New Module
Objective of Initializing a Brand-New OMR
All OMR modules except OMR-6520 and OMR-6510, in an RS -485 network must have a unique address ID,
however, every brand-new OMR has a factory default setting as following:
• Address ID is 01.
• Baud rate is 9600 bps
• Check-sum disable
• Host Watchdog timer is disable
Therefore, to configure the brand-new OMR before using is necessary, otherwise the address ID will be
conflict with others modules because the ID of new modules are identity. The baud rate may a lso be changed
according to user‘s requirements.
The following sections show how to initialize a brand-new module, which is applicable for initializing
OMR-6080.
Default State
The OMR I/O modules must be set at Default State when you want to change the default settings, such as
the baud rate and check-sum status etc. All OMR I/O modules have an special pin labeled as DEFAULT*.
The module will be in Default State if the DEFAULT* pin is shorted to ground when power ON. Under this
state, the default configuration is set as following:
• Address ID is 00.
• Baud rate is 9600 bps.
• Check-sum is disable.
Therefore, the communication between host and the module can be easily set as the same default
configuration, the initialization of a module will be possible no matter what configuration is set under
operating state.
2-2 Initialization & Installation
Initialization Equipment
Local Power Supply
New OMR
OMR-6520
• Host computer with an RS -232 port.
• An installed RS -485 module (OMR-6520) with 9600 baud rate.
• The brand new OMR module
• Power supply (+10 to +30 VDC) for OMR modules
• Administration utility software
Initialization Procedure
1. Power off the host computer and the installed OMR-6520. Be sure of the baud rate of the OMR-6520 is
2. Connect a brand new OMR module with the RS -485. Set the module in Default State by shorting the
3. Power on the host computer.
4. Power on the power supply for OMR modules.
5. Use the OMR Administration utility to configure the address ID, Baud rate and check-sum status of the
Initialization Wiring
+10 V to +30 V
+Vs GND
9600 bps.
DEFAULT* pin. Refer to Figure 2.1 for detailed wiring.
module.
Host
Computer
RS-232
RS-232/RS-485
Converter
DATA +
DATA -
+Vs GND
module
DATA+
DATA Default*
+Vs GND
Figure 2-1 Layout for Initialization the OMR module
Initialization & Installation 2-3
2. 3. Install a New OMR to a Existing Network
Equipments for Install a New Module
• A existing OMR network
• New OMR modules.
• Power supply (+10 to +30 VDC).
Installing Procedures
1. Configure the new OMR module according to the initialization procedures in section 2.2.
2. The baud rate and check-sum status of the new module must be identity with the existing RS -485
network. The address ID must not be conflict with other OMR modules on the network.
3. Power off the OMR power supply of the existing RS -485 network.
4. Power off the host computer.
5. Wire the power lines for the new OMR with the existing network. Be careful about the signal polarity as
wiring.
6. Wire the RS -485 data lines for the new OMR with the existing network. Be careful about the signal
polarity as wiring.
7. Wire to the input or output devices. Refer to section 2.4 for illustrations.
8. Power on the host computer.
9. Power on the OMR local power supply.
10. Use the OMR administration utility to check entire network.
2-4 Initialization & Installation
IN1+
2. 4. Application Wiring for OMR-6080
Non-isolated Input
Counter Input
Gate Control
GND
Photo-isolated Input
IN1-
GATE1+
GATE1-
11
+
+
-
IN0 1
+GATE0
D.GND
Counter Input
Gate Control
Initialization & Installation 2-5
3. Command Set
3. 1. Command and Response
Introduction
The OMR command is composed by numbers of characteristics, including the leading code, address ID, the
variables, the optional check-sum bytes, and a carriage return to indicate the end of a command. The host
computer can only command only one OMR module except those synchronized commands with wildcard
address “**”. The OMR may or may not give response to the command. The host should check the response
to handshake with the modules.
Document Conventions
The following syntax conventions describes the OMR commands in this manual.
(Leading Code) Leading Code is the first characteristic of the
OMR command. All OMR commands need a
command leading code, such as %,$,#,@,...etc.
1- character
(Addr) Module’s address ID, the value is in the range of
00 - FF (Hex). 2- character
(Command
Variable)
[Data] Some commands need additional data.
[Checksum] Checksum in brackets indicate optional
< > Identifies a control code character, such as
Command codes or value of variables.
Variable length
Variable length
parameter, only checksum is enable then this
field is required. 2- character
<CR> for carriage return, its value is 0x0D.
1- character
Command Set 3-1
Format of OMR Commands
(Leading Code)(Addr)(Command)[Data] [Checksum]<CR>
When checksum is enable then [Checksum] is needed, it is
2-character. Both command and response must append the checksum characters.
How to calculate checksum value ?
[Checksum] = ((LeadingCode)+(Addr)+(Command)+[Data]) MOD 0x100
Note : 1. There is no spacing between the command words and the checksum characters.
2. Every command follows a <CR> carriage return for
ending.
3. The checksum characters are optional.
3-2 Command Set
Response of OMR Commands
The response message depends on versatile OMR command. The response is composed with a few
characteristics, including leading code, variables, and carriage return for ending. There are two categories of
leading code for response message, ”!“ or ”>“ means valid command and ”?“ means invalid. By checking the
response message, user can monitor the command is valid or not.
Note : Under the following conditions, there will have no response message.
1. The specified address ID is not exist.
2. Syntax error.
3. Communication error.
4. Some special commands do not have response.
Command Set 3-3
3. 2. Summary of Command Set
There are three categories of OMR commands. The first is the general commands, including set configuration
command, read configuration, reset, read module‘s name or firmware version, etc. Every OMR can response
to the general commands. The second is the functional commands, which depends on functions of each
module. Not every module can execute all function commands. The third is the special commands including
functions about the programmable watchdog timer, safe values, and the programmable leading code. All the
commands used in the OMR analog input module are list in the following table.
Command Set of OMR 6080
Command Syntax
Configuration, Counter Input & Display Commands
Set Configuration
Read Configuration $(Addr)2
Read Module Name $(Addr)M
Read Firmware Version $(Addr)F
Set Input Signal Mode $(Addr)B(InType)
Read Input Signal Mode $(Addr)B
Read Counter/Frequency
Value in Hexadecimal
Read Counter/Frequency
Value in Decimal
Set Gate Mode $(Addr)A(Gmode)
Read Gate Mode $(Addr)A
Set Maximum Counter
Value
Read Maximum Counter
Value
Set Initial Count Value @(Addr)P(CounterNo) (IniData)
Read Initial Count Value @(Addr)G(CounetrNo)
Start/Stop Counter $(Addr)5(CounterNo) (SStatus)
Read Counter Start/Stop
Status
Clear Counter $(Addr)6(CounterNo)
Read then Clear the
Overflow Flag
$(Addr)3(CounterNo) (MaxData)
$(Addr)3(CounetrNo)
$(Addr)5(CounterNo)
$(Addr)7(CounterNo)
Command Syntax
Digital Filter & Programmable Threshold Commands
Enable/Disable Digital Filter $(Addr)4(FStatus)
Read Filter Status $(Addr)4
Set Minimum Input Signal
Width at High Level
Read Minimum Input Signal
Width at High Level
Set Minimum Input Signal
Width at Low Level
Read Minimum Input Signal
Width at Low Level
Set TTL Input High Trigger
Level
Read TTL Input High Trigger
Level
Set TTL Input Low Trigger
Level
Read TTL Input Low Trigger
Level