0% found this document useful (0 votes)
41 views101 pages

G3,4,6F Hsca

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views101 pages

G3,4,6F Hsca

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 101

User’ s Manual

LG Programmable Logic Controller

GLOFA G3F-HSCA
G4F-HSCA
MASTER-K G6F-HSCA

LG Industrial Systems
CONTENTS

Chapter 1. INTRODUCTION

Chapter 2. SPECIFICATIONS

2.1 General Specifications 2-1

2.2 Performance Specifications 2-2


2.2.1 Basic performance specification 2- 2
2.2.2 Input specification 2-3
2.2.3 Limit switch(L/S) input specification 2- 3
2.2.4 Transister output specification 2- 3

2.3 Names of Parts and Functions 2-4


2.3.1 Names of Parts and Functions 2- 4
2.3.2 Function of LED Indicators 2- 6
2.3.3 DIP Switch Setting Part 2- 7
2.3.4 Input / Output Terminal Block 2- 8

2.4 Interface with External Devices 2-10

2.5 Output Mode of Encoder 2-12

2.6 Function Descriptions 2-13


2.6.1 Operation Modes 2- 13
2.6.2 Comparision Signal Output 2- 15
2.6.3 Home Signal 2- 17
2.6.4 C a r r y Signal 2- 18
2.6.5 Borrow Signal 2- 18

Chapter 3. INSTALLATION AND WIRING

3.1 Installation 3-1


3.1.1 Installation Ambience 3-1

3.2 Wiring Precautions 3-1

3.3 Wiring Example 3-2


3.3.1 5VDC Voltage Output Type Encoder 3- 2
3.3.2 24VDC NPN Open Type Encoder 3- 3
3.3.3 24VDC PNP Open Collector Encoder 3- 4
Chapter 4. FUNCTION BLOCK

4.1 Insertion of the Function Block for Hgh Speed Counter on the GMWIN 4-1

4.2 Local Function Block 4-2


4.2.1 The specfication of the preset value(HSC_PRE) 4- 2
4.2.2 The specfication of the comparison value ( HSC_CMP) 4- 3
4.2.3 Wrting the operating Information( HSC_WR) 4- 4
4.2.4 Reading the value of the operating status(HSC_RD) 4- 5

4.3 Remote Function Block 4-6


4.3.1 The specification of the preset value (HSCR1PRE) 4- 6
4.3.2 The specification of the comparison value (HSCR1CMP) 4- 7
4.3.3 Writing the operating information (HSCR1WR) 4- 8
4.3.4 Reading the value of the operating status(HSCR1RD) 4- 9

4.4 Error code on the function block 4 -10

Chapter 5. GM PROGRAMMING

5.1 Programming Examples 5-1


5.1.1 Enabling the counter operation 5-2
5.1.2 Preset 5-3
5.1.3 Setting the comparison value 5-4
5.1.4 Setting the magnitude comparison values 5-5
5.1.5 Reading the current count value 5-6
5.1.6 Enabling the external output 5-7
5.1.7 Coincidence reset 5-8
5.1.8 C a r r y / Borrow reset 5-9
5.1.9 Enabling the home latch 5-10
5.1.10 Read/Write when the high speed counter module Is mounted onto the remote station 5-11

5.2 Application Examples 5-13


5.2.1 Program for moving the cart 5-13

Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATION


6.1 Operating block diagram 6-1

6.2 Input / Output signal configuration 6-3


6.2.1 G3F-HSCA 6-3
6.2.2 G4F-HSCA / G6F-HSCA 6- 5
6.2.3 Functions of I/O Signals 6- 6

6.3 Buffer memory configuration 6-8


6.3.1 Buffer memory configuration 6- 8
6.3.2 The contents and data configuration of buffer memory 6- 9

Chapter 7. MK PROGRAMMING

7.1 Buffer Memory Read / Write 7-1


7.1.1 Read from the Buffer Memory (GET,GETP) 7-1
7.1.2 Write to the Buffer Memory (PUT,PUTP) 7-3

7.2 Programming Examples 7-5


7.2.1 Setting Preset Value 7-5
7.2.2 Setting Comparison Value 7-7
7.2.3 Setting Out Data 7-7
7.2.4 Reading Current Count Value 7-8
7.2.5 Enable Output 7-8
7.2.6 Enabling Home Latch 7-9
7.2.7 Coincidence Reset 7-10
7.2.8 C a r r y / Borrow Reset 7-10

7.3 Application Examples 7 -11


7.3.1 Program for moving the cart 7-11
7.3.2 Program for Control of the Constant Angle rotation of the Turntable 7-16

Chapter 8. TROUBLESHOOTING

8.1 Troubleshooting 8-1


8.1.1 The LED status of High Speed Counter Module 8-1
8.1.2 The counting status High Speed Counter Module 8-1
8.1.3 The output status of High Speed Counter Module 8-1

8.2 Troubleshooting Procedure 8-2


8.2.1 LED indication Is Incorrect 8-2
8.2.2 C ount Operations D o N ot Execute 8-3
8.2.3 C ounter Value Is Incorrect 8-4
8.2.4 Output Operations Do Not Execute 8-5

8.3 Error LED List 8-6


Chapter 9. DIMENSIONS

9.1 Dimensions 9-1


SAFETY PRECAUTIONS
Be sure to read carefully the safety precautions given in data sheet and user’s manual before operating the module
and follow them.

The precautions explained here only apply to the high-speed counting module.

For safety precautions on the PLC system, see the GLOFA PLC GM3/4/6 and MASTER-K200S/300S/1000S CPU
User’s Manuals.

A precaution is given with a hazard alert triangular symbol to call your attention, and precautions are represented
as follows according to the degree of hazard.

If not provided with proper prevention, it can cause death or fatal


! WARNING
injury or considerable loss of property.

If not properly observed, it can cause a hazard situation to result


! CAUTION
in severe or slight injury or a loss of property.

However, a precaution followed with ! CAUTION can also result in serious conditions.

Both of two symbols indicate that an important content is mentioned, therefore, be sure to observe it.

Keep this manual handy for your quick reference in necessary.

Design Precautions

! CAUTION
! CAUTION

Design a safety circuit in the outside of the


PLC for system safety in case of disorder Do not run I/O signal lines near to high
of the external power or PLC module body. voltage line or power line.
Separate them as 100 mm or more as
Otherwise, it can cause injury due to wrong possible.
output or malfunction. Otherwise, noise can cause module
malfunction.

Installation Precautions

! CAUTION

Operate the PLC in the environment conditions given in the general specifications.
If operated in other environment not specified in the general specifications, it can cause an
electric shock, a fire, malfunction or damage or degradation of the module
Make sure the module fixing projections is inserted into the module fixing hole and fixed.
Improper installation of the module can cause malfunction, disorder or falling.
Wiring Precautions

! CAUTION

When grounding a FG terminal, be sure to provide class 3 grounding which is dedicated to


the PLC.
Before the PLC wiring, be sure to check the rated voltage and terminal arrangement for
the module and observe them correctly.
If a different power, not of the rated voltage, is applied or wrong wiring is provided, it can
cause a fire or disorder of the nodule.
Drive the terminal screws firmly to the defined torque.
If loosely driven, it can cause short circuit, a fire or malfunction.
Be careful that any foreign materials like wire scraps should not enter into the module.
It can cause a fire, disorder or malfunction.

Test Run and Maintenance


Precautions

! WARNING
! CAUTION

Do not contact the terminals Do not separate the module from


while the power is applied. the printed circuit board(PCB), or
It can cause malfunction. do not remodel the module.
When cleaning or driving a termi- They can cause disorder, ma l-
nal screw, perform them after the function, damage of the module
power has been turned off or a fire.
Do not perform works while the When mounting or dismounting
power is applied, which can the module, perform them after
cause disorder or malfunction. the power has been turned off.
Do not perform works while the
power is applied, which can
cause disorder or malfunction.

Waste Disposal Precautions

! CAUTION

When disposing the module, do it as an industrial waste.


Chapter 1. INTRODUCTION

Chapter 1. INTRODUCTION

This manual describes the specifications, handling instructions, and programming information for the
G3F– HSCA, the G4F– HSCA and the G6F-HSCA.
It is the high speed counting module used with CPU of the GLOFA PLC GM1/2/3/4/6 series and the
MASTER-K200S/300S/1000S series.

The G3F-HSCA is used for GM1/2/3 series and K1000S series, and the G4F-HSCA for GM4 series
and K300S series, the G6F-HSCA for GM6 series and K200S series.

The G3F- HSCA, the G4F-HSCA and the G6F-HSCA consist of 24bit counting part which performs in-
crement or decrement count, an external input part, a comparison part which compares the set value
specified by the user with the current counting value, and an output part which outputs the comparison
results.

1- 1
Chapter 2. SPECIFICATION S

Chapter 2. SPECIFICATIONS

2.1 General Specifications

Table 2.1 shows general specifications of the GLOFA GM series and MASTER-K series.
No Item Specifications Standards

1 Operating ambient 0 ~ 55 (32 ~ 131 )


temperature
2 Storage ambient -25 ~ 75 (-13~167 )
temperature
3 Operating ambient 5 ~ 95%RH, non-condensing
humidity
Storage ambient
4 5 ~ 95%RH, non-condensing
humidity
Occasional vibration
Frequency Acceleration Amplitude Sweep count
10 f 57 Hz - 0.075 mm
57 f 150 Hz 0.001 Kg -
5 Vibration 10 times in each IEC 61131-2
Continuous vibration
direction for
Frequency Acceleration Amplitude
X, Y, Z
10 f 57 Hz - 0.035 mm
57 f 150 Hz 4.9 -
*Maximum shock acceleration: 15g
6 Shocks *Duration time :11 ms IEC 61131-2
*Pulse wave: half sine wave pulse( 3 times in each of X, Y and Z directions )
impulse noise 1,500 V

IEC 61131-2
Electrostatic discharge Voltage :4kV(contact discharge)
IEC 1000-4-2
Radiated electromagnetic field 27 ~ 500 MHz, 10 V/m IEC 61131-2
IEC 1000-4-3
7 Noise immunity Digital Digital I/Os
I/Os (Ue < 24 V)
Severity All power
( Ue Analog I/Os IEC 61131-2
Fast transient burst noise Level modules
≥ communication IEC 1000-4-4
24 V) I/Os
Voltage 2 kV 1 kV 0.25 kV
8 Operating Free from corrosive gases and excessive dust
atmosphere
9 Altitude for use Up to 2,000m(6,562ft)
10 Pollution degree 2 or lower
11 Cooling method Self-cooling

[Table 2.1 ] General Specifications

Remark
1) IEC(International Electrotechnical Commission)
: The international civilian organization which produces standards for electrical and electronics industry.
2) Pollution degree
: It indicates a standard of operating ambient pollution level.
The pollution degree 2 means the condition in which normally, only non-conductive pollution occurs.
Occasionally, however, a temporary conductivity caused by condensation shall be expected.

2 - 1
Chapter 2. SPECIFICATION S

2.2 Performance Specifications

The following show various specifications of the High-speed counting module including basic performance
specifications, input specifications, limit switch input specifications and transistor output specifications.

2.2.1 Basic Performance Specification

Specifications
Item
G3F - HSCA G4F - HSCA G6F - HSCA

I/O Points 32 Points 16 Points

N umber of Channels 2 channels 1 channel

Signal Phase A, Phase B or Phase Z


Counter
input Signal level 5 / 12 / 24 VD C (7-13mA)
signal
Signal type Voltage input

Counting range 0 to 16,777,215 (24 Bits Binary)

Counting speed Maximum 50 kHz

Limit switch input 24 VDC

Setting 1-phase input Set by program or Phase B is set


Increment
/Decrement 2-phase input Set by difference of phase automatically

Type Out 1, Out 2(One among ‘ >’ , ‘ =’ and ‘ <’ is selected)


External
output
Signal type Transistor output ( open collector output, 10 to 30 V)

The multiplication factor for the input pulse may be set to 1, 2 or 4


Multiplication
(Selected by DIP Switch adjustment)

Current consumption 5 VDC, 0.3 A 5 VDC,0.25 A 5 VDC,0.18 A

Weight 620 g 330 g 160 g

2 - 2
Chapter 2. SPECIFICATION S

2.2.2 Input Specifications

Item Specifications

5 VD C (7 mA)

Rated input voltage / current 12 VD C (7 mA)

24 VD C (13 mA)

5 VD C 4.5 V or more

' On ' guarantee voltage 12 VD C 11 V or more

24 VD C 14 V or more

5 VD C 0.8 or less

' Off ' guarantee voltage 12 VD C 1.5 V or less

24 VD C 2.5 V or less

2.2.3 Limit Switch (L/S) Input Specifications

Item Specifications

Input voltage 24 VD C

' On ' guarantee voltage 19 VD C or more

' Off ' guarantee voltage 6 VD C or less

On Delay Time 1.5 ms or less

Off Delay Time 2 ms or less

2.2.4 Transistor Output Specifications

Item Specifications

Rated output 24 VD C , 200 mA

Leakage current 50 A or less

Saturated voltage 1.3V

On Delay Time 50 s or less

Off Delay Time 50 s or less

2 - 3
Chapter 2. SPECIFICATION S

2.3 Names of Parts and Functions

2.3.1 Names of Parts and Functions

The names of parts and functions of the high speed counter module are shown as below

LED
Indicators

Input/
output
terminal
block

Dip switch
Setting part

2 - 4
Chapter 2. SPECIFICATION S

LED
Indicators

Dip switch
setting part

Input/
output
terminal
block

3) G6F-

READY L/S
A PRESET
B OUT1 LED
Z OUT2 Indicators
K3F-HSCA
G6F-HSCA

24V

12V
A
5V

COM

24V

12V
B
5V

Input/
COM

24V

12V output
Z
5V Connector
COM

24V
L/S
0V

24V
PRE
-SET 0V

OUT1

OUT2
+ 24V
0V
-

GK3F-HSCA
6F-HSCA

2 - 5
Chapter 2. SPECIFICATION S

2.3.2 Function of LED Indicators

No. Description
G3F-HSCA
Power LED
POWER E R R OR Turns On when the power is applied.

Error LED
Turns on for 0.5 sec when the power is applied and
then turns off if the system is normally running.
LIMIT
Flickers with 0.1 sec, 0.2 sec or 0.3 sec cycle
according to the error content, If an error has
occurred.

Phase A pulse in p u t L E D
Turns on when voltage is applied to phase A input
terminal.

Phase B pulse in p u t L E D
Turns on when voltage is applied to phase B input
terminal

Phase Z pulse in p u t L E D
Turns on when voltage is applied to phase B input
terminal

Limit switch in p u t L E D
Turns on when voltage is applied to limit switch
input terminal

G4F-HSCA OUT1 o u t p u t L E D
Indicate the magnitude comparison result of CMP 1
POWE
R OUT2 o u t p u t L E D
ERRO Indicate the magnitude comparison result of CMP 2
R
Preset S w i t c h I n p u t (PRESET)
Turns on when voltage is applied to preset switch
input terminal

READY L/S

A PRESET
B OUT1

C OUT2

G6F-HSCA
K3F-HSCA

2 - 6
Chapter 2. SPECIFICATION S

2.3.3 DIP Switch Setting Part

The DIP Switch settings are used for phase-2/ phase-1 operation mode specification, Increment /
Decrement count method specification at 1-phase operation, and multiplication specification at 2-phase
operation.

G3F-HSCA G4F-HSCA/G6F-HSCA

Channel 0

Channel 1

Switch Functions
G3F - H S C A
G4 F - H S C A,
channel G6F-HSCA
0
channel 1 Status Descriptions

On Specifies the 2 – phase pulse operation mode.


SW 1 SW 5 SW 1
Off Specifies the 1 – phase pulse operation mode.

Specifies the phase B pulse input mode as


On increment/decrement count method at 1 – phase
pulse inputs
SW 2 SW 6 SW 2
Specifies the program input mode as
Off increment/decrement count method at 1 – phase
pulse inputs
On
Specifies as multiplicate 1
On

On
Specifies multiplicate 2
SW 3 SW 7 SW 3 Off

Off
No multiplication is applied
SW 4 SW 8 SW 4 On

Off
Specifies multiplicate 4
Off

2 - 7
Chapter 2. SPECIFICATION S

2 - 8
Chapter 2. SPECIFICATION S

2.3.4 Input / Output Terminal Block

1) G3F-HSCA/G4F-HSCA

Phase A pulse Input Terminal


One of 24V, 12V and 5V is selected

Phase B pulse Input Terminal


One of 24V, 12V and 5V is selected

Phase Z pulse Input Terminal


One of 24V, 12V and 5V is selected

Limit Switch Input Terminal


24VD C

Comparison Output Terminal


Transistor Open Collector Output

External Power Input Terminal


24VDC

Remark
The above input/output terminals the CH0 and CH1 of the G3F– HSCA use the same input/output
terminals as shown above.
The G4F– HSCA input/output terminal’ s configuration is also same as above.

2 - 9
Chapter 2. SPECIFICATION S

2) G6F-HSCA

Phase A pulse Input Terminal


One of 24V, 12V and 5V is selected

24V
1

12V
37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20
2

A 5V Phase B pulse Input Terminal


3

COM One of 24V, 12V and 5V is selected


4

24V
5

12V
6

B 5V
Phase Z pulse Input Terminal
7

COM
One of 24V, 12V and 5V is selected
8

24V
19 18 17 16 15 14 13 12 11 10 9

12V
Z 5V
Limit Switch Input Terminal
COM
24VD C
24V
L/S 0V
24V
Preset Switch Input Terminal
PRE 0V
24VDC
OUT1
OUT2
24V
Comparison Output Terminal
0V
Transistor Open Collector Output

External Power Input Terminal


24VDC

Remark

The G6F-HSCA module has external preset input terminal(15, 16).


And it is possible to used to preset value setting signal of external.

2 - 10
Chapter 2. SPECIFICATION S

2.4 Interface with External Devices

Table 2.1 and Table 2.2 shows the list for interface with external devices.

1) G3F-HSCA/G4F-HSCA

Termina
Input
l No. Operatio
I/O Internal Current Signal Name guarantied
CH C n
Voltage
0 H1
24 V, Phase A On 14~26.4 V
1 21
pulse input Off 2.5 V
12 V, Phase A On 11~13.2 V
2 22
pulse input Off 1.5 V
330Ω On 4.5~5.5 V
5 V, Phase A
3 23 0.8 V or
pulse input Off
less
4 24 COM
24 V, Phase B On 14~26.4 V
5 25
pulse input Off 2.5 V
12 V, Phase B On 11~13.2 V
330Ω 6 26
pulse input Off 1.5 V
Input
On 4.5~5.5 V
5 V, Phase B
7 27 0.8 V or
pulse input Off
less
8 28 COM
24 V, Phase Z On 14~26.4 V
9 29
330Ω pulse input Off 2.5 V
12 V, Phase Z On 11~13.2 V
10 30
pulse input Off 1.5 V
On 4.5~5.5 V
5 V, Phase Z
11 31 0.8 V or
pulse input Off
less
12 32 COM

L/S input, 24 On 19~26.4 V


13 33
V Off 6 V or less
Input
14 34 L/S COM

Open collector Rated output:


15 35
output OUT1 24VDC, 200 mA
Response time:
Open collector Off→On 50 or less
16 36
output OUT1 On→Off 50 or less

Output External
power supply
17 37
output
24 V Input voltage
10.2 ~ 30 V

2 - 11
Chapter 2. SPECIFICATION S

External
power supply
18 38
COM
0V
[Table 2.1] External interface list ( G3F-HSCA / G4F-HSCA )

2) G6F-HSCA

Input
Terminal Operatio
I/O Internal Current Signal Name guarantied
pin No. n
Voltage
24 V, Phase On 14~26.4 V
3.3 1
A pulse input Off 2.5 V
1.2 12 V, Phase On 11~13.2 V
2
A pulse input Off 1.5 V
330 On 4.5~5.5 V
5 V, Phase A
3 0.8 V or
pulse input Off
820 less
4 COM
3.3
24 V, Phase On 14~26.4 V
5
1.2 B pulse input Off 2.5 V
12 V, Phase On 11~13.2 V
6 B
Input
330 Off 1.5 V
pulse input
820 On 4.5~5.5 V
5 V, Phase B
7 0.8 V or
pulse input Off
3.3 less
8 COM
1.2 24 V, Phase On 14~26.4 V
9
Z pulse input Off 2.5 V
330
12 V, Phase On 11~13.2 V
10
Z pulse input Off 1.5 V
820
On 4.5~5.5 V
5 V, Phase Z
11 0.8 V or
pulse input Off
less
12 COM
2.2 L/S input 24 On 19~26.4 V
13
V Off 6 V or less
270
14 L/S COM
Input 2.2
Preset input On 19~26.4 V
15
270 24V Off 6 V or less
16 L/S COM
Open
Rated output:
Output 17 collector
24VDC, 200 mA
output OUT1
Response time:
Open Off→On 50 or less
18 collector
On→Off 50 or less
output OUT2

2 - 12
Chapter 2. SPECIFICATION S

External
power supply
37
output
24 V Input voltage
External 10.2 ~ 30 V
power supply
19
COM
0V
[Table 2.2] External interface list ( G6F-HSCA )

2 - 13
Chapter 2. SPECIFICATION S

2.5 Output Mode of Encoder

Open collector output

High speed counter

24V phase A, B or Z
pulse input

0V

Voltage output

High speed counter

24 V phase A, B or
Z pulse input

2 - 14
Chapter 2. SPECIFICATION S

2.6 Function Descriptions

The High-speed counting module can count high-speed pulse which cannot be proceed with the CPU
counting instructions (CTU,CTUD, etc.). Up to 24 bits binary (16,777,215) can be counted.
Pulse input mode is classified into 1-Phase (Phase A) pulse input and 2-Phase (Phase B) pulse input. In
1-Phase pulse input mode, there are two kinds of increment/decrement count methods. One is specified by
program and the other is specified by phase B pulse input signal. In 2-Phase pulse input mode, the
increment/decrement count method is specified by the phase difference between phase A and B pulsed.

2.6.1 Operation Modes

1) 1-phase Operation Mode (Increment /Decrement C o u n t by Program)


When Phase A pulse input rises, the counter performs increment or decrement count by
decrement counter specification signal.
If the decrement counter specification signal is low the counter performs increment count, and if
high, it performs decrement count.

Phase A pulse
input

Decrement counter
specification signal

Counter
value Increme Decrement Incremen
nt t

2) 1-phase Operation Mode (Increment /Decrement C o u n t by Phase B P u l s e I n p u t )


When Phase A pulse input the counter performs increment or decrement count by Phase B pulse
input.
If Phase B pulse input is low, it performs decrement count, and if high, it performs increment count.

Phase A pulse
input

Phase B
pulse input

Decrement Increme Decremen


Counter nt t
value

2 - 15
Chapter 2. SPECIFICATION S

3) 2 - Phase Operation Mo d e ( Multiplicate 1)

When Phase A pulse-input leads Phase B, the counter performs increment count when phase B
pulse-input leads phase A, it performs decrement count.
If Phase B pulse input is low when Phase A pulse input rises, the counter performs increment
count.
If Phase B pulse input is low when phase A pulse input falls, it performs decrement count.

A-phase pulse
input

B-phase pulse
input

Counter
value
Increment Decrement

4) 2-Phase Operation Mo d e ( Multiplicate 2)

When Phase A pulse-input leads Phase B, the counter performs increment count when phase B
pulse-input leads phase A, it performs decrement count.
If Phase B pulse input is low when Phase A pulse input rises or it is high when phase A pulse
input falls, the counter performs increment count.
If Phase B pulse input is high when Phase A pulse input rises or it is low when phase A pulse
input falls, the counter performs decrement count.

A-phase pulse
input

B-phase pulse
input

Counter
value Increment Decrement

2 - 16
Chapter 2. SPECIFICATION S

5) 2-phase Operation Mode (Multiplicate 4)

When Phase A pulse input leads Phase B pulse input, the counter performs increment count.
When the other leads the one, it performs decrement count.
The counting is performed when the Phase A and B pulse inputs rise or fall.

A-phase pulse
input

B-phase pulse
input

Counter
value Increment Decrement

2.6.2 Comparison Signal Output

The counting module has the function of comparison output, which outputs the result of
magnitude comparison between the Current value (=current value) and a comparison value.
There are two outputs in the comparison output and they can be used separately.
The magnitude comparison mode can be set as shown in the below table.

Comparison mode Settings

0 No magnitude comparison is performed.

1 Current value < Setting value

2 Current value = Setting value

3 Current value Setting value

4 Current value > Setting value

5 Current value Setting value

6 Current value Setting value

7 Always On

The results as shown above will be indicated on the OUT1 LED or OUT2 LED regardless of the
output. Output to the external terminal block is performed only when the output enable signal is
ON.

2 - 17
Chapter 2. SPECIFICATION S

1) Example When the Comparison Mode Is Set to ‘ Current Value < Setting Value’

Current value

Setting
v alue

< Signal

LED status

Output Enable
signal

External output

2) Example When the Comparison Mode Is Set to ‘ Current Value Setting Value’

Current value

Setting
v alue
> Signal

LED status

Output Enable
signal

External output

2 - 18
Chapter 2. SPECIFICATION S

3) Example When the Comparison Mode Is Set to ‘ Current Value = Setting Value’

Contrary to the ‘ >(GT)” and ‘ <(LT)’ signals, once the coincidence (=) signal is turned ON,
it
retains the ON state until the coincidence reset signal is turned ON.
The LED status is same as the coincidence signal. Output is performed only when the output
enable signal is turned ON.

Current
value

Setting
value

Coincidence (=)
signal

Coincidence (=)
Reset signal

LED status

Output enable
signal

External output

2.6.3 Home Signal

Home signal is operated only when the HOME-LATCH enable signal is turned on.
Home signal turns on when both of phase Z pulse input and limit switch input is turned on.
The count value retains ‘ 0’ until the HOME-LATCH enable signal turns OFF though the
counter continuos its counting operation.

Phase Z pulse
input

Limit switch

Home Latch
enable signal

Home signal

Current value

2 - 19
Chapter 2. SPECIFICATION S

2.6.4 Carry Signal

The carry signal appears when the counter value changes from 16,777,215 to 0 during increment
counting. The carry signal retains its ON State until the carry reset signal turns on. If the home
signal is input, the carry signal will be cleared.

Current
value

Carry signal

Carry Reset
signal

2.6.5 Borrow Signal

The borrow signal appears when the counter value changes from 0 to 16,777,215 during
decrement
counting. The borrow signal retains its ON State until the borrow reset signal turns on. If the
home
signal is input, the borrow signal will be cleared. The borrow reset signal is used together with
the
carry reset signal.
Current
value

Borrow
signal

Borrow
Reset signal

2 - 20
Chapter 2. SPECIFICATION S

2 - 21
Chapter 3. INSTALLATION AND WIRING

Chapter 3 . INSTALLATION AND WIRING

3.1 Installation

3.1.1 Installation Ambience


This module has high reliability regardless of its installation ambience. But be sure to check the following for system in higher
reliability and stability.

1) Ambience Requirements
Avoid installing this module in locations, which are subjected or exposed to:
Water leakage and dust a large amount of dust, powder and other conductive power, oil mist, salt, of organic solvent
Mechanical vibrations of impacts transmitted directly to the module body.
Direct sunlight.
Dew condensation due to sudden temperature change.
High or low temperatures (outside the range of 0-55 )

2) Installing and Wiring


During wiring or other work, do not allow any wire scraps to enter into it.
Install it on locations that are convenient for operation.
Make sure that it is not located near high voltage equipment on the same panel.
Make sure that the distance from the walls of duct and external equipment be 50 mm or more.

Be sure to be grounded to locations that have good noise immunity

3.2 Wiring Precautions

When using High-speed inputs, take the following precautions against noise in wiring.

1) Be sure to use shielded twisted pair cables and provided class 3 grounding.

2) Separate a twisted pair cable from power cables or I/O line that may generate noise.

3) Use a stabilized power supply for pulse generator.


For 1-phase input, connect count-input signal only to phase A;
For 2-phase input, connect to phases A and B.

3 - 1
Chapter 3. INSTALLATION AND WIRING

3.3 Wiring Example

3.3.1 5VDC Voltage Output Type Encoder

G3F-HSCA/G4F-HSCA/G6F-HSCA Encoder
External
Power

Shield Cable

820

External
Power

Shield Cable

820

Shield Cable

820

L/S Switch
Input +24V
270

External
Power

3 - 2
Chapter 3. INSTALLATION AND WIRING

3.3.2 24VDC NPN Open Collector Type Encoder

G3F-HSCA/G4F-HSCA/G6F-HSCA
Encoder
*1 1.5K 1W
+24V

A Phase 1.2K 1/4W


+12V
+24V
330 1/4W
+5V
Shield Cable

820 1/4W
OUT

COM

*1
1.5K 1W
+24V
Shield E

B Phase 1.2K 1/4W


+12V
+24V
330 1/4W Shield Cable
+5V

820 1/4W
OUT

COM

*1 Shield E
1.5K 1W
+24V

Z Phase 1.2K 1/4W


+12V
+24V
330 1/4W Shield Cable
+5V

820 1/4W
OUT

COM

Shield E

+24V
DC 24V

0V
0V

External Power
Supply

3 - 3
Chapter 3. INSTALLATION AND WIRING

3.3.3 24VDC PNP Open Collector Encoder

Encoder
G3F-HSCA/G4F-HSCA/G6F-HSCA

*1 1.5K 1W
+24V

A Phase 1.2K 1/4W


+12V
OUT
330 1/4W
+5V
Shield Cable

820 1/4W
0V

COM
*1
1.5K 1W
+24V
Shield E

B 1.2K 1/4W
+12V
Phase OUT
330 1/4W
+5V Shield Cable

820 1/4W
0V

COM

*1 Shield E
1.5K 1W
+24V

Z 1.2K 1/4W
+12V
Phase OUT
330 1/4W
+5V Shield Cable

820 1/4W
0V

COM

Shield E

+24V
DC 24V

0V
0V

External Power Supply

3 - 4
Chapter 4. FUNCTION BLOCK

Chapter 4. FUNCTION BLOCK

This shows function block for high speed counter module on the GMWIN.
A kind of function block is as follows.

G3F-HSCA G4F-HSCA G6F-HSCA


No Function
Local Remote Local Remote Local Remote
1 HSC_PRE HSCR1PRE HSC_PRE HSCR0PRE HSC_PRE HSCR6APR Preset value setting
2 HSC_CMP HSCR1CMP HSC_CMP HSCR0CMP HSC_CMP HSCR6ACP Compare value setting
3 HSC_WR HSCR1WR HSC_WR HSCR0WR HSC_WR HSCR6AWR Operation information writing

4 HSC_RD HSCR1RD HSC_RD HSCR0RD HSC_RD HSCR6ARD Operation status value reading

4.1 Insertion of the Function Block for High Speed Counter Module on the GMWIN

Function Block is inserted on the execution of the GMWIN according to following procedure.
Function block can be inserted only in the open condition of the Project.

* GMWIN V3.1 above(G3F-HSCA)


Project(P) select

Library insert

4 - 1
Chapter 4. FUNCTION BLOCK

4.2 Local Function Block

4.2.1 The specification of the preset value(HSC_PRE)

Specifying preset (Initial) value for the applicable channel of the High Speed Counter Module.

Function block Descriptions

4 - 2
Chapter 4. FUNCTION BLOCK

INPUT

REQ : Function block execution request at rising edge.( )

BASE : Base location No. for the loaded high speed counting
module.
(GM1 : 0~31, GM2 : 0~7, GM3/4 : 0~3, GM6 : 0)

SLOT : Slot location No. for the loaded high speed counting
module.
(0 ~ 7)

CH : Specifies the operating channel No.( 0 ~ 1)

PSET : Specifies the preset value setting(0 ~ 16,777,215)

OUTPUT

DONE : Turns on when the function block has finished without


error.
The On state is kept until next request.
However, turns off if error occurs during execution of the
function block.

STAT : Indicates the error that occurs during execution of the


function
block.

*1: G3F-HSCA only applicable

4.2.2 The specification of the comparison value(HSC_CMP)

Specifies the reference value, which will be compared with the current value for the corresponding channel
of the High Speed Counter Module.

Function block Description

4 - 3
Chapter 4. FUNCTION BLOCK

Symbo OUT1 OUT2


No. Contents
l LED LED
0 Not compare OFF OFF
1 < CNT < CMPD ON ON
2 = CNT = CMPD ON ON
3 CNT CMPD ON ON
4 > CNT > CMPD ON ON
5 CNT CMPD ON ON
6 CNT CMPD ON ON
7 - CNT - CMPD ON ON

INPUT

REQ : Function block execution request at rising edge.( )


BASE : Base location No. for the loaded high speed counting
module.
(GM1 : 0~31, GM2 : 0~7, GM3/4 : 0~3, GM6 : 0)
SLOT : Slot location No. for the loaded high speed counting
module.
( 0 ~ 7)
CH : Specifies the operating channel No.( 0 ~ 1)
CMPD : Specifies the Setting value (0 ~ 16,777,215)
CMP1 : Specifies the comparison method for the first Setting
value. (0 ~ 7)
CMP2 : Specifies the comparison method for the second Setting
value. (0 ~ 7)

[ Magnitude comparison method specification]

OUTPUT 4 - 4

DONE : Turns on when the function block has finished without


Chapter 4. FUNCTION BLOCK

4.2.3 Writing the operating information(HSC_WR)

Specifies the run status control information for the corresponding channel of the High Speed Counter
Module.

Function block Description

HSC_WR
INPUT
BOO REQ NDR BOO
L L
USIN BAS ERR BOO
REQ : Function block execution request.( )
T E L BASE : Base location No. for the loaded high speed counting module.
USIN SLO STA USIN
T T T T (GM1 : 0~31, GM2 : 0~7, GM3/4 : 0~3, GM6 : 0)
USIN CH * 1 SLOT : Slot location No. for the loaded high speed counting module.
T
BOO OT_ ( 0 ~ 7)
L E
BOO HOM
CH : Specifies the operating channel No.( 0 ~ 1)
L E OT_E: Specifies output enable/disable (0:disable, 1:enable)
BOO CY_
L R HOME :Specifies Home-Latch enable/disable (0:disable, 1:enable)
BOO
L
EQ_R CY_R: Specifies carry/borrow reset enable/disable (0:disable,
BOO DOWN 1:enable)
L
BOO CT_
EQ_R: Specifies coincidence reset enable/disable (0:disable, 1:enable)
L E DOWN: Specifies the increment/decrement (0:increment, 1:decrement)
BOO PRE
L _ *2 CT_E : Specifies counting enable/disable (0:disable, 1:enable)
I/E
PRE_I/E : Specifies external preset input usable
(0 : external preset input disable,
1 : external preset input usable)

OUTPUT

DONE : Turns on when the function block has finished without error.
The On state is kept until next request.
However, turns off if error occurs during execution of the
function block.

STAT : Indicates the error that occurs during execution of the function
block.

*1: G3F-HSCA only applicable

*2: G6F-HSCA only applicable

4 - 5
Chapter 4. FUNCTION BLOCK

4.2.4 Reading the value of the operating status (HSC_RD)

Reads the current value and operating status for the corresponding channel of the High Speed Counter
Module.

Function block Descriptions

INPUT
HSC_RD

REQ : Function block execution request.( )


BASE : Base location No. for the loaded high speed counting module.
(GM1 : 0~31, GM2 : 0~7, GM3/4 : 0~3, GM6 : 0)
SLOT : Slot location No. for the loaded high speed counting module.
CNT ( 0 ~ 7)
CH : Specifies the run channel No ( 0 ~ 1)
OUT

OUT2

UP

HOME OUTPUT

CY DONE : Turns on when the function block has finished without error.
The On state is kept until next request.
BW However, turns off if error occurs during execution of the
function block.
STAT : Indicates the error that occurs during execution of the function
block.
C N T : Current count value read from the High Speed Counter Module
(0~16,777,215)
OUT1: OUT1 status ( 0:Off. 1:On)
OUT2: OUT2 status ( 0:Off, 1:On)
UP : Increment/decrement status (0:decrement, 1:increment)
HOME: Home signal input status ( 0:Off, 1:On)
CY :Carry signal status ( 0:Off, 1:On)
BW :Borrow signal status ( 0:Off, 1:On)

*1: G3F-HSCA only applicable

4 - 6
Chapter 4. FUNCTION BLOCK

4.3 Remote Function Block

4.3.1 The specification of the preset value (HSCR1PRE)


Sets the preset value for the corresponding channel of the High Speed Counter Module mounted on a
remote station.

Function block Descriptions

INPUT

REQ : Function block execution request at rising edge.( )


NET_NO : Location No.(0 ~ 7) of the slot where the local
communication modules (G3L – FUEA, G4L –
FUEA, G3L – FUOA) is loaded to which the function block
will be sent.
St_ N O : Station No.(0 ~ 63) of the communication modules(G3L –
RBEA, G4L – RBOA, G4L – BBEA) mounted on the remote
I/O station.
BASE: Location No. of the base unit where the High Speed Counter
Module is loaded.
(GM1 : 0~31, GM2 : 0~7, GM3/4 : 0~3, GM6 : 0)
SLOT: Location No. of the slot in the base unit where the High Speed
Counter Module is loaded.( 0 ~ 7 )
CH : Specifies operating channel No. ( 0 ~ 1)
PSET : Specifies preset value (0 ~ 16,777,215)

OUTPUT

NDR : Turns on when the function block has finished without error.
Turns off at next scan.
ERR : Turns on when an error occurs during execution of the function
block.
STAT : Indicates the error that occurs during execution of the function
block.

*1: G4F-HSCA : “ HSCR0PRE”


G6F-HSCA : “ HSCR6APR”

*2: G3F-HSCA only applicable

4 - 7
Chapter 4. FUNCTION BLOCK

4.3.2 The specification of the comparison value (HSCR1CMP)

Specifies the reference value, which will be compared with the current value for the corresponding channel
of the High Speed Counter Module mounted on a remote station.

Function block Descriptions

INPUT

REQ : Function block execution request at rising edge.( )


NET_NO : Location No.(0 ~ 7) of the slot where the local
communication modules (G3L – FUEA, G4L – FUEA, G3L
– FUOA) is loaded to which the function block will be
sent.
St_ N O : Station No.(0 ~ 63) of the communication modules(G3L –
RBEA, G4L – RBOA, G4L – BBEA) mounted on the
remote I/O station.
BASE: Location No. of the base unit where the High Speed
Counter Module is loaded.
(GM1 : 0~31, GM2 : 0~7, GM3/4 : 0~3, GM6 : 0)
SLOT: Location No. of the slot in the base unit where the High
Speed Counter Module is loaded.(0 ~ 7)
CH : Specifies operating channel No. (0 ~ 1)
CMPD : Specifies the Setting value (0 ~ 16,777,215,)
CMP1 : Specifies the comparison method for the first Setting
value. (0 ~ 7)
CMP2 : Specifies the comparison method for the second Setting
value. (0 ~ 7)

No. [ Magnitude comparison


Symbol C o n t e n t smethod specification]
OUT1 OUT2
0 Not compare LED
OFF LED
OFF
1 < CNT < CMPD ON ON
2 = CNT = CMPD ON ON
3 CNT CMPD ON ON
4 > CNT > CMPD ON ON
5 CNT CMPD ON ON
6 CNT CMPD ON ON
7 - CNT - CMPD ON ON

OUTPUT

NDR : Turns on when the function block has finished without error.
Turns off at next scan.
ERR : Turns on when an error occurs during execution of the
function block.
STAT : Indicates the error that occurs during execution of the
function block.

*1: G4F- HSCA : “ HSCR0CMP”


G6F-HSCA : “ HSCR6ACP”

*2: G3F-HSCA only applicable

4 - 8
Chapter 4. FUNCTION BLOCK

4.3.3 Writing the operating information (HSCR1WR)

Specifies the control information of the operating status for the corresponding channel of the High Speed
Counter Module mounted on the remote station.

Function block Descriptions

4 - 9
Chapter 4. FUNCTION BLOCK

HSCR1W *1 INPUT
BOO REQ NDR BOO
L L
USIN NET- ERR BOO
REQ : Function block execution request at rising edge.( )
NO
T L NET_NO : Location No.(0 ~ 7) of the slot where the local
USIN ST- STA USIN
T N T T communication modules (G3L – FUEA, G4L – FUEA, G3L –
O
USIN
T
BAS
E
FUOA) is loaded to which the function block will be sent.
USIN SLO St_ N O : Station No.(0 ~ 63) of the communication modules(G3L –
T T
USIN CH * 2
RBEA, G4L – RBOA, G4L – BBEA) mounted on the remote
T I/O station.
BOO OT_
L E BASE: Location No. of the base unit where the High Speed Counter
BOO
L
HOM
E
Module is loaded.
BOO CY_ (GM1 : 0~31, GM2 : 0~7, GM3/4 : 0~3, GM6 : 0)
L R
BOO EQ_
SLOT: Location No. of the slot in the base unit where the High
L R Speed Counter Module is loaded.(0 ~ 7)
BOO DOW
L N CH : Specifies operating channel No. (0 ~ 1)
BOO
L
CT_
E
OT_E: Specifies output enable/disable (0:disable, 1:enable)
BOO PRE
*3
HOME :Specifies Home-Latch enable/disable (0:disable, 1:enable)
L _
I/E CY_R: Specifies carry/borrow reset enable/disable (0:disable,
1:enable)
EQ_R: Specifies coincidence reset enable/disable (0:disable,
1:enable)
DOWN: Specifies the increment/decrement (0:increment, 1:decrement)
CT_E : Specifies counting enable/disable (0:disable, 1:enable)
PRE_I/E : Specifies external preset input usable
(0 : external preset input disable,
1 : external preset input usable)

OUTPUT

NDR : Turns on when the function block has finished without error.
Turns off at next scan.
ERR : Turns on when an error occurs during execution of the
function block.
STAT : Indicates the error that occurs during execution of the
function block.

*1: G4F-HSCA : “ HSCR0WR ”


G6F-HSCA : “ HSCR6AWR ”

*2: G3F-HSCA only applicable

*3: G6F-HSCA only applicable

4.3.4 Reading the value of the operating status (HSCR1RD)

Reads the current value and operating status for the corresponding channel of the High Speed Counter
Module mounted on the remote station.

Function block Descriptions

4 - 10
Chapter 4. FUNCTION BLOCK

INPUT

REQ : Function block execution request at rising edge.( )


NET_NO : Location No.(0 ~ 7) of the slot where the local
communication modules (G3L – FUEA, G4L – FUEA, G3L –
FUOA) is loaded to which the function block will be sent.
ST_NO : Station No.(0 ~ 63) of the communication modules(G3L –
RBEA, G4L – RBOA, G4L – BBEA) mounted on the remote
I/O station.
BASE: Location No. of the base unit where the High Speed Counter
Module is loaded.
(GM1 : 0~31, GM2 : 0~7, GM3/4 : 0~3, GM6 : 0)
SLOT: Location No. of the slot in the base unit where the High
Speed Counter Module is loaded.(0 ~ 7)
CH : Specifies operating channel No. (0 ~ 1)

OUTPUT

NDR : Turns on when the function block has finished without error.
Turns off at next scan.
ERR : Turns on when an error occurs during execution of the
function block.
STAT : Indicates the error that occurs during execution of the
function block.
CNT : Current count value read from the High Speed Counter
Module
(0~16,777,215)
OUT1: OUT1 status ( 0:Off. 1:On)
OUT2: OUT2 status ( 0:Off, 1:On)
UP :Increment/decrement status (0:decrement, 1:increment)
HOME : Home signal input status ( 0:Off, 1:On)
CY :Carry signal status ( 0:Off, 1:On)
BW :Borrow signal status ( 0:Off, 1:On)

*1: G4F- HSCA : “ HSCR0RD”


G6F- HSCA : “ HSCR6ARD”

*2: G3F-HSCA only applicable

4 - 11
Chapter 4. FUNCTION BLOCK

4.4 Error code on the function block

This shows the errors on the output variable “STAT” of variables and the resolutions in accordance with them.

STAT Local/
Descriptions Resolutions
No. Remote
0 Operating with no fault -

1 The base location number is exceeding the proper Correct the number in accordance with the proper range(See
setting range Section 4.2)
2 H/W error of the base Contact the service station.

3 The slot location number is exceeding the proper Set the right number to the slot mounting the high speed
setting range counter module.

4 The high speed counter module on the slot is empty Mount the high speed counter module to the specified slot
Local
5 The module loaded isn't the high speed counter
Mount the high speed counter module to the specified slot
module

6 The channel number is exceeding the proper range Specify the available channel correctly

7 H/W error of the high speed counter module Contact the service station.
8 The high speed counter module's shared memory Contact the service station.
error
9 Make a correct specification of the available channel on the
The available channels are not specified
initialization function block
128 H/W error of the communication module for remote See the manual for the remote communication module

129 The base location number is exceeding the proper Corsets the number in accordance with the proper range(See
setting range Section 4.2)
131 The slot location number is exceeding the proper Set the right number to the slot mounting the high speed
setting range counter module

133 Remote The module loaded isn't the high speed counter
Mount the high speed counter module to the specified slot
module
135 H/W error of the high speed counter module Contact the service station.
136 The high speed counter module's shared memory Contact the service station.
error
137 Make a correct specification of the available channel on the
The available channels are not specified
initialization function block

4 - 12
Chapter 5. GM PROGRAMMING

Chapter 5. GM PROGRAMMING

5.1 Programming Examples

If not especially noted, this section explains programming examples in reference with the G4F – HSCA
that is loaded onto the system given below

System configuration

GM4- GM4- G4I- G4F- G4Q-


PA2A CPUA D22A HSCA TR2A

5 - 1
Chapter 5. GM PROGRAMMING

5.1.1 Enabling the count operati on

Timing Diagram

*1. Counting is only possible when the COUNTER_EN is turned on.

5 - 2
Chapter 5. GM PROGRAMMING

5.1.2 Preset

Timing diagram

*The function block HSC_PRE will be processed for one scan.

5 - 3
Chapter 5. GM PROGRAMMING

5.1.3 Setting the comparison value

Timing Diagram

*1. The function block HSC_CMP will be processed for one scan.

5 - 4
Chapter 5. GM PROGRAMMING

5.1.4 Setting the magnitude comparison values

Timing Diagram

*1.The function block HSC_CMP will be processed for one scan.

5 - 5
Chapter 5. GM PROGRAMMING

5.1.5 Reading the current count value

Timing Diagram

External input

Signal (OA)

*1.The current count value (CNT) is read only when the COUNTER_EN is turned on.

5 - 6
Chapter 5. GM PROGRAMMING

5.1.6 Enabling the external output

Timing Diagram

Output disable Output e n able Output disable

5 - 7
Chapter 5. GM PROGRAMMING

5.1.7 Coincidence reset

Timing Diagram

*1.This occurs only when the comparison values 1 and 2 are set to “ =” , “ ≥ “ , or “ ≤
“ and the current count value (CNT) equal to the comparison value (CMPD)

5 - 8
Chapter 5. GM PROGRAMMING

5.1.8 Carry / Borrow reset

Timing diagram

External input
Timing diagram
Timing Diagram
Signal (OA)

Output disable

*1. Carry, Borrow signal occurs when the Current count value changes from 16,777,215 to 0
or from 0 to 16,777,215

5 - 9
Chapter 5. GM PROGRAMMING

5.1.9 Enabli n g the h ome latch


Home Latch enable signal is used to set the current count value to 0 when the mechanical
reference point has been reached.

Moving
object Mot Encod
or er

L/S
Terminal signal
block High speed
Counting

Timing diagram

L/S
signal
Phase-Z
signal

Current Counter value


= 0

5 - 10
Chapter 5. GM PROGRAMMING

5.1.10 Read/ Write when the high speed counter module I s mounted onto the remote
station

System configuration

GM4- GM4- G4I- G4L- G 4 Q - GM4- G4L- G 4 Q - G4I- G4F-


PA2A C P U D22A F U E A TR4A PA2A R B E A TR2A D22A HSC
A A

o o

NET-NO : The number of the slot where the G4L – FUEA is loaded = 1
ST-N O : G4L-RBEA Station No. = 3
BASE : The number of the base unit where the G4F – HSCA is loaded = 1
SLOT : The number of the slot where the G4F – HSCA is loaded = 2

Program

When %I0.0.0 is turned


on, one processing
m a k e the PRESET_V
set to 100.

When %I0.0.1 is turned


on, one processing
make the CMP_V set to
500.

5 - 11
Chapter 5. GM PROGRAMMING

When %I0.0.0.2 is turned on, write


is executed every normal
communication complete cycle
(NDR)

When %I0.0.0. 3 is turned on, read


is executed every normal
communication complete cycle
(NDR)

Timing Diagram

R_PRESET finished processing


*1 signal
several
scan
1 scan ON

R_READ finished processing signal


Severa Severa Severa Severa Severa
l l l l l
scan scan scan scan scan

*1. It is normal communication complete cycle, and it extents in proportion with quantity of
communication data and the number of stations connected to the communication module.

5 - 12
Chapter 5. GM PROGRAMMING

5.2 Application Examples

5.2.1 Program for moving the cart

System
Configuration
Forward rotation
CAR Reverse rotation

First stop Second stop


Start position
Position (1000pulse) Position (1800pulse)
First work Second work
Motor

Encoder
Inverter

Forward rotation
Output
Reverse rotation

BCD DIGITAL display


(4*1)

Start command

First work complete signal

Second work complete signal

GM4 CPU Module


DC Input Module (16
Point)
TR Output Module (32 Point)
High-speed counting module

5 - 13
Chapter 5. GM PROGRAMMING

Operation Description
The motor for moving the cart rotates with start command, and makes the cart stop at the first stop
position with the High-speed counting module counting the encoder signals from the motor.
Then, if the first work complete signal turns ON, the motor moves the cart to stop at the second stop
position. When the second work complete signal turns on, the motor return the cart to the start position.

Input/Output Signal Allocation


% I0.0.0 : Start Command
% I0.0.1 : 1st Work Complete Signal Input
% I0.0.2 : 2nd Work Complete Signal

%Q0.1.0 : Motor forward rotation signal (On : forward rotation , Off : Stop)
%Q0.1.1 : Motor reverse rotation Signal (On : Backward rotation, Off : Stop)
Output
%Q0.1.16 - % Q0.1.31 : Indicates the current count value(BCD) of
the High-speed counting module.

Driving mode

Motor
Forward
Speed reducing position
rotation Speed reducing position

Start position
D(pulse)

First stop position


Second stop position

Motor
reverse Speed reducing position
rotation

*1. 100(Difference between stop position and speed reducing position) is an interval
delayed by reducing timing of the inverter.

5 - 14
Chapter 5. GM PROGRAMMING

Operation
Timing

Start command
%I0.0.0
First work
complete signal
%I0.0.1
Second work
complete signal
%I0.0.2

OUT1

Motor forward
rotation
%Q0.1.0
Motor reverse
rotation
%Q0.1.1

Used Variable
List

5 - 15
Chapter 5. GM PROGRAMMING

Program

Stops forward rotation of


the motor when speed-
reducing position is over-
passed.
Stops reverse rotation of
the motor when speed-
reducing position is over-
passed
If start command turns on,
PRESET_DATA = 0
CMP1=4,CMP_DATA=900.
COUNT_ENABLE=ON,
The motor starts forward

When the first work has


been finished,
CMP_DATA =1700 and
the motor starts forward
rotation.

When the second work


has been finished
CMP_DATA =100 and

5 - 16
Chapter 5. GM PROGRAMMING

When first or second


works or start
command have been
finished,
CMP_DATA will be
changed.

Write/read are
executed whenever
COUNT_ENABLE = ON

The High Speed


Counter Module
outputs the current
count value
(CUR_VALUE) on the
BCD digital display.

5 - 17
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

6.1 Operating block diagram

1) G3F-HSCA

G3F-HSCA PLC CPU


Buffer Memory data
send/receive by PUT/GET.

OUT 1

OUT 2

Preset Home Input

Set Increment/Decrement Count

Carry Signal

Borrow Signal

Data Format Error

PLC→HSC Counter Preset Signal

Counter Set Signal


HSC →
PLC Counter Operation Enable
Signal
Increment/Decrement Count
Specification Signal

Output Enable Signal

Home Latch Signal

Coincidence Reset Signal

Carry/Borrow Reset Signal

Phase Phase Phase


A B Z

Terminal Block

The above shows the operation block diagram where the I/O word number of the G3F-HSCA is
0

6 - 1
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

2) G4F-HSCA / G6F-HSCA
G4F-HSCA / G6F- PLC CPU
HSCA Buffer Memory data
send/receive by PUT/GET.

OUT 1

OUT 2

Preset Home Input

Increment/Decrement Count
Set
Carry Signal

Borrow Signal

Data Format Error

Counter Preset Signal

Counter Set Signal

Counter Operation Enable


Signal
Increment/Decrement Count
Specification Signal

Output Enable Signal

Home Latch Signal

Coincidence Reset Signal

Carry/Borrow Reset Signal

Phase Phase Phase


A B Z

Terminal Block

The above shows the operation block diagram where the I/O word number of the G4F-HSCA /
G6F-
HSCA is 0.

6 - 2
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

6.2 Input / 0utput signal configuration

6.2.1 G3F-HSCA

1) Input signals: PLC CPU module ← High Speed Counter module

Signal Contents Remarks

P(N)0 OUT 1

P(N)1 OUT 2

P(N)2 Home Input Signal

P(N)3 Increment/Decrement Count Signal (1:Up, 0:Down)


Channel 0
P(N)4 Carry Signal

P(N)5 Borrow Signal

P(N)6 Data Format Error

P(N)7 Unused

P(N)8 OUT 1

P(N)9 OUT 2

P(N)A Home Input Signal

P(N)B Increment/Decrement Count Signal (1:Up, 0:Down)


Channel 1
P(N)C Carry Signal

P(N)D Borrow Signal

P(N)E Data Format Error

P(N)F Unused

‘ N ’ means the I/O word number of the High Speed Counter module.

6 - 3
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

2) Output signals: PLC CPU module à High Speed Counter module

Signal Contents Remarks

P(N+1)0 Counter Preset Signal

P(N+1)1 Counter Set Signal

P(N+1)2 Counter operation enable signal

P(N+1)3 Increment/decrement count specification signal


Channel 0
P(N+1)4 Output enable signal

P(N+1)5 Home Latch enable signal

P(N+1)6 Coincidence rest signal

P(N+1)7 Carry/Borrow Reset Signal

P(N+1)8 Counter Preset Signal

P(N+1)9 Counter Set Signal

P(N+1)A Counter operation enable signal

P(N+1)B Increment/decrement count specification signal


Channel 1
P(N+1)C Output enable signal

P(N+1)D Home Latch enable signal

P(N+1)E Coincidence rest signal

P(N+1)F Carry/Borrow Reset Signal

‘ N ’ means the I/O word number of the High Speed Counter module.

6 - 4
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

6.2.2 G4F-HSCA / G6F-HSCA

Signal Contents Remarks

P(N)0 OUT 1

P(N)1 OUT 2

P(N)2 Home Input Signal

P(N)3 Increment/Decrement Count Signal (1:Up, 0:Down)


Input Signals
(PLC ← HSC)
P(N)4 Carry Signal

P(N)5 Borrow Signal

P(N)6 Data Format Error

P(N)7 Unused

P(N)8 Counter Preset Signal

P(N)9 Counter Set Signal

P(N)A Counter operation enable signal

P(N)B Increment/decrement count specification signal


Output Signals
(PLC à HSC)
P(N)C Output enable signal

P(N)D Home Latch enable signal

P(N)E Coincidence rest signal

P(N)F Carry/Borrow Reset Signal

‘ N ’ means the I/O word number of the High Speed Counter module.

6 - 5
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

6.2.3 Functions of I/O Signals

1) Input Signals

OUT 1
A data among ‘ >’ , ‘ =’ and ‘ <’ is selected and if the current comparison result conforms to the
selected data this input signal will be set to high (On).

OUT 2
A data among ‘ >’ , ‘ =’ and ‘ <’ is selected and if the current comparison result conforms to the
selected data this input signal will be set to high (On).

Home Input Signal


If the Home signal is inputed, this signal will be set to high (On). That is, this signal will be set to
high if the both of the limit switch signal and phase Z signal are turned On when the Home Latch
enable signal turns On. This signal will be set to low if the Home Latch signal turns Off.

Increment/Decrement Count Signal


This signal turns On if increment counting is being performed in present, and turns Off if decrement
counting is being performed.

C a r r y Signal
If the current count value is ‘ 16,777,215’ and increments by one pulse, the current value
becomes ‘ ’ and the carry signal turns On.

Borrow Signal
If the current count value is ‘ ’ and decrements by one pulse, the current value becomes
‘ 16,777,215’ and the borrow signal turns On.

Data Format Error


If a value of Preset, Set or Out data exceeds the input range, this signal turns On. If a normal
data value is inputed it turns Off.

2) Output Signal

Counter Preset Signal


This signal makes the high speed counting module process the counter initial set value(Preset
value) written in the Buffer Memory (CH0: addresses 0 and 1, CH1: addresses 10 and 11). Only
one pulse has to be turned On.

Counter Set Signal


This signal makes the high speed counting module process the current value written in the Buffer
Memory (CH0: addresses 2 and 3, CH1: addresses 12 and 13) and the set value(SET value)
which will be compared with it.

6 - 6
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

Counter operation enable signal


This signal should be turned On in order that the high speed counting module start counting by
the pulse input. If this signal turns Off, the high speed counting module does not execute counting.

Increment/decrement count specification signal


When the increment/decrement mode is the program mode at 1-phase pulse inputs, Decrement
count will be proceeded if this signal is turned On. Increment count if Off. ( See 5) of section
4.2 )

Output enable signal


Turn this signal On to allow the terminal block(or external connector) output signals (OUT1 and
OUT2) to be outputed.

Home Latch enable signal


If this signal is turned On and phase Z and L/S inputs turns On, then the Home input signal turns
On and the current value will be reset(000000).

Coincidence Reset Signal


Turns this signal On to reset the signal ‘ current value = set value’ .

Carry/Borrow Reset Signal


When a Carry or Borrow signal has occurred, this signal is used to reset it.

6 - 7
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

6.3 Buffer memory configuration

The high speed counting module has a Buffer Memory for data write/read to/from the PLC CPU. The
PUT and PUTP instructions write data from the PLC CPU to the Buffer Memory. The GET and GETP
instruction reads data. (Refer to the Manuals relating to the instructions.)

The followings explain the structure of the Buffer Memory and the data configuration.

6.3.1 Buffer memory configuration

G3F-HSCA Buffer Memory


Address Address
(Decimal (Decimal
) ) Preset Value(Lower)
0000 Preset Value(Lower) 0010
0001 Preset Value(Upper) 0011 Preset Value(Upper)
0002 Set Value(Lower) 0012 Set Value(Lower)
Set Value(Upper) Channel Set Value(Upper) Channel
0003 0 0013 1
0004 Out Data 0014 Out Data
0005 Current Value 0015 Current Value
0006 (Lower) 0016 (Lower)
Current Value Current Value

G4F-HSCA / G6F-HSCA Buffer Memory

Address
(Decimal
) Preset Value(Lower)
0000
0001 Preset Value(Upper)
0002 Set Value(Lower)
Channel
0003 Set Value(Upper) 0
0004 Out Data
0005 Current Value
0006 (Lower)
Current Value

6 - 8
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

6.3.2 The contents and data configuration of buffer memory

The followings explain them in reference with the channel 0. For the channel 1, only address is different
and contents are same as the channel 0.

(1) Preset Value (Addresses 0 and 1)

0000 Lower

0001 Upper

O :Usable X :Unusable

Used to store the preset value from which count starts.


The preset value setting range is 0 to h00FFFFFF(16,777,215 as decimal). Up to h00FF(bits 0 to 7)
will be stored to the upper address (address 0001) and up to hFFFF(bits 0 to 15) to the lower
address (address 0000). If a value is stored to the upper bits 8 to 15(exceeds the preset value
setting range), the input signal P(N)6 turns On.
For the channel 1, the upper address is 0011 and the lower address 0010. If the preset value
exceeds the setting range the input signal P(N)E turns On.
If a preset value exceeds the setting range, the ERR LED flickers with 0.5 sec cycle.

(2) Set Value (Addresses 2 and 3)

0002 Lower

0003 Upper

O :Usable X :Unusable

Used to store the set value which will be compared with the current count value.
The set value setting range is 0 to h00FFFFFF(16,777,215 as decimal). If the set value exceeds the
setting range, the input signal P(N)6 turns On.
For the channel 1, the lower address is 0012 and the upper address 0013. If the set value exceeds
the setting range the input signal P(N)E turns On.
If a set value exceeds the setting range, the ERR LED flickers with 0.5 sec cycle.

6 - 9
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

(3) Out Value (Address 4)

0004

O :Usable X :Unusable

Only bits 0, 1, 2, 8, 9 and 10 are usable. If other bit is used, the input signal P(N)6 turns On and
the ERR LED flickers with 0.5 sec cycle.

Bit 0 On : If current count value < set value, OUT1 will be turned On. (output enable)
Bit 1 On : If current count value = set value, OUT1 will be turned On. (output enable)
Bit 2 On : If current count value > set value, OUT1 will be turned On. (output enable)
Bit 8 On : If current count value < set value, OUT2 will be turned On. (output enable)
Bit 9 On : If current count value = set value, OUT2 will be turned On. (output enable)
Bit 10 On : If current count value > set value, OUT2 will be turned On. (output enable)
Bits 0, 1 and 2 can be used in combination.

[Example]
Bits 1 and 2 On : If current count value ≥ set value, OUT1 will be turned On. (output enable)
Bits 0 and 1 On : If current count value ≤ set value, OUT1 will be turned On. (output enable)
Bits 0 and 2 On : If current count value ≠ set value, OUT1 will be turned On. (output enable)
If bits 8, 9 and 10 are used in combination as shown above, the results same as above will be
output to the OUT2.

In relation to the channel 1, the address is 0014.

(4) Current Count Value (Addresses 5 and 6)

0005 Lower

0006 Upper

O :Usable X :Unusable

6 - 10
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

If the counter operation enable signal turns On, the current count value to pulse inputs will be
stored to these addresses.

6 - 11
Chapter 6. BUFFER MEMORY AND I/O SIGNAL CONFIGURATON

The input range is 0 to h00FFFFFF(16,777,215 as decimal). During increment counting, if the


current count value is h00FFFFFF and next pulse input has been received, it changes into
h00000000 and occurs a Carry. During decrement counting, if the current count value is h00000000
and next pulse input has been received, it changes into h00FFFFFF and occurs a Borrow.

If a Carry occurs, the P(N)4 will turn On for the CH0 and the P(N)C for the CH1.
If a Borrow occurs, the P(N)5 will turn On for the CH0 and the P(N)D for the CH1.

In relation to the channel 1, the addresses are 0015 and 0016.

6 - 12
Chapter 7. MK PROGRAMMING

Chapter 7. MK PROGRAMMING

This chapter explains the programming method for using the high speed counter module.

7.1 Buffer Memory Read / Write

The followings explain the read/write of the PLC CPU from/to the Buffer Memory.
7.1.1 Read from the Buffer Memory(GET,GETP)
The instruction given below are used to read data from the Buffer Memory of the high speed counter
module to the CPU. The data read can be stored to the CPU memory(F area is not excluded.).
Always executed when the execution condition
GET
is in the On state. .

Executed when the execution condition turns On. GETP

[Table 7.1] The difference between GET and GETP

Format GET instruction


execution condition
GET n1 n2 D n3

N o . of the
Head
head
Number of address
word of Number of
the slot of the
the CPU words of
where the Buffer
Content memory the read
special Memory
area data.
module is where the
where the (1~50)
loaded data is
read data
stored.
is stored.
Usable Integer M,P,K,L,
memory Integer (Decimal T, C, D Integer
area /Hex) or #D

[Fig 7.1] Read Instruction GET

Main base Expansion base


Power

Power
slot 0

slot 1

slot 2

slot 3

slot 4

slot 5

slot 6

slot 7

slot 0

slot 1

slot 2

slot 3

slot 4

slot 5

slot 6

slot 7
CPU

(n 1 ) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Point n 1 is calculate d from 8 for the first expansion base board, from 16 for the second and from 24
for the third.
[Fig 7.2] Method for Obtaining n1.

7 - 1
Chapter 7. MK PROGRAMMING

Example 1
When the high speed counter module is mounted on the first expansion base and the data at address 5 of
the
Buffer Memory is read to the two words D15 and D16.
High Speed Counter Module
CPU
Buffer Memory
Register (address)
Read
(Data) 5 Current count value of
D15 (Data)
CH0
D16 (Data) (Data) 6
Execution Condition
GET 8 5 D0015 2

Example 2
When the same data as the example 1 is read but a pulse relay is used.

Execution Condition
D M0008
M0008

GETP 8 5 D0015
2

Example 3
When the high speed counter module is mounted on the slot 4 of the main base and the 6-word data
from address 6 of the Buffer Memory are read to the D1 to D6.

CPU High Speed Counter Module


D1 Data 1 Data 1 10
D2 Data 2 GET Data 2 11
D3 Data 3 Data 3 12
D4 Data 4 Data 4 13
D5 Data 5 Read Data 5 14 Data of CH1
D6 Data 6 Data 6 15

Execution Condition
GET 4 10 D1 6

[Fig 7.3] 16-Bit Data Read Example

7 - 2
Chapter 7. MK PROGRAMMING

7.1.2 W r i t e t o t h e B u f f e r Memory(PUT,PUTP)
Besides the data stored in the CPU memory area, decimal integer(ΟΟ) and hexadecimal
integer(HΟΟ) can be used as the data that can be written from the CPU to the Buffer Memory of the
high speed counter module.
Always executed when the execution condition
PUT
is in the On state. .

Executed when the execution condition turns On. PUTP

[Table 7.3] The Difference between PUT and PUTP

Format

PUT n1 n2 S n3

Integer or,
Head N o . of the
Number of address head
Number of
the slot of the word of
words of
where the Buffer the CPU
Content the write
special Memory memory
data.
module is where the area
(1~50)
loaded data is where the
stored. write data
is stored.
Usable Integer M,P,K,L,
memory Integer (Decimal T, C, D Integer
area /Hex) or #D

[Fig 7.4] Write Instruction PUT

7 - 3
Chapter 7. MK PROGRAMMING

Example 1
l 16-bit data Write
When the High Speed Counter Module is mounted on the slot 2 of the first expansion base unit and 1-word
data stored in the data register D90 is written to the address 0 of the Buffer Memory.
High Speed Counter
CPU Module
(Data Register) Write (Address)
Data Data
D90 0:CH0 Preset Value

Execution Condition
PUT 5 0 D0090 1

Example 2
l 32-bit data Write
When the High Speed Counter Module is mounted on the slot 5 of the main base and 2-word(32-bit) data
stored in the data registers D51 and D52 is written to the addresses 2 and 3 of the Buffer Memory.
High Speed Counter
CPU Module
(Data Register) Write Buffer Memory
D51 Data (Lower) Data (Lower) 2
D52 Data (Upper) Data (Upper) 3 CH0 Set Value

Execution Condition
PUT 5 2 D0051 2

Example 3
l Integer Write
When the High Speed Counter Module is mounted on the slot 5 of the main base and H0402 is written to the
address 4 of the Buffer Memory.

High Speed Counter


Module
Write (Address)
CPU h0402
4:CH0 Out Data
h0402

Execution Condition
PUT 5 4 h0402 1

[Fig 7.5] Write Example

7 - 4
Chapter 7. MK PROGRAMMING

7.2 Programming Examples


If not especially noted, this section explains programming examples in reference with the K7F-HSCA that is
mounted on the system given below.

System configuration

GM3- K7P- G3I- G3Q- G3F- G3Q-


PA2A 30AS D22A RY4A HSCA TR2A

P00 P01 P03 P05


I/O Word No.
P02 P04
7.2.1 Setting Preset
Preset
Execution condition (CH0)
DMOVP 0 D0100
Writing the preset
value ‘ 0000’ to the
Buffer Memory.
Preset is executed.
(1 Pulse On)

Preset
Execution condition (CH1)

Value

CH1 Counter Preset Signal

CH0 Counter Preset Signal

DMOVP Writing the preset


Lower
value ‘ 100’ to the
Upper Buffer Memory.
PUTP
Preset is executed.
Address(10 Pulse On)
Address 1
Lower
P U TUpper
P

7 - 5
Chapter 7. MK PROGRAMMING

Setting Preset Value by External Preset Input ( Only G6F-HSCA )

External Preset
Condition
[ DMOVP 100
If external Preset
condition
turn On, writing ‘ 100’ to
[ PUTP 2 0 D200
the Buffer Memory
address 0.
If external connector
Preset
signal(Pin No. 15) is
inputed,

Timing Chart

External Preset
Condition

0 100 100
Buffer Memory
Value

External
Connector
Preset Signal
(Pin No. 15)
Counter present 0 100 100
Value

7 - 6
Chapter 7. MK PROGRAMMING

7.2.2 Setting Comparision Value

Set Value
Execution
condition
(CH0) DMOVP
Writing a set value 30000 to the
Buffer Memory
Setting for comparison is
performed.
Set Value (1 Pulse On)
CH0 Counter Set Signal
Execution
condition
(CH1) DMOVP
Writing a set value 2500 to the
Buffer Memory
Setting for comparison is
performed.
(1 Pulse On)
CH1 Counter Set Signal

7.2.3 Setting OUT DATA

Out Data
Execution
condition out data to the Buffer
Writing
(CH0) Memory so that output is enabled
f o r O U T 1 w h e n “ =” matched, and
f o r O U T 2 w h e n “ >” m a t c h e s .
Out Data
Execution
condition out data to the Buffer
Writing
(CH1) Memory so that output is enabled
f o r O U T 1 w h e n “ ” matched, and
f o r O U T 2 w h e n “ <” m a t c h e s .

7 - 7
Chapter 7. MK PROGRAMMING

7.2.4 Reading the Current Count Value

Command for
reading the
current count
value (CH0) The current count value will
be read to the D0205
(Lower) and D0206 (Upper).
Counting proceeds only
when the counter operation
enable signal is On.
Counter Operation Enable
Command for signal
reading the
current count
value (CH1) The current count value will
15
be read to the D0215
(Lower) and D0216 (Upper).
Counting proceeds only
when the counter operation
enable signal is On.
Counter Operation Enable
signal

7.2.5 Enabling Output

Turn On the P044 and P04C to enable outputs to the external terminals OUT1 and OUT2.

Output enable
Command
(CH0)

Output enables signal


Output enable for the CH0.
Command
(CH1)

Output enables signal


for the CH1.

7 - 8
Chapter 7. MK PROGRAMMING

7.2.6 Enabling Home Latch

Home Latch enable signal is used to set the current count value to 0 (zero) when the mechanical
reference point has been reached.

Moving object
Motor Encoder

L/S signal
Terminal block
Phase Z signal
High speed
counting module

Home Latch
Enable command
CH0

Home Latch Home Latch Enable signal for the


Enable command CH0
CH1

Home Latch Enable signal for the


CH1

• Timing Chart

Home Latch
Enable signal

L/S signal

Phase Z
signal

Home input
signal

Current Count Value


=0(zero)

7 - 9
Chapter 7. MK PROGRAMMING

• Setting Preset Value using the Home Input Signal


Home Latch enables
signal condition

Writing the preset values for


the CH0 to change the
Home input signal for current count value into 400
the CH0
Preset

7.2.7 Coincidence Reset

Coincidence reset
command for the
CH0

Coincidence reset signal for the CH0


Coincidence reset
command for the
CH1

Coincidence reset signal for the CH1

7.2.8 Carry/Borrow Reset

Carry/Borrow
Reset command (CH0)
P047
Carry/Borrow reset signal for the CH0

Carry/Borrow
Reset command (CH1)
Output disable P04F
Carry/Borrow reset signal for the CH1

7 - 10
Chapter 7. MK PROGRAMMING

7.3 Application Examples

7.3.1 Program for moving the Cart

• System Configuration

Forward rotation
Cart Reverse rotation

Start position First stop position (1000 pulse) Second stop position (1800 pulse)
First work Second work

Motor

Encoder
Inverter
GM3- K7P- G3I- G3Q- G3F-
PA2A 3 0 A S D22A TR4A HSCA
P0010 Forward rotation

P0011 Output
Reverse rotation

BCD DIGITAL display (4x1)

P0020~P002F
P0000 Start command
P0001
First work complete signal
P0002
Second work complete signal

K7P- 30AS : MK 1000S CPU module


G3I-D22A : DC Input module (16 points)
G3Q- TR4A : TR Output module (32 points)
G3F-HSCA : High Speed Counter Module (32 points)

7 - 11
Chapter 7. MK PROGRAMMING

Operation explanation
The motor for moving the cart rotates with start command, and makes the cart stop at the first stop position
with the High Speed Counter Module counting the encoder signals from the motor.
Then, if the first work complete signal turns On, the motor moves the cart to stop at the second stop
position. When the second work complete signal turns On, the motor return the cart to the start position.

I nput/Out put Signal Allocation


P0000 : Start Command
P0001 : 1st Work Complete Signal Input
P0002 : 2nd Work Complete Signal

P0010 : Motor forward rotation signal (On : Forward rotation , Off : Stop)
P0011 : Motor reverse rotation Signal (On : Revese rotation, Off : Stop) Output
P0020 ~ P002F : Indicates the current count value(BCD) of the High Speed Counter Module.

P0030 ~ P003F : High-speed counter Input Signal


P0040 ~ P004F : High-speed counter Output Signal

D Register Allocation
D0000 : High-speed counter Current count Value

7 - 12
Chapter 7. MK PROGRAMMING

Operation pattern
*1. 100(Difference between stop position and speed reducing position) is an interval
delayed by reducing timing of the inverter
Motor
Forward
rotation Speed reducing position Speed reducing position

Start position
D(pulse)

First stop position


Second stop position
Motor
reverse
Speed reducing position
rotation

Operation timing Diagram

Start command
(P0000)
First work
complete signal
(P0001)
Second work
complete signal
(P0002)
OUT1
(P0030)

Motor forward
Rotation.(P0010)

Motor reverse
Rotation.(P0011)

7 - 13
Chapter 7. MK PROGRAMMING

Program

Forward rotation of the motor


stops, when speed reducing
position is over-passed
Reverse rotation of the motor
stops, when speed reducing
position is over-passed.
Start (Pulse)
Start command
Reverse rotation of the motor
stops, when speed reducing
position is over-passed

Preset signal

Setting the speed reducing


position for the first stop.
Setting value=900
Set signal complementary
output

Out1 : “>”

Operation Enable signal On

Motor forward rotation signal

First work complete signal


Setting the speed reducing
position for the second
stop. Setting value=1700
Set signal complementary
output

Motor forward rotation signal

Second work complete signal


Setting the speed reducing
position for stop at the start
position. Setting value=100
Set signal complementary
output

Out1 : “<”

Motor reverse rotation signal

7 - 14
Chapter 7. MK PROGRAMMING

Set signal is set to On

Reading
the current count value

Output the current count


value as a BCD value

7 - 15
Chapter 7. MK PROGRAMMING

7.3.2 Program for Control of the Constant Angle rotation of the Turntable.

• System Configuration
Drill

Turntable

Motor

Encoder (1000 pulse /rotation)

Change-speed
device
GM4- K4P- G4I- G4I- G4F- G4Q- High-speed
PA2A 15AS D 2 2 A D22A HSCA TR2A
Low-speed Output
Stop

OUT1 is an output terminal of the


High Speed Counter Module.

BCD digital display for


setting the rotation angle
(4x1)

Start switch

Drilling work complete signal switch

K4P- 15AS : MK 300S CPU Module


G4I-D22A : DC input Module (16 points)
G4F-HSCA : High speed counter Module (16 points)
G4Q- TR2A : TR output Module (16 points)

7 - 16
Chapter 7. MK PROGRAMMING

• Operation Description

If the start switch is pushed, the turntable rotates as much as the rotation angle set (60 ) and
completes drilling.
If the drilling work complete signal turns On, it rotates again 60 . If repeating the above operations
has finished six drilling works, all processing will be finished.

• Operation Format

Speed
High speed

Low speed Stop

• Program

00000 1 Pulse On
start switch
Conversion of the rotation angle
00003 60 from BCD type to BIN type

360 (1 rotation) : 1000pulse=60 :x


x =60 1000 360
D0003 166

Preset value = 0

Preset signal complementary junction

Set value = 166

Set signal

OUT1 : set to “=”

High speed counter module


operation enable signal : On

Terminal block output enable


signal : On

7 - 17
Chapter 7. MK PROGRAMMING

Reading the current count value


of the high speed counter
module to D0010 and D0011

If the turntable has rotated


138( 50 ), then the low
speed operation turns On

If the turntable has rotated 60


with low speed, it will be stopped
by the coincidence signal (“ =”) of
OUT1

complete signal switch


Setting the Preset value to ‘0’ to
change the current count value
into ‘0’.
Preset signal complementary
contact
Coincidence reset signal
turns On.
After the drilling work has been
repeated six times, the processing
complete signal (C000) turns On.

High-speed operation
Process complete signal turns On.

Preset signal
turns On.

7 - 18
Chapter 8. TROUBLESHOOTING

Chapter 8. TROUBLESHOOTING
The following explains troubles and corrections when using the High Speed Counter Module.
F o r troubleshooting relating to the CPU module, refer to the CPU module user’ s manual.

8.1 Troubleshooting

8.1.1 The LED st a t u s o f H i g h S p e e d C o u n t e r M o d u l e

PWR LED is turned off

ERR LED is turned on See Section

ERR LED is flickering

8.1.2 The co u n t i n g st a t u s o f H i g h S p e e d C o u n t e r M o d u l e

No changes of count value See Section

See Section
Changes of count value do not conform to the operation status.

8.1.3 The ou t p u t st a t u s o f H i g h S p e e d C o u n t e r M o d u l e

Output operations do not execute.

See Section

Output operations do not conform to the operation status.

8 - 1
Chapter 8. TROUBLESHOOTING

8.2 Troubleshooting Procedure

8.2.1 LED I ndication I s I ncorrect

LED abnormal

No
Is the PWR LED
turned on?

Yes
Is voltage of the No
power supply
module normal?

Yes Check the power supply


module and replace it.
HW Fault
Yes
Is ERR LED
on?

No

Is normal other No
modules onto their
slots?

Yes HW fault of the other


modules loaded onto
HW Fault their slots.
Is the ERR LED Yes
flickering?

Yes
Is data formatting
No
signal on?

No changes of ERR No

Check the initial values


setting values and out
data, and correct the
program.
HW Fault HW Fault

8 - 2
Chapter 8. TROUBLESHOOTING

8.2.2 Counter Operations D o N o t Execute.

Counter operations do not


execute.

No Change after checking power


Is the voltage of
power supply module?
module Normal?

Yes

Is the Phase A No
LED flickering?
When voltage
Yes given on No
Is external counter input
Yes wiring? terminal, is A,B
normal ? phase ?

No

Correct after checking Yes


external wiring HW Fault
Is turned the
counter operation
enable signal On? No Correct program to turn on the count
operation enables signal.
Yes

Is input/output signal No Correct program as normal in/output


allocation? signal

Yes

Is 2-Phase Yes Phase B LED No


operating mode? flickering?
Yes
No
No

Is Slot No. correctly Correct program to set correct


set? Slot No
Yes
Yes
Entered any foreign
material when Remove the foreign material.
handling?

No

HW Fault

8 - 3
Chapter 8. TROUBLESHOOTING

8.2.3 Count Value I s I ncorrect

Count value abnormal

No Correct the counter input


Is the count value conforming to the input
conforming to the
input specifications? specifications.

Yes

Is the D IP switch No Set the DIP switch correctly


correctly set? conforming to input
conditions.
Yes

Is the input wire a No Use a shielded twisted wire


shielded twist wire? for counter input wiring.

Yes

Have adequate No
measures been taken R emove noise the sources
against noise.

Yes

Is enough clearance No Separate the counter input


given between heavy
current equipment and line 10 cm or more from the
counter input line? power line.

Yes

Are count values the


No
same by providing the
same count inputs to Ch0 HW Fault
and Ch1.

Yes

Check the input waveform


with an oscilloscope.

Does the frequency Yes


of the input wave Re-check the pulse input
exceed 50 Kpps?

No

HW Fault

8 - 4
Chapter 8. TROUBLESHOOTING

8.2.4 Output Operations D o N o t Execute

Output operations do not


execute.

Is the voltage of the No Check and correct the


external power external power supply
supply normal?

Yes
No
Connect the output line so
Is the voltage that it conforms to the output
conforming to the specifications.
output specifications?

Yes
No
Is output wiring Correct the wiring
normal?

Yes
Yes
Is OUT1 and OUT2 No Is the set value set
LEDs correctly
operating? every scan?
Correct the program so that
Yes the set value is set only
when the value is changed.
HW Fault
No
Is turned the Correct the program to set
the output enable signal ON.
output enable

Yes
No Correct the program for
Is output data
proper output data.
correct?

Yes

Is channel No Correct the program for


correctly set? proper channels.

Yes

No Correct the program for


Are I/O signals
proper I/O signals.
correctly allocated?

Yes

Is entered any foreign Yes Remove the foreign material


material when handling?

No

HW Fault

8 - 5
Chapter 8. TROUBLESHOOTING

8.3 Error LED List

Type LED operation Correct action

Watchdog Cycle 100 ms flickering


Contact a service station
timer error (50 ms on, 50 ms off)

Cycle 200 ms flickering


Common RAM error Contact a service station
(100 ms on, 100 ms off)

Cycle 500 ms flickering The data set is outside the range.


Data format error
(250 ms on, 250 ms off) Correct the data.

8 - 6
Chapter 9. D I M E N S I O N S

Chapter 9. DIEMENSIONS

9.1 Dimensions

G3F-HSCA
1) G3F-HSCA Unit: mm
Unit: mm

G3F-HSCA
POWER ERROR

LIMI

9 - 1
Chapter 9. D I M E N S I O N S

2) G4F-HSCA Unit: mm

G4F-HSCA
POWER
ERROR

9 - 2
Chapter 9. D I M E N S I O N S

3) G6F-HSCA
Unit: mm

READY L/S
A PRESET
B OUT1
C OUT2
GK3F-HSCA
6F-
HSCA

24V

12V
A
5V
COM
24V

12V 110
B 5V
COM
24V

12V
Z
5V
COM

24V
L/S 0V
24V
PRE
-SET 0V
OUT1
OUT2
+ 24V
0V
-
G6F-
K3F-HSCA
HSCA

38 35
90

9 - 3

You might also like