InstructionManual
Yokogawa Electric Corporation
IM 34M6H54-01E
Pulse Input Module
IM 34M6H54-01E1st Edition
Blank Page
<Toc> <Ind> <Rev> <Preface> i
IM 34M6H54-01E
Preface
Applicable Products● FA-M3 Range-free Multi-controllers
Models: F3XS04-3N and F3XS04-4N
Model name: Pulse input module
March 1999
Revision HistoryMarch 1999 First Edition - New Publication
Notice(1) This manual should be passed on to the end user.
(2) Yokogawa Electric Corporation (hereinafter simply referred to as Yokogawa) does notwarrant that the functions contained in this product will suit the particular purpose ofthe user.
(3) Under absolutely no circumstances may the contents of this manual, in part or inwhole, be transcribed or copied without permission.
(4) The contents of this manual are subject to change without prior notice.
(5) Every effort has been made to ensure accuracy in the preparation of this manual.However, should any errors or omissions come to the attention of the user, pleasecontact the nearest Yokogawa representative or sales office.
(6) In the interest of protecting and ensuring the safety of this product and the systemwhich is controlled by this product, ensure that all instructions and precautions in thismanual relating to safety are adhered to in the use of this product. If separate protec-tion and/or safety circuits are to be installed for this product or the system which iscontrolled by this product, ensure that such circuits are installed external to the prod-uct. Do not attempt to make modifications or additions internal to the product.
(7) In cases where the use of this product results in damage or loss to the user or a thirdparty, Yokogawa will not be responsible for any incidental or consequential damage orloss, or any damage or loss suffered by the user or third party resulting from a defector defects in this product which could not be foreseen by Yokogawa.
(8) Concerning the software supplied by Yokogawa on floppy disks:
1. This software is to be used on only one specific computer. If it is required on othercomputers as well, purchase that software separately.
2. The copying of this software for any purposes except backup is strictly prohibited.
3. Keep the floppy disks (originals) of this software in a safe place. If the originaldisks are not in user’s possession, Yokogawa may decline to provide qualityassurance and maintenance services.
4. The decompiling or reverse-assembly, etc., of this software (“reverse engineer-ing”) is strictly prohibited.
The document number and document model code for this manual are as follows:
Document number: IM 34M6H54-01E
Document model code: DOC IM
Please refer to the document number in all communications; also refer to the documentnumber or document model code when purchasing additional manuals.
1st Edition : Feb.01,1999-00Media No. IM 34M6H54-01E (CD) 1st Edition : Feb. 1999 (YK)All Rights Reserved Copyright © 1999, Yokogawa Electric Corporation
ii<Toc> <Ind> <Rev> <Preface>
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
◆ IntroductionThe FA-M3 Versatile-range Multi-controller builds on new concepts developed byYokogawa, a company specializing in measurement, control, and information processing.
This manual describes the specifications and handling of the subject module. The modulereceives and counts pulse signals from the field. For the FA-M3 hardware, see the Hard-ware Manual (publication number IM 34M6C11-01E).
● Documentation ConventionsSymbol marks used.
The following symbol marks are used in this manual:
CAUTIONIndicates that the operator must refer to an explanation in this manual to avoid dam-age to the modules.
TIP
Gives information that complements the present topic.
SEE ALSO
Referential items and page numbers are indicated.
The modules listed in the following table can also be used for the “astnex” open-architecturesystem (the additional code “/A” is appended to the model and suffix codes of these mod-ules.)
F3XS04-3N (pulse input module) F3XS04-3N/A
F3XS04-4N (pulse input module) —
Model and suffix codes forFA-M3 modules in this manual
Corresponding model andsuffix codes for astnex
T00.EPS
<Toc> <Ind> <Rev> <Preface> iii
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
◆ Safety PrecautionsThis instrument is an IEC safety class I instrument (provided with terminal for protectivegrounding). The following general safety precautions must be observed during all phasesof operation, service and repair of this instrument. If this instrument is used in a manner notspecified in this manual, the protection provided by this instrument may be impaired. Also,Yokogawa Electric assumes no liability for the customer’s failure to comply with theserequirements.
The following symbols are used on this instrument.
To avoid injury, death of personnel or damage to the instrument, the operator must
refer to an explanation in the Instructions Manual.
Protective grounding terminal.
Function grounding terminal. This terminal should not be used as a “Protectivegrounding terminal.”
Alternating current.
Direct current.
Make sure to comply with the following safety precautions. Not complying mightresult in injury, death of personnel or damage to the instrument.
WARNINGPower Supply
Ensure the source voltage matches the voltage of the power supply before turning ONthe power.
Protective Grounding
Make sure to connect the protective grounding to prevent an electric shock beforeturning ON the power.
Necessity of Protective Grounding
Never cut off the internal or external protective grounding wire or disconnect the wiringof protective grounding terminal. Doing so poses a potential shock hazard.
Defect of Protective Grounding and Fuse
Do not operate the instrument when protective grounding or fuse might be defective.
Do not Operate in an Explosive Atmosphere.
Do not operate the instrument in the presence of flammable liquids or vapors.
Operation of any electrical instrument in such an environment constitutes a safetyhazard.
iv<Toc> <Ind> <Rev> <Preface>
IM 34M6H54-01E
� Waste Electrical and Electronic EquipmentWaste Electrical and Electronic Equipment (WEEE), Directive 2002/96/EC(This directive is only valid in the EU.)
This product complies with the WEEE Directive (2002/96/EC) marking requirement.
The following marking indicates that you must not discard this electrical/electronic productin domestic household waste.
Product Category
With reference to the equipment types in the WEEE directive Annex 1, this product isclassified as a “Monitoring and Control instrumentation” product.
Do not dispose in domestic household waste.
When disposing products in the EU, contact your local Yokogawa Europe B. V. office.
1st Edition : Feb.01,1999-00
Toc-1<Int> <Ind> <Rev>
IM 34M6H54-01E
CONTENTS
1st Edition : Feb.01,1999-00
Pulse Input Module
IM 34M6H54-01E 1st Edition
Preface .................................................................................................................... i
◆ Introduction ......................................................................................................... ii
◆ Safety Precautions ............................................................................................. iii
1. Overview .................................................................................................. 1-1
2. Functions and Operation ........................................................................... 2-1
2.1 Specifications.................................................................................................... 2-1
2.2 Operation of Modules ........................................................................................ 2-5
3. Attaching and Wiring Modules ................................................................... 3-1
3.1 Attaching and Detaching Modules ..................................................................... 3-1
3.1.1 Attaching Modules ............................................................................ 3-1
3.1.2 Detaching Modules ........................................................................... 3-1
3.1.3 Attaching Modules in Intense Vibration Environments ....................... 3-2
3.2 Wiring Precautions ............................................................................................ 3-3
4. Module Access ......................................................................................... 4-1
4.1 Access Using Ladder Special Module Instructions ............................................ 4-1
4.1.1 List of Data Position Numbers ........................................................... 4-1
4.1.2 Reading Data (READ/HRD) .............................................................. 4-2
4.1.3 Writing Data (WRITE/HWR) .............................................................. 4-4
4.1.4 Reading Input Relays ..................................................................... 4-10
4.1.5 Output to Output Relays ................................................................. 4-12
4.2 Access Using BASIC Statements .................................................................... 4-13
4.2.1 List of Statements ........................................................................... 4-13
4.2.2 List of Data Position Numbers ......................................................... 4-14
4.2.3 Declaring Use of Module (ASSIGN) ................................................ 4-14
4.2.4 Reading Data from the Pulse Input Module (ENTER) ...................... 4-15
4.2.5 Reading the Setting Data (STATUS) ............................................... 4-15
4.2.6 Writing the Setting Data (CONTROL) .............................................. 4-15
4.2.7 Reading Input Relays ..................................................................... 4-19
4.2.8 Output to Output Relays ................................................................. 4-23
4.2.9 Interrupt .......................................................................................... 4-26
5. Sample Programs ..................................................................................... 5-15.1 Sample Program Using Ladder Application Instructions .................................... 5-2
5.2 Sample Program Using BASIC Statements ....................................................... 5-4
Blank Page
<Toc> <Ind> <1. Overview > 1-1
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
1. OverviewThe F3XS04-3N and F3XS04-4N Pulse Input Modules are used with the FA-M3 Range-free Multi-controller. These modules receive and count voltage pulse signals of 0 to 20 kHz.A single F3XS04 module can receive up to 4-channel pulse signals.
Features
• Up to 20-kHz pulse signals can be received with four independent inputs.
• The input and output terminals are insulated from the internal circuit withphotocouplers.
• A filter can be selected using software to suppress chattering in the input signals.
• At the count edge, either the rising edge or the falling edge can be selected.
• Incorporates a 16-bit ring-up counter. The maximum ring size is programmable.
• Each channel can have two preset values.
• Generates various types of outputs for combinations of counter values and presetvalues.
• A single channel can set up to four external programmable outputs.
• Generates an interrupt signal when the counter value reaches a preset value orexceeds its maximum value.
• Counter operation can stop immediately after the counter value returns to zero.
Blank Page
<Toc> <Ind> <2. Functions and Operation > 2-1
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
2. Functions and Operation
2.1 Specifications
■ Standard Specifications
Table 2.1 Standard Specifications
Number of channels 4
Count range $0000 to $FFFF (16 bits)
Operation mode Ring up-counter
Type DC voltage
Rated input voltage 24 V DC 12 V DC
Frequency 0 to 20 kHz
Minimum pulse width 10 µs
Filter 4 µs to 132 ms (for chatter elimination)
Number of points 4
Format Transistor contact
Rated load voltage 12 to 24 V DC
Counter value ≥ Preset values 1, 2Counter value = Preset values 1, 2Counter value = 0 return *1
Insulation method Photocoupler-isolated.(all input/output points are independent.)
External connection 18-point terminal block, M3.5 screws
External dimensions 28.9 (W) ×100 (H) × 83.2 (D) mm *2
Current consumption 150 mA (at 5 V DC)
Weight 170 g
ItemSpecifications
F3XS04-3N F3XS04-4N
Counter
Input signal
Output signal
Internal comparison
Generalspecifications
T0201.EPS
*1: A counter operation of wrapping around to zero value.*2: Excluding any protrusions (see External dimension diagram for details.)
2-2<Toc> <Ind> <2. Functions and Operation >
IM 34M6H54-01E
■ Components and Their Functions
PULSE
OUT4
IN1
OUT1
XS04- uN
+-
+-
L
IN4
+-
+-
L
OUT3
IN3
+-
+-
L
OUT2
SHIELD
SHIELD
IN2
+-
+-
L
IO
CH1IO
CH2IO
CH3IO
CH4RDY
RDY indicator:Lit when the internal circuit is operating normally.
CH1 to CH2 indicator:The following indicators light up channel-by-channel, when the corresponding condition occurs.I: The input signal goes on.O: The output signal goes on.
F0201.EPS
Figure 2.1 Front View
■ Internal Circuit
Filter Counter
Counter
Photocoupler
Photocoupler
Same as the above.
Same as the above.
Internal circuit
Display circuit
L
L
4
3
2
1
15
16
17
18
IN 1
OUT 1
IN 4
OUT 4
+
–
+
–
+
–
+
–
9
10 FGShielded wire
I/Obus
+5V
F0202.EPS
Figure 2.2 Circuit Configuration
1st Edition : Feb.01,1999-00
<Toc> <Ind> <2. Functions and Operation > 2-3
IM 34M6H54-01E
■ External Connection Diagram
1
3
5
7
9
11
13
15
17
1
2
5
6
10
11
12
15
16
3
4
7
8
9
13
14
17
18
2
4
6
8
10
12
14
16
18
IN1 –
+
–
+
–
+
–
+
–
+
SHIELD
SHIELD
OUT1
IN2 –
+
IN3 –
+
IN4 –
+
L
OUT2L
OUT3L
OUT4L
F0203.EPS
Figure 2.3 Terminal Arrangement and Interconnections
8.2 mm
M3.5 screws
7.1 mm6.4 mm
F0204.EPS
Figure 2.4 Terminal Screw
■ External Connections
Table 2.2 Wire and Terminals
Applicable conductor size 0.3 to 0.75 mm2 (AWG22 to 18)
Wire connection method Crimp-on type
Wire temperature rating 75°C min.
Wire material Copper
Crimp-on terminals For M3.5 screws
Tightening torque 0.8 N.cm (8 kgf.cm, 6.9 lbf.in)
Applicable crimp-on Example: Japan Solderless Terminal Mfg Co.,Ltd.: V1.25-M3terminals Nihon Tanshi Co.,Ltd.: RAV1.25-3.5
Connection Method Terminal block type
Crimp-onterminals
T0202.EPS
1st Edition : Feb.01,1999-00
2-4<Toc> <Ind> <2. Functions and Operation >
IM 34M6H54-01E
■ External Dimensions
83.2 28.92
100
9
Unit: mm
F0205.EPS
Figure 2.5 External Dimensions
1st Edition : Feb.01,1999-00
<Toc> <Ind> <2. Functions and Operation > 2-5
IM 34M6H54-01E
2.2 Operation of Modules
■ Basic Operation of the CounterThe module incorporates a 16-bit ring up-counter to count the number of input pulses:rising inputs from off to on, or falling inputs from on to off. The initial value of the counter is0 (zero). The counter can count from $0 to $FFFF in hexadecimal. If the counter valueexceeds $FFFF, the counter will reset to 0.
Select a count edge of either rising or falling to count the number of input pulses (see theinput functions).
TIP
Note that a count value exceeding 32,767 in decimal numbers is expressed as a negative number.
■ Setting the Ring Up-Counter Maximum ValueThe counter has been set to count $0 to $FFFF in hexadecimal as a ring up-counter.However, the maximum count value of the counter can be changed by setting bit 1 at theinput data set position and changing preset value 2 to an appropriate value. The ring up-counter maximum set value is given by:
Ring up-counter maximum value = (preset value 2) – 1
In the above setting, if bit 0 is set, the ring up-counter maximum value will be $FFFF (seethe example below).
Example: When set value 2 is changed to 5, the ring up-counter is configured as follows:
Counter value changes: 0 to 1 to 2 to 3 to 4 to 0 to 1 to 2 to 3 to 4 to 0 to 1 to 2 to ......
The module detects a preset value when the counter value changes from 4 to 5, andthe counter will then reset to 0. This will configure a 0 to 4 ring up-counter.
When the counter is used as a variable ring up-counter, set the ring maximum value greaterthan 20 (instead of set value 2). If the input pulse frequency is 1 kHz or lower, there is nomaximum set value limitation on preset value 2.
Input pulse frequency Preset value 2 for variable ring up-counter
0 Hz to 1 kHz No limitations on preset value 2
1 to 20 kHz Preset value 2 ≥ 20TC0202.EPS
CAUTION
To change the ring up-counter maximum value, first stop the counter operation and thenreset it. If its maximum value is changed while the counter is operating, operation of thecounter will not be assured.
1st Edition : Feb.01,1999-00
2-6<Toc> <Ind> <2. Functions and Operation >
IM 34M6H54-01E
■ Resetting the CounterResetting the counter means that the counter value returns to 0 (zero). A counter value isreset to 0 by setting the following or if the counter value exceeds its maximum set value.
(1) Resetting by output relays
Turning on (1) output relays Yuuu36, Yuuu40, Yuuu44, and Yuuu48 (slotnumbers for modules are entered in uuu) related to input channels 1 to 4 will resettheir related counter values.
(2) Counter value exceeds its maximum value
A counter value is reset when it exceeds its maximum value.
■ Counter Enabled and DisabledOperation of the counter is enabled or disabled by setting the following:
(1) Enabling or disabling the counter by output relays
To set Counter Enabled or Disabled, use output relays Yuuu49, Yuuu53,Yuuu57, and Yuuu61 (slot numbers for modules are entered in uuu) related toinput channels 1 to 4. While the output relay related to the input channel is off (0),counter operation is disabled. While the output relay related to the input channel is on(1), counter operation is enabled. Counter operation in the initial state after the poweris turned on is disabled (“stop counter operation”).
(2) Automatically stop the counter operation when the counter value is reset.
Operation of the counter will stop when the counter value exceeds its maximum valueand it is then reset. To stop the counter operation, set bit 1 rather than bit 2 at the dataposition at which the corresponding input is set. When 0 is set for bit 2, counteroperation will continue.
To restart the counter operation, turn on the output relays related to the input channels 1 to4 (Yuuu35, Yuuu39, Yuuu43, and Yuuu47).
1st Edition : Feb.01,1999-00
<Toc> <Ind> <2. Functions and Operation > 2-7
IM 34M6H54-01E
■ Comparing Counter Values with Preset ValuesThis module can provide two preset values (1 and 2) per input channel.
Counter values are always compared with these preset values.
• Equal (counter value = preset value)
• Counter value is smaller than the preset value (counter value < preset value)
• Counter value is equal to or greater than the preset value (counter value ≥ presetvalue)
These comparisons are applied to the input relays Xuuu01 to Xuuu31 (not includingXuuu04, Xuuu08, Xuuu12, Xuuu16, Xuuu19, Xuuu20, Xuuu23, Xuuu24,Xuuu27, and Xuuu28).
Input relays Xuuu01 to Xuuu15 (not including Xuuu04, Xuuu08, and Xuuu12) andthe corresponding external outputs will be off (0) if the related output relays Yuuu33through Yuuu47 (not including Yuuu36, Yuuu40, and Yuuu44) change from off (0) toon (1).
Preset value 2 is applicable as a maximum value of the ring up-counter.
The following gives an example of the coincidence of a counter value and the preset value.
When the set value is 0 (initial value):
The coincidence is detected when a counter value exceeds its maximum value andreturns to 0.
When $FFFF is set for the set value:
The coincidence is detected when the counter value exceeds $FFFE and thenreaches $FFFF.
TIP
The coincidence of a counter value with a preset value is detected when the counter value reaches thepreset value. However, when an output relay resets a counter value to 0 and the preset value is 0, orwhen the set value has been changed to agree with the current counter value, the coincidence will not bedetected.
■ InterruptsAn interrupt can be allowed in the following states:
(1) When the counter value and preset value 1 coincide;
(2) When the counter value and preset value 2 coincide; and
(3) When the counter value resets to 0 (zero).
This interrupt is allowed by declaring an interrupt.
1st Edition : Feb.01,1999-00
2-8<Toc> <Ind> <2. Functions and Operation >
IM 34M6H54-01E
■ Output to External Output TerminalThe module incorporates four independent external output terminals to allow program-mable setting of external outputs. Output setting can be made by:
(1) Output selection, and
(2) Interconnections between output and input channels.
(1) Output selection
Comparing the counter values with preset value 1 or 2 allows any output to be se-lected from among eight latched outputs or status outputs, as well as counter operat-ing states, “output normally on” and “output normally off.” In the initial state, latchedoutputs, after the counter values have been compared with preset value 1, will beselected.
The latched outputs are turned on when the counter value and preset value 1 or 2coincide, or when the counter value exceeds a ring up-counter maximum value and isreset. If a user’s program turns on a related output relay, the latched output will be off(0). The latched output remains on until it is reset.
A state output will be on when the comparison operation is true, and will be off whenthe comparison operation is false.
The counter operating status indication output remains on (1) while the counter is inoperation, and remains off (0) while the counter is not in operation.
An output that is normally on or off remains on or off regardless of the counter operat-ing status.
(2) Interconnections between input and output channels
Up to four remote output terminals can be set to output comparison results obtained ina one-input channel. In the initial state, “output is issued to remote output terminals nrelating to the input terminal n” has been set. For example, comparison results in inputchannel 1 are issued to remote output terminal 1.
Interconnecting between the input and output channels allows comparison results ofcounter values in input channel 1 with preset values 1 and 2 to be output to fourremote output terminals. However, note that comparison results in input channels 2through 4 cannot be issued to the remote output terminals.
1st Edition : Feb.01,1999-00
<Toc> <Ind> <2. Functions and Operation > 2-9
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
■ Input filterIf the module accepts dry-contact input pulses which may contain chattering noise, and thecounter counts these pulses, accurate counter values will not be obtained. To obtain acorrect counter value, use an input filter. Whether or not an input filter is used for eachchannel can be set. Input filter constants are common to all input channels. For applica-tions where the modules are used in a location with undesired electrical disturbance, set anappropriate filter using application software.
Pulse input
$FFFF
$00 $02 $06
Preset value 2
Preset value 1
0
Counter enabledYuuu49 *1
Input functionality
Counter value resets to 0 (zero)Xuuu03 *1
X03 (reset) Yuuu35 *1
F0206.EPS
Countervalue
*1: The relay numbers shown above are for channel 1.
Figure 2.6 Counter Operations (1)
2-10<Toc> <Ind> <2. Functions and Operation >
IM 34M6H54-01E
Pulse input
$FFFF
$00
Preset value 2 *1
Preset value 1 *1
0
Counter enabledYuuu49 *2
Input function
Counter value resets to 0Xuuu03 *2
Counter value = preset value 1Xuuu01 *2
Counter value = preset value 2Xuuu02 *2
Counter value ≥ preset value 1Xuuu17 *2
Counter value ≥ preset value 2Xuuu18 *2
X01 (reset)Yuuu33 *2
X02 (reset)Yuuu34 *2
X03 (reset)Yuuu35 *2
F0207.EPS
Counter value
*1: If the set value exceeds 32,767 in decimal numbers ($7FFF in hexadecimal), it will be handled as a negative integer,and compared with signed integers (0 to 65,535) for comparison operations inside the XS04.
*2: The relay numbers shown above are for channel 1.
Figure 2.7 Counter Operations (2)
1st Edition : Feb.01,1999-00
<Toc> <Ind> <3. Attaching and Wiring Modules > 3-1
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
3. Attaching and Wiring Modules
3.1 Attaching and Detaching Modules
3.1.1 Attaching ModulesFigure 3.1 shows how to attach the pulse input module (hereinafter referred to as module)to the base module. First hook the anchor slot at the bottom of the module to be attachedonto the anchor pin on the bottom of the base module. Push the top of this module in thedirection of the arrow shown in the figure (toward the base module) until the yellow, spring-loaded anchor/release button clicks into place.
F0301.EPS
Anchor pin
Base Module
F3XS04-N module
Figure 3.1 Attaching Modules
CAUTION
DO NOT bend the connector on the rear of the module by force during the above operation.If the module is forcibly pushed with an improper connection, the connector may bend andthis damage will cause a module installation error during the self-diagnosis.
3.1.2 Detaching ModulesTo remove this module from the base module, reverse the above operation by pressing theyellow anchor/release button to unlock it, and tilting the module away from the base mod-ule. Then lift the module off of the anchor pin at the base.
3-2<Toc> <Ind> <3. Attaching and Wiring Modules >
IM 34M6H54-01E
3.1.3 Attaching Modules in Intense Vibration EnvironmentsIf the modules are used in intense vibration environments, fasten the modules with a screwdirectly beneath the yellow anchor/release button, as shown in Figure 3.2. For this, use a12- to 14-mm long M4 (4-mm thick) binder screw. With a Phillips screwdriver, tighten theupper side of the module with this screw. During this operation, the user must tilt thescrewdriver somewhat using the guide channel at the top of the module. A clearance ofapproximately 100 mm between the module and the duct above it is necessary to allow thescrewdriver to access the screw.
CAUTION
DO NOT overtighten the module fixing screw.
F0302.EPS
Figure 3.2 Tightening Module
1st Edition : Feb.01,1999-00
<Toc> <Ind> <3. Attaching and Wiring Modules > 3-3
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
3.2 Wiring Precautions(1) Connecting input terminals
Do not reverse the connections. If connected in reverse, the module will not work.
IN –
IN +
+
–
F3XS04-uN
F0303.EPS
Figure 3.3 Connecting Input Terminals
If the modules are used in harsh environments where they are influenced by noise interfer-ence, apply a shielded, twisted-pair cable for the connection between the signal source andF3X04-uN module.
Connect the shielding wire of the twisted pair to the F3X04-uN shield terminal. Each shieldterminal of F3X04-uN module is connected to the frame ground (FG) terminal of the powersupply module through the base module.
IN1
SHIELD
Signal source F3XS04-uN Module
F0304.EPS
Figure 3.4 Connecting the Signal Source and FSX04-uN Module
3-4<Toc> <Ind> <3. Attaching and Wiring Modules >
IM 34M6H54-01E
(2) Do not reverse the output connections. If an inductive load is connected, connect adiode in parallel with the load as indicated in Figure 3.5. Connect the diode so that itscathode will be connected to the positive line of the power supply.
F3XS04-uN
OUT –
+
–
OUT +L
12/24 V DC
OUT –
+
–
OUT +
Diode
L
Transistoroutput
Diode
F0305.EPS
Reverse voltage over 10 times the circuit voltage and forward current over 2 times the load current
Figure 3.5 Connecting Output Terminals
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-1
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
4. Module Access
4.1 Access Using Ladder Special ModuleInstructions
4.1.1 List of Data Position NumbersThe data position numbers (ladder) of the F3XS04-uN Pulse Input Module are shown inTable 4.1.
There are the following two data areas.
[1] Input data: The region in which the counter value of each channel is stored
[2] Setting data: The region in which the preset values, input function, output function,and input filter constant of each channel is set
Table 4.1 List of Data Position Numbers
Input data 1 Counter value of input channel 1 $0
2 Counter value of input channel 2 $0
3 Counter value of input channel 3 $0
4 Counter value of input channel 4 $0
Setting data 17 Preset value 1 of input channel 1 $0
18 Preset value 2 of input channel 1 $0
19 Input function of input channel 1 $0
20 Output function of output terminal 1 $0
21 Preset value 1 of input channel 2 $0
22 Preset value 2 of input channel 2 $0
23 Input function of input channel 2 $0
24 Output function of output terminal 2 $1000
25 Preset value 1 of input channel 3 $0
26 Preset value 2 of input channel 3 $0
27 Input function of input channel 3 $0
28 Output function of output terminal 3 $2000
29 Preset value 1 of input channel 4 $0
30 Preset value 2 of input channel 4 $0
31 Input function of input channel 4 $0
32 Output function of output terminal 4 $4000
33 Input filter constant setting, common to all channels $DT0401.EPS
Region Contents Initial valueData
positionnumber
4-2<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
4.1.2 Reading Data (READ/HRD)Use the special module read instruction and special module high-speed read instruction forreading the data from the pulse input module.
SEE ALSO
Refer to the following instruction manual for details on the special module read instruction and specialmodule high-speed read instruction.
Sequence CPU Instruction Manual — Instructions (IM 34M6P12-03E)
Table 4.2 Special Module Read/High-speed Read Instructions
READ
FUNNo.
Specialmoduleread
Instruction Mnemonic SymbolNecessary
Notnecessary
Input conditionExecutioncondition
Stepcount
Processingunit Carry
81 READ 5
READ81P ↑READ 6
● — 16 bits —
HRDSpecialmodulehigh-speed read
83 HRD 5
HRD83P ↑HRD 6
● — 16 bits —
T0402.EPS
• Symbols
Slot number ... 3-digit integer with the following structure (leading 0’s can be omitted):
kSL n1 DREAD
kSL n1 DHRD
Physical slot (1 to 13) where the pulse input module is installed
Unit numberMain unit: 0Sub-unit: 1 to 7 (for sequence CPU)
X XX
SL: Slot numbern1: First data positionD: First device number for writing data readk: Transfer data count
First data position number for reading ... Data position number from which to start reading (Table 4.1)First device number for writing data read ... For the device which can be used, refer to the Sequence CPU
Instruction Manual — Instructions (IM 34M6P12-03E).Transfer data count ... Number of data to be read FC040102.EPS
CAUTION
The special module long-word read instruction cannot be used. The operation is not guar-anteed if this instruction is used to read data from the pulse input module.
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-3
IM 34M6H54-01E
Example: Reading counter value
• Specify the data position number of the input data in the first data position number forread data (n1).
• The data position number of the input data corresponds to the channel number.
Program example for reading counter value
When X00501 is on, it reads four data channels from channel 1 to 4 of the pulse inputmodule installed in slot number 106 into the data registers (D0001 to D0004).
4106 1 D0001X00501
READ
1
2
3
4
F3XS04-uN
1
2
3
4
Data Register
D0001
D0002
D0003
D0004
5
6
7
8
9
10
11
F0401.EPS
Read
16 bits
Figure 4.1 Reading Counter Value
1st Edition : Feb.01,1999-00
4-4<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
4.1.3 Writing Data (WRITE/HWR)Use the special module write instruction and special module high-speed write instructionfor writing data to the pulse input module.
SEE ALSO
Refer to the following instruction manual for details on the special module write instruction and specialmodule high-speed write instruction.
Sequence CPU Instruction Manual — Instructions (IM 34M6P12-03E)
Table 4.3 Special Module Write/High-speed Write Instruction
WRITE
FUNNo.
Specialmodulewrite
Instruction Mnemonic SymbolNecessary
Notnecessary
Input conditionExecutioncondition
Stepcount
Processingunit Carry
82 WRITE 5
WRITES82P ↑WRITE 6
● — 16 bits —
HWRSpecialmodulehigh-speed write
84 HWR 5
HWR84P ↑HWR 6
● — 16 bits —
T0403.EPS
• Symbols
First data position number for writing ... Data position number from which to start writing (Table 4.1)Transfer data count ... Number of data to be written
kS SL n2WRITE
Physical slot position (1 to 13) where the analog input/output module is installed
Unit numberMain unit: 0Sub-unit: 1 to 7 (for sequence CPU)
X XX
kS SL n2HWR
S: First device number for writing dataSL: Slot numbern2: First data position number for writingk: Transfer data count
Starting device number for writing data ... For the device which can be used, please refer to the Sequence CPU Instruction Manual — Instructions (IM 34M6P12-03E).
Slot number ... 3-digit integer with the following configuration (leading 0’s can be omitted):
FC040103.EPS
CAUTION
The special module long-word write instruction cannot be used. The operation is not guar-anteed if this instruction is used to write data from the pulse input module.
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-5
IM 34M6H54-01E
Example: Writing the preset value, input function, output function, and input filter constant
Specify the data position number of the output data in the first data position number forwrite data (n2).
Program example for writing setting data
When X00502 is on, it writes (outputs) the setting data to the pulse input module installed inslot number 107. It assumes that the data to be written is stored in data registers D0017 toD0033.
17D0017 107 17X00502
WRITE
F3XS04-uN Data Register
Data position number 17
Data position number 18
Data position number 19
Data position number 20
Data position number 21
Data position number 22
Data position number 23
Data position number 24
Data position number 25
Data position number 26
Data position number 27
Data position number 28
Data position number 29
Data position number 30
Data position number 31
Data position number 32
Data position number 33
Preset value 1 of input channel 1
Preset value 2 of input channel 1
Input function of input channel 1
Output function of output terminal 1
Preset value 1 of input channel 2
Preset value 2 of input channel 2
Input function of input channel 2
Output function of output terminal 2
Preset value 1 of input channel 3
Preset value 2 of input channel 3
Input function of input channel 3
Output function of output terminal 3
Preset value 1 of input channel 4
Preset value 2 of input channel 4
Input function of input channel 4
Output function of output terminal 4
Input filter constant setting, common to all channels
D0017
D0018
D0019
D0020
D0021
D0022
D0023
D0024
D0025
D0026
D0027
D0028
D0029
D0030
D0031
D0032
D0033
D0034
D0035
D0036
16 bits
Write
F0402.EPS
Figure 4.2 Writing Preset Values, Input Function, Output Function, and Input Filter Constants
1st Edition : Feb.01,1999-00
4-6<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
● Preset values
Preset values 1 and 2 are used for comparison with the counter value. Preset value 2 canbe used as the ring up-counter maximum value.
CAUTION
To change the ring up-counter maximum value, first stop the counter operation and thenreset it. If its maximum value is changed while the counter is operating, operation of thecounter will not be assured.
SEE ALSO
For information on how to stop the counter operation, refer to “Counter Enabled and Disabled” in Section2.2, “Operation of modules.”
SEE ALSO
For information on how to reset the counter value, refer to “Resetting the Counter” in Section 2.2, “Opera-tion of modules.”
● Input function
The input function is set using bit numbers 0 to 3 of the data position number correspondingto the input channel.
Bit number
TC040103_01.EPS
Inputchannel
Data positionnumber
1 19
2 23
3 27
4 31
15
0
0
0
0
14
0
0
0
0
13
0
0
0
0
12
0
0
0
0
11
0
0
0
0
10
0
0
0
0
9
0
0
0
0
8
0
0
0
0
7
0
0
0
0
6
0
0
0
0
5
0
0
0
0
4
0
0
0
0
3
0
0
0
0
2
0
0
0
0
1
0
0
0
0
0
0
0
0
0
• Bit number 0: Counter edge setting
Select whether to count on the rising edge or the falling edge.
0: Count on rising edge
1: Count on falling edge
• Bit number 1: Ring up-counter maximum value setting
Select whether to use the initial value of the ring up-counter maximum value or to use(preset value 2 - 1).
0: Use the initial value ($FFFF) for the ring up-counter maximum value.
1: Use (preset value 2 - 1) as the ring up-counter maximum value.
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-7
IM 34M6H54-01E
• Bit number 2: Stop setting of counter operation
Select the counter operation when the counter values exceeds the ring up-countermaximum value and returns to 0.
0: When returned to 0, counter operation continues.
1: When returned to 0, counter operation stops.
• Bit number 3: Setting use of input filter
Select whether to use the input filter. The input filter constant setting is common to allchannels.
0: Do not use input filter.
1: Use input filter.
● Output function
The output function can be set by selecting the output using bits 0 to 9 of the data positionnumber corresponding to each channel and then setting the output-input interconnectionsusing bits 12 to 14.
Bit number
TC040103_02.EPS
Outputchannel
Data positionnumber
1 20
2 24
3 28
4 32
15
0
0
0
0
14
0
0
0
1
13
0
0
1
0
12
0
1
0
0
11
0
0
0
0
10
0
0
0
0
9
0
0
0
0
8
0
0
0
0
7
0
0
0
0
6
0
0
0
0
5
0
0
0
0
4
0
0
0
0
3
0
0
0
0
2
0
0
0
0
1
0
0
0
0
0
0
0
0
0
The initial values are defined as follows:
Data position number 20 is set to $0000
“Counter value of input channel 1 = preset value 1 of input channel 1” latched output
Data position number 24 is set to $1000
“Counter value of input channel 2 = preset value 1 of input channel 2” latched output
Data position number 28 is set to $2000
“Counter value of input channel 3 = preset value 1 of input channel 3” latched output
Data position number 32 is set to $4000
“Counter value of input channel 4 = preset value 1 of input channel 4” latched output
1st Edition : Feb.01,1999-00
4-8<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
• Output selection
This selects the output type for the comparison results of the counter value with eitherpreset value 1 or 2, or outputs the counter operating status.
Bit numberOutput selection and type
TC040103_03.EPS
9
0
0
0
0
0
0
0
0
0
0
1
8
0
0
0
0
0
0
0
0
0
1
*
7
0
0
0
0
0
0
0
0
1
*
*
6
0
0
0
0
0
0
0
1
*
*
*
5
0
0
0
0
0
0
1
*
*
*
*
4
0
0
0
0
0
1
*
*
*
*
*
3
0
0
0
0
1
*
*
*
*
*
*
2
0
0
0
1
*
*
*
*
*
*
*
1
0
0
1
*
*
*
*
*
*
*
*
0
0
1
*
*
*
*
*
*
*
*
*
Counter value = preset value 1, latched type
Counter value < preset value 1, state type
Counter value ≥ preset value 1, state type
Counter value = preset value 2, latched type
Counter value < preset value 2, state type
Counter value ≥ preset value 2, State type
Preset value 1 ≤ counter value < preset value 2, state type
Counter value returns to 0, latched type
Counter operating status (on when stopped), state type
Normally off
Normally on
* Indicates bit position which can be either 0 or 1.
• Interconnections between output-input channels
For each output channel, this sets the corresponding input channel whose compari-son result is to be output.
Bit numberConnections to input channel
TC040103_04.EPS
Outputchannel
1
2
3
4
14
0
0
0
1
13
0
0
1
*
12
0
1
*
*
Comparison results, etc. of input channel 1
Comparison results, etc. of input channel 2
Comparison results, etc. of input channel 3
Comparison results, etc. of input channel 4
* Indicates position which can be either 0 or 1.
Example setting for the output and output-input channel interconnections
Output-input channel interconnections Output selection Setting example
TC040103_05.EPS
Counter value of channel 1 = preset value 1, latched type output
Counter value of channel 1 < preset value 1, state type output
Counter value of channel 2 returns to 0, latched type output
Preset value 1 ≤ counter value of channel 3 < preset value 2, state type
Output channel 1 See Example 1 on the nextpage.
Output channel 2 See Example 2 on the nextpage.
Output channel 3 See Example 3 on the nextpage.
Output channel 4 See Example 4 on the nextpage.
Example of the previous settings using a ladder program
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-9
IM 34M6H54-01E
Example 1: Setting $0000 to data position number 20 for the output function in outputchannel 1
Bit number
TC040103_06.EPS
Outputchannel
Data positionnumber
1 20
15
0
14
0
13
0
12
0
11
0
10
0
9
0
8
0
7
0
6
0
5
0
4
0
3
0
2
0
1
0
0
0
Example 2: Setting $0001 to data position number 24 for the output function in outputchannel 2
Bit number
TC040103_07.EPS
Outputchannel
Data positionnumber
2 24
15
0
14
0
13
0
12
0
11
0
10
0
9
0
8
0
7
0
6
0
5
0
4
0
3
0
2
0
1
0
0
1
Example 3: Setting $1040 to data position number 28 for the output function in outputchannel 3
Bit number
TC040103_08.EPS
Outputchannel
Data positionnumber
3 28
15
0
14
0
13
0
12
1
11
0
10
0
9
0
8
0
7
0
6
1
5
0
4
0
3
0
2
0
1
0
0
0
Example 4: Setting $2020 to data position number 32 for the output function in outputchannel 4
Bit number
TC040103_09.EPS
Outputchannel
Data positionnumber
4 32
15
0
14
0
13
1
12
0
11
0
10
0
9
0
8
0
7
0
6
0
5
1
4
0
3
0
2
0
1
0
0
0
1st Edition : Feb.01,1999-00
4-10<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
● Input filter constant
Input filter constants are set in bits 0 to 3 of data position number 33 using the ladderprogram. The initial value is set so that the minimum pulse width that can be counted is32.8 ms (a preset value of 13).
Bit number
TC040103_10.EPS
Data positionnumber
33
15
0
14
0
13
0
12
0
11
0
10
0
9
0
8
0
7
0
6
0
5
0
4
0
3
1
2
1
1
0
0
1
Bit number
TC040103_11.EPS
Preset value
0 ($0000)
1 ($0001)
2 ($0002)
3 ($0003)
4 ($0004)
5 ($0005)
6 ($0006)
7 ($0007)
8 ($0008)
9 ($0009)
10 ($000A)
11 ($000B)
12 ($000C)
13 ($000D)
14 ($000E)
15 ($000F)
10 µs
13 µs
21 µs
37 µs
69 µs
130 µs
260 µs
520 µs
1.1 ms
2.1 ms
4.1 ms
8.2 ms
16.4 ms
32.8 ms
65.6 ms
132 ms
—
—
3 µs
11 µs
27 µs
59 µs
120 µs
250 µs
510 µs
1 ms
2 ms
4 ms
8.1 ms
16.3 ms
32.7 ms
65.5 ms
3
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
2
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
Minimum pulse widththat is countable
Maximum pulse widthwhich is not counted
CAUTION
When an input filter is set, it restricts the pulse width of input pulses that can pass through.
4.1.4 Reading Input RelaysThe input relays used in the Pulse Input Module are shown in Table 4.4.
These relays are either latched type or state type. Latched type relays turn on when the setconditions are satisfied; they stay on until the output relay that is used to turn off the inputrelay changes from off to on. State type relays are on while the conditions are satisfied andoff when the conditions are not satisfied.
Xuuu01
FC040104.EPS
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-11
IM 34M6H54-01E
Table 4.4 Input Relays Used in the Pulse Input Module
Input relaynumber
Relay status=on Relay status=off TypeIs interruptpossible?
T0404.EPS
Xuuu01
Xuuu02
Xuuu03
Xuuu05
Xuuu06
Xuuu07
Xuuu09
Xuuu10
Xuuu11
Xuuu13
Xuuu14
Xuuu15
Xuuu17
Xuuu18
Xuuu19
Xuuu21
Xuuu22
Xuuu23
Xuuu25
Xuuu26
Xuuu27
Xuuu29
Xuuu30
Xuuu31
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
State No
State No
State No
State No
State No
State No
State No
State No
State No
State No
State No
State No
Counter value of input channel 1 = preset value 1
Counter value of input channel 1 = preset value 2
Counter value of input channel 1 exceeds ring maximum value and returns to 0Counter value of input channel 2 = preset value 1
Counter value of input channel 2 = preset value 2
Counter value of input channel 2 exceeds ring maximum value and returns to 0Counter value of input channel 3 = preset value 1
Counter value of input channel 3 = preset value 2
Counter value of input channel 3 exceeds ring maximum value and returns to 0Counter value of input channel 4 = preset value 1
Counter value of input channel 4 = preset value 2
Counter value of input channel 4 exceeds ring maximum value and returns to 0Counter value of input channel 1 ≥ preset value 1
Counter value of input channel 1 ≥ preset value 1
Counter value of input channel 1 not operating
Counter value of input channel 2 ≥ preset value 1
Counter value of input channel 2 ≥ preset value 1
Counter value of input channel 2 not operating
Counter value of input channel 3 ≥ preset value 1
Counter value of input channel 3 ≥ preset value 1
Counter value of input channel 3 not operating
Counter value of input channel 4 ≥ preset value 1
Counter value of input channel 4 ≥ preset value 1
Counter value of input channel 4 not operating
Counter value of input channel 1 ≠ preset value 1
Counter value of input channel 1 ≠ preset value 2
Counter value of input channel 1 does not exceed ring maximum value
Counter value of input channel 2 ≠ preset value 1
Counter value of input channel 2 ≠ preset value 2
Counter value of input channel 2 does not exceed ring maximum value
Counter value of input channel 3 ≠ preset value 1
Counter value of input channel 3 ≠ preset value 2
Counter value of input channel 3 does not exceed ring maximum value
Counter value of input channel 4 ≠ preset value 1
Counter value of input channel 4 ≠ preset value 2
Counter value of input channel 4 does not exceed ring maximum value
Counter value of input channel 1 < preset value 1
Counter value of input channel 1 < preset value 2
Counter of input channel 1 operating
Counter value of input channel 2 < preset value 1
Counter value of input channel 2 < preset value 2
Counter of input channel 2 operating
Counter value of input channel 3 < preset value 1
Counter value of input channel 3 < preset value 2
Counter of input channel 3 operating
Counter value of input channel 4 < preset value 1
Counter value of input channel 4 < preset value 2
Counter of input channel 4 operating
Xuuu04, Xuuu08, Xuuu12, Xuuu16, Xuuu20, Xuuu24, Xuuu28, Xuuu32 are not used (they are always off).
1st Edition : Feb.01,1999-00
4-12<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
4.1.5 Output to Output RelaysThe output relays used in the pulse input module are shown in Table 4.5.
Yuuu33
FC040105.EPS
Table 4.5 Output Relays Used in the Pulse Input Module
Output relaynumber Actions when on Remarks
Yuuu33
Yuuu34
Yuuu35
Yuuu36
Yuuu37
Yuuu38
Yuuu39
Yuuu40
Yuuu41
Yuuu42
Yuuu43
Yuuu44
Yuuu45
Yuuu46
Yuuu47
Yuuu48
Yuuu49
Yuuu53
Yuuu57
Yuuu61
Actions performed when changing from off to on
Count operation disabled with output relay off.Factory setting: Off
Resets input relay Xuuu01 (or the external output terminal selected by this state).
Resets input relay Xuuu02 (or the external output terminal selected by this state).
Resets input relay Xuuu03 (or the external output terminal selected by this state).
Resets counter of input channel 1.
Resets input relay Xuuu05 (or the external output terminal selected by this state).
Resets input relay Xuuu06 (or the external output terminal selected by this state).
Resets input relay Xuuu07 (or the external output terminal selected by this state).
Resets counter of input channel 2.
Resets input relay Xuuu09 (or the external output terminal selected by this state).
Resets input relay Xuuu10 (or the external output terminal selected by this state).
Resets input relay Xuuu11 (or the external output terminal selected by this state).
Resets counter of input channel 3.
Resets input relay Xuuu13 (or the external output terminal selected by this state).
Resets input relay Xuuu14 (or the external output terminal selected by this state).
Resets input relay Xuuu15 (or the external output terminal selected by this state).
Resets counter of input channel 4.
Enables count operation for input channel 1.
Enables count operation for input channel 2.
Enables count operation for input channel 3.
Enables count operation for input channel 4.T0405.EPS
(Note) In situations where the count operation returns to 0 and stops, the count operation will be resumed by changing theoutput relays Yuuu35, Yuuu39, Yuuu43, Yuuu47 from off to on (or in situations where the ring up-counterexceeds the maximum value, the count operation will be resumed by resetting the input relay that turned on).
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-13
IM 34M6H54-01E
4.2 Access Using BASIC Statements
4.2.1 List of StatementsThe BASIC statements given in Table 4.6 can be used in the pulse input module.
Operation of the module cannot be assured if statements other than those given in thetable are used.
Table 4.6 BASIC Statements Which Can Be Used
Function Format of statements Explanation
Declare use of module
(Example)ASSIGN XS04=SL
SL: Slot number
Defines the correspondence between modules and slot numbers.Execute this statement without fail before accessing the input pulse module.Use this statement within the main program.
Read data from the pulse input module
ENTER SL, n NOFORMAT;1 OrENTER SL NOFORMAT;I (*)
SL: Slot numbern: Data position No.
(channel number)I: Variable name in which
read data is stored
Reads the counter value of channel number n of the pulse input module installed in slot numbers SL and stores it in input variable I.If the channel number is not specified, it stores the counter values read sequentially from channel number 1 into input array variable I(*).
Read setting data STATUS SL, n ; POrSTATUS SL ; P
SL: Slot numbern: Data position numberP: Variable name in which
read data is stored
Reads the preset values, input function, output function, and filter constant at data position number n of the pulse input module installed in slot number SL and stores it in input variable P.
Write setting data CONTROL SL , n; POrCONTROL SL; P
SL: Slot numbern: Data position numberP: Setting data
Sets the preset values, input function, output function, and filter constant at data position number n of the pulse input module installed in slot number SL. Specify the preset values, input function, output function, and input filter constant in setting data P.
Read the status of the input relay
STATUS SL, 100+n; PSL: Slot numbern: Data position number (1
or 2)P: Variable name in which
read value is stored
Reads the status of the input relays Xuuu01 to Xuuu32 of the pulse input module installed in slot number SL and stores it in variable P.
Output to the output relay
CONTROL SL , 100+n; P, MSL: Slot numbern: Data position number (1
or 2)P: Output dataM: Mask pattern
Output to the output relays Yuuu33 to Yuuu64 of the pulse input module installed in slot number SL. You can access specific output relays only using the mask pattern.
T0406.EPS
1st Edition : Feb.01,1999-00
4-14<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
4.2.2 List of Data Position NumbersThe data position numbers (BASIC) of the F3XS04-uN Pulse Input Module are shown inTable 4.7.
There are the following two regions for data.
[1] Input data: The region in which the counter value of each channel is stored
[2] Setting data: The region in which the preset values, input function, output function,and input filter constant of each channel are set
Table 4.7 List of Data Position Numbers (BASIC)
1 Counter value of input channel 1 $0
2 Counter value of input channel 2 $0
3 Counter value of input channel 3 $0
4 Counter value of input channel 4 $0
17 Preset value 1 of input channel 1 $0
18 Preset value 2 of input channel 1 $0
19 Input function of input channel 1 $0
20 Output function of output terminal 1 $0
21 Preset value 1 of input channel 2 $0
22 Preset value 2 of input channel 2 $0
23 Input function of input channel 2 $0
24 Output function of output terminal 2 $1000
25 Preset value 1 of input channel 3 $0
26 Preset value 2 of input channel 3 $0
27 Input function of input channel 3 $0
28 Output function of output terminal 3 $2000
29 Preset value 1 of input channel 4 $0
30 Preset value 2 of input channel 4 $0
31 Input function of input channel 4 $0
32 Output function of output terminal 4 $4000
33 Input filter constant setting, common to all channels $DT0407.EPS
Initial valueData position number ContentsRegion
Input data
Setting data
4.2.3 Declaring Use of Module (ASSIGN)Declaration of use of the module is always carried out by the ASSIGN statement beforeaccessing the pulse input module.
The ASSIGN statement defines the module name and slot number.
Use the ASSIGN statement within the main program.
Physical slot position (1 to 13) where module is installedUnit numberMain unit: 0Sub-unit: 1 to 7 (for sequence CPU)
ASSIGN XS04 = SL
Module name
SL: Slot number, numeric value or variable3-digit integer of the following structure (leading 0’s can be omitted):X XX
FC040203.EPS
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-15
IM 34M6H54-01E
4.2.4 Reading Data from the Pulse Input Module (ENTER)The ENTER statement is used for reading data from the pulse input module.
The data read is stored in the specified input variable or input variable array. If the channelnumber is not specified, it reads from channel number 1. The number of channels read isdetermined by the number of input variables.
ENTER SL, n NOFORMAT ; IInput variable, numeric variable (integer type)
Channel number (1 to 4), numeric value or variableSlot number, numeric value or variable
ENTER SL NOFORMAT ; I1, I2, I3, I4I1 to I4: input data storage variable list (integer numeric variable, maximum 4)Other parameters are the same as above.
ENTER SL NOFORMAT ; I (*)I(*): Integer type array variable for input data storageOther parameters are the same as above. FC040204.EPS
CAUTION
For both input variables and input data storage variables, only the integer type can be used.The long integer type cannot be used. Operation is not assured if the long integer variableis used for the input or input data storage variables.
4.2.5 Reading the Setting Data (STATUS)The STATUS statement is used for reading the preset values, input function, output func-tion, and input filter constant of the pulse input module.
It reads the operation mode of the specified data position number and stores it in an inputvariable or input variable array.
STATUS SL, n ; PInput variable, numeric variable (integer type)Data position number (Table 4.7), numeric value or variableSlot number, numeric value or variable
FC040205.EPS
4.2.6 Writing the Setting Data (CONTROL)The CONTROL statement is used for setting the operation mode or scaling filter value ofthe analog input output module.
CONTROL SL, n ; PSetting data, numeric variable (integer type)Data position number (Table 4.7), numeric value or variableSlot number, numeric value or variable
FC040206.EPS
● Preset values
Preset values 1 and 2 are used for comparison with the counter value. Preset value 2 canbe used as the ring up-counter maximum value.
1st Edition : Feb.01,1999-00
4-16<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
CAUTION
To change the ring up-counter maximum value, first stop the counter operation and thenreset it. If its maximum value is changed while the counter is operating, operation of thecounter will not be assured.
SEE ALSO
For information on how to stop the counter operation, refer to “Counter enabled and disabled” in Section2.2, “Operation of modules.”
SEE ALSO
For information on how to reset the counter value, refer to “Resetting the counter” in Section 2.2, “Opera-tion of modules.”
● Input function
The input function is set using bit numbers 0 to 3 of the data position number correspondingto the input channel.
Bit number
TC040206_01.EPS
Inputchannel
Data positionnumber
1 3
2 7
3 11
4 15
15
0
0
0
0
14
0
0
0
0
13
0
0
0
0
12
0
0
0
0
11
0
0
0
0
10
0
0
0
0
9
0
0
0
0
8
0
0
0
0
7
0
0
0
0
6
0
0
0
0
5
0
0
0
0
4
0
0
0
0
3
0
0
0
0
2
0
0
0
0
1
0
0
0
0
0
0
0
0
0
• Bit number 0: Counter edge setting
Select whether to count on the rising edge or the falling edge.
0: Count on rising edge
1: Count on falling edge
• Bit number 1: Ring up-counter maximum value setting
Select whether to use the initial value of the ring up-counter maximum value or to use(preset value 2 - 1).
0: Use the initial value ($FFFF) for the ring up-counter maximum value.
1: Use (preset value 2 - 1) as the ring up-counter maximum value.
• Bit number 2: Stop setting of counter operation
Select the counter operation when the counter values exceeds the ring up-countermaximum value and returns to 0.
0: When returned to 0, counter operation continues.
1: When returned to 0, counter operation stops.
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-17
IM 34M6H54-01E
• Bit number 3: Setting use of input filter
Select whether to use the input filter. The input filter constant setting is common to allchannels.
0: Do not use input filter.
1: Use input filter.
● Output function
The output function can be set by selecting the output using bits 0 to 9 of the data positionnumber corresponding to each channel and then setting the output-input interconnectionsusing bits 12 to 14.
Bit number
TC040206_02.EPS
Outputchannel
Data positionnumber
1 4
2 8
3 12
4 16
15
0
0
0
0
14
0
0
0
1
13
0
0
1
0
12
0
1
0
0
11
0
0
0
0
10
0
0
0
0
9
0
0
0
0
8
0
0
0
0
7
0
0
0
0
6
0
0
0
0
5
0
0
0
0
4
0
0
0
0
3
0
0
0
0
2
0
0
0
0
1
0
0
0
0
0
0
0
0
0
The initial values are defined as follows:
Data position number 4 is set to $0000
“Counter value of input channel 1 = preset value 1 of input channel 1” latched output
Data position number 8 is set to $1000
“Counter value of input channel 2 = preset value 1 of input channel 2” latched output
Data position number 12 is set to $2000
“Counter value of input channel 3 = preset value 1 of input channel 3” latched output
Data position number 16 is set to $4000
“Counter value of input channel 4 = preset value 1 of input channel 4” latched output
• Output selection
This selects the output type for the comparison results of the counter value with eitherpreset value 1 or 2, or outputs the counter operating status.
Bit numberOutput selection and type
TC040206_03.EPS
9
0
0
0
0
0
0
0
0
0
0
1
8
0
0
0
0
0
0
0
0
0
1
*
7
0
0
0
0
0
0
0
0
1
*
*
6
0
0
0
0
0
0
0
1
*
*
*
5
0
0
0
0
0
0
1
*
*
*
*
4
0
0
0
0
0
1
*
*
*
*
*
3
0
0
0
0
1
*
*
*
*
*
*
2
0
0
0
1
*
*
*
*
*
*
*
1
0
0
1
*
*
*
*
*
*
*
*
0
0
1
*
*
*
*
*
*
*
*
*
Counter value = preset value 1, latched type
Counter value < preset value 1, state type
Counter value ≥ preset value 1, state type
Counter value = preset value 2, latched type
Counter value < preset value 2, state type
Counter value ≥ preset value 2, state type
Preset value 1 ≤ counter value < preset value 2, state type
Counter value returns to 0, latched type
Counter operating status (on when stopped), state type
Normally off
Normally on
* Indicates bit position which can be either 0 or 1.
1st Edition : Feb.01,1999-00
4-18<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
• Interconnections between output-input channels
For each output channel, this sets the corresponding input channel whose compari-son result is to be output.
Bit numberConnections to input channel
TC040206_04.EPS
Outputchannel
1
2
3
4
14
0
0
0
1
13
0
0
1
*
12
0
1
*
*
Comparison results, etc. of input channel 1
Comparison results, etc. of input channel 2
Comparison results, etc. of input channel 3
Comparison results, etc. of input channel 4
* Indicates position which can be either 0 or 1.
Example setting for the output and output-input channel interconnections
Output-input channel interconnections Output selection Setting example
TC040206_05.EPS
Counter value of channel 1 = preset value 1, latched type output
Counter value of channel 1 < preset value 1, state type output
Counter value of channel 2 returns to 0, latched type output
Preset value 1 ≤ counter value of channel 3 < preset value 2, state type
Output channel 1 See Example 1 below.
Output channel 2 See Example 2 below.
Output channel 3 See Example 3 below.
Output channel 4 See Example 4 below.
Examples of the previous settings using a BASIC program:
Example 1: Setting $0000 to data position number 4 for the output function in outputchannel 1
Bit number
TC040206_06.EPS
Outputchannel
Data positionnumber
1 4
15
0
14
0
13
0
12
0
11
0
10
0
9
0
8
0
7
0
6
0
5
0
4
0
3
0
2
0
1
0
0
0
Example 2: Setting $0001 to data position number 8 for the output function in outputchannel 2
Bit number
TC040206_07.EPS
Outputchannel
Data positionnumber
2 8
15
0
14
0
13
0
12
0
11
0
10
0
9
0
8
0
7
0
6
0
5
0
4
0
3
0
2
0
1
0
0
1
Example 3: Setting $1040 to data position number 12 for the output function in outputchannel 3
Bit number
TC040206_08.EPS
Outputchannel
Data positionnumber
3 12
15
0
14
0
13
0
12
1
11
0
10
0
9
0
8
0
7
0
6
1
5
0
4
0
3
0
2
0
1
0
0
0
Example 4: Setting $2020 to data position number 16 for the output function in outputchannel 4
Bit number
TC040206_09.EPS
Outputchannel
Data positionnumber
4 16
15
0
14
0
13
1
12
0
11
0
10
0
9
0
8
0
7
0
6
0
5
1
4
0
3
0
2
0
1
0
0
0
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-19
IM 34M6H54-01E
● Input filter constant
Input filter constants are set in bits 0 to 3 of data position number 33 using the ladderprogram. The initial value is set so that the minimum pulse width that can be counted is32.8 ms (a preset value of 13).
Bit number
TC040206_10.EPS
Data positionnumber
17
15
0
14
0
13
0
12
0
11
0
10
0
9
0
8
0
7
0
6
0
5
0
4
0
3
1
2
1
1
0
0
1
Bit number
TC040206_11.EPS
Preset value
0 ($0000)
1 ($0001)
2 ($0002)
3 ($0003)
4 ($0004)
5 ($0005)
6 ($0006)
7 ($0007)
8 ($0008)
9 ($0009)
10 ($000A)
11 ($000B)
12 ($000C)
13 ($000D)
14 ($000E)
15 ($000F)
10 µs
13 µs
21 µs
37 µs
69 µs
130 µs
260 µs
520 µs
1.1 ms
2.1 ms
4.1 ms
8.2 ms
16.4 ms
32.8 ms
65.6 ms
132 ms
—
—
3 µs
11 µs
27 µs
59 µs
120 µs
250 µs
510 µs
1 ms
2 ms
4 ms
8.1 ms
16.3 ms
32.7 ms
65.5 ms
3
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
2
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
Minimum pulse widththat is countable
Maximum pulse widthwhich is not counted
CAUTION
When an input filter is set, it restricts the pulse width of input pulses that can pass through.
4.2.7 Reading Input RelaysThe input relays used in the pulse input module is shown in Table 4.8.
These relays are either latched type or state type. Latched type relays turn on when the setconditions are satisfied; they stay on until the output relay that is used to turn off the inputrelay changes from off to on. State type relays are on while the conditions are satisfied andoff when the conditions are not satisfied.
1st Edition : Feb.01,1999-00
4-20<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
Table 4.8 Input Relays Used in the Pulse Input Module
Input relaynumber
Relay status=on Relay status=off TypeIs interruptpossible?
T0408.EPS
Xuuu01
Xuuu02
Xuuu03
Xuuu05
Xuuu06
Xuuu07
Xuuu09
Xuuu10
Xuuu11
Xuuu13
Xuuu14
Xuuu15
Xuuu17
Xuuu18
Xuuu19
Xuuu21
Xuuu22
Xuuu23
Xuuu25
Xuuu26
Xuuu27
Xuuu29
Xuuu30
Xuuu31
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
Latched Yes
State No
State No
State No
State No
State No
State No
State No
State No
State No
State No
State No
State No
Counter value of input channel 1 = preset value 1
Counter value of input channel 1 = preset value 2
Counter value of input channel 1 exceeds ring maximum value and returns to 0Counter value of input channel 2 = preset value 1
Counter value of input channel 2 = preset value 2
Counter value of input channel 2 exceeds ring maximum value and returns to 0Counter value of input channel 3 = preset value 1
Counter value of input channel 3 = preset value 2
Counter value of input channel 3 exceeds ring maximum value and returns to 0Counter value of input channel 4 = preset value 1
Counter value of input channel 4 = preset value 2
Counter value of input channel 4 exceeds ring maximum value and returns to 0Counter value of input channel 1 ≥ preset value 1
Counter value of input channel 1 ≥ preset value 1
Counter value of input channel 1 not operating
Counter value of input channel 2 ≥ preset value 1
Counter value of input channel 2 ≥ preset value 1
Counter value of input channel 2 not operating
Counter value of input channel 3 ≥ preset value 1
Counter value of input channel 3 ≥ preset value 1
Counter value of input channel 3 not operating
Counter value of input channel 4 ≥ preset value 1
Counter value of input channel 4 ≥ preset value 1
Counter value of input channel 4 not operating
Counter value of input channel 1 ≠ preset value 1
Counter value of input channel 1 ≠ preset value 2
Counter value of input channel 1 does not exceed ring maximum value
Counter value of input channel 2 ≠ preset value 1
Counter value of input channel 2 ≠ preset value 2
Counter value of input channel 2 does not exceed ring maximum value
Counter value of input channel 3 ≠ preset value 1
Counter value of input channel 3 ≠ preset value 2
Counter value of input channel 3 does not exceed ring maximum value
Counter value of input channel 4 ≠ preset value 1
Counter value of input channel 4 ≠ preset value 2
Counter value of input channel 4 does not exceed ring maximum value
Counter value of input channel 1 < preset value 1
Counter value of input channel 1 < preset value 2
Counter of input channel 1 operating
Counter value of input channel 2 < preset value 1
Counter value of input channel 2 < preset value 2
Counter of input channel 2 operating
Counter value of input channel 3 < preset value 1
Counter value of input channel 3 < preset value 2
Counter of input channel 3 operating
Counter value of input channel 4 < preset value 1
Counter value of input channel 4 < preset value 2
Counter of input channel 4 operating
Xuuu04, Xuuu08, Xuuu12, Xuuu16, Xuuu20, Xuuu24, Xuuu28, Xuuu32 are not used (they are always off).
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-21
IM 34M6H54-01E
You can use the STATUS statement to read the state of the input relay.
STATUS SL, 100+n ; PStorage variable for read valueRegister number specifying the input relay (n = 1, 2)Slot number, number or numeric variableSpecify using an integer with the following structure (leading ‘0’s can be omitted):
Physical slot location (1 to 13) where the pulse input module is installedBase unit numberMain unit: 0Sub unit: 1 to 7 (for sequence CPU)
X XX
FC040207_01.EPS
1st Edition : Feb.01,1999-00
4-22<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
The read data are allocated to 2 words in bits in the following manner.
Xuuu01
Xuuu02
Xuuu03
Not Used
Xuuu05
Xuuu06
Xuuu07
Not Used
Xuuu09
Xuuu10
Xuuu11
Not Used
Xuuu13
Xuuu14
Xuuu15
Not Used
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0bit
101
Xuuu17
Xuuu18
Xuuu19
Not Used
Xuuu21
Xuuu22
Xuuu23
Not Used
Xuuu25
Xuuu26
Xuuu27
Not Used
Xuuu29
Xuuu30
Xuuu31
Not Used
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0bit
102
FC040207_02.EPS
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-23
IM 34M6H54-01E
4.2.8 Output to Output RelaysThe output relays used in the pulse input module are shown in Table 4.9.
Table 4.9 Output Relays Used in the Pulse Input Module
Output relaynumber Actions when on Remarks
Yuuu33
Yuuu34
Yuuu35
Yuuu36
Yuuu37
Yuuu38
Yuuu39
Yuuu40
Yuuu41
Yuuu42
Yuuu43
Yuuu44
Yuuu45
Yuuu46
Yuuu47
Yuuu48
Yuuu49
Yuuu53
Yuuu57
Yuuu61
Actions performed when changing from off to on
Count operation disabled with output relay off.Factory setting: Off
Resets input relay Xuuu01 (or the external output terminal selected by this state).
Resets input relay Xuuu02 (or the external output terminal selected by this state).
Resets input relay Xuuu03 (or the external output terminal selected by this state).
Resets counter of input channel 1.
Resets input relay Xuuu05 (or the external output terminal selected by this state).
Resets input relay Xuuu06 (or the external output terminal selected by this state).
Resets input relay Xuuu07 (or the external output terminal selected by this state).
Resets counter of input channel 2.
Resets input relay Xuuu09 (or the external output terminal selected by this state).
Resets input relay Xuuu10 (or the external output terminal selected by this state).
Resets input relay Xuuu11 (or the external output terminal selected by this state).
Resets counter of input channel 3.
Resets input relay Xuuu13 (or the external output terminal selected by this state).
Resets input relay Xuuu14 (or the external output terminal selected by this state).
Resets input relay Xuuu15 (or the external output terminal selected by this state).
Resets counter of input channel 4.
Enables count operation for input channel 1.
Enables count operation for input channel 2.
Enables count operation for input channel 3.
Enables count operation for input channel 4.T0409.EPS
(Note) In situations where the count operation returns to 0 and stops, the count operation will be resumed by changing theoutput relays Yuuu35, Yuuu39, Yuuu43, Yuuu47 from off to on (or in situations where the ring up-counterexceeds the maximum value, the count operation will be resumed by resetting the input relay that turned on).
1st Edition : Feb.01,1999-00
4-24<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
You can use the CONTROL statement to output to the output relay.
CONTROL SL, 100+n ; P , MMask pattern (numeric value or variable)Output data storage variablesOutput relay specifying register number (n = 1, 2)Slot number (numeric value or variable)Specify using an integer with the following structure (leading ‘0’s can be omitted):
Physical slot location (1 to 13) where the pulse input module is installedBase unit numberMain unit: 0Sub unit: 1 to 7 (for sequence CPU)
X XX
FC040208_01.EPS
1st Edition : Feb.01,1999-00
<Toc> <Ind> <4. Module Access > 4-25
IM 34M6H54-01E
Yuuu33
Yuuu34
Yuuu35
Yuuu36
Yuuu37
Yuuu38
Yuuu39
Yuuu40
Yuuu41
Yuuu42
Yuuu43
Yuuu44
Yuuu45
Yuuu46
Yuuu47
Yuuu48
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0bit
101
Yuuu49
Not Used
Not Used
Not Used
Yuuu53
Not Used
Not Used
Not Used
Yuuu57
Not Used
Not Used
Not Used
Yuuu61
Not Used
Not Used
Not Used
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0bit
102
FC040208_02.EPS
1st Edition : Feb.01,1999-00
4-26<Toc> <Ind> <4. Module Access >
IM 34M6H54-01E
The mask pattern is used to specify the bits in the output data to be changed. Only bits thatare set to 1 are changed; output of bits 0 are not changed.
(Example)
Output data
Mask pattern
Output relay before execution
Output results
P =
M =
=
=
1 0 1 0 1 1 1 1 0 1 0 1 1 1 1 1
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0
1 0 1 0 1 1 1 1 1 1 0 0 0 1 1 0FC040208_03.EPS
4.2.9 InterruptAn interrupt can be generated when a change in the input relays Xuuu01 to
Xuuu15 from off to on is detected.
Using an ON INT statement, the program jumps to the required interrupt processing.
ON INT SL, n GOTOON INT SL, n GOSUBON INT SL, n CALL
Input relay number (1 to 15, not including 4, 8, 12)Slot number, number or numeric variableSpecify an integer of the following structure (leading ‘0’s can be omitted):
Physical slot position where the pulse input module is installed (1 to 13)Base module numberMain unit: 0Sub unit: 1 to 7 (for sequence CPU)
X XX
FC040209.EPS
1st Edition : Feb.01,1999-00
<Toc> <Ind> <5. Sample Programs > 5-1
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
5. Sample ProgramsTwo sample programs are given here, one using ladder application instructions and theother using BASIC statements.
5-2<Toc> <Ind> <5. Sample Programs >
IM 34M6H54-01E
5.1 Sample Program Using Ladder ApplicationInstructions
(0002)Input:rising,ring maximum value $FFFF,continue on return to $0,no filter
(0001)*** Setting CH1 ***
Program name: xs04 slot 4 of XS04Title: Perform setting for each channel and start counting
Date: 95/09/29 18:21:20 Page : 1
(0003)Output:counter
Input:Rising,ring maximum value = Preset value 2-1,stop on returning to zero,with filter
Output:Counter value = Preset value
(0004)00001
(0013)00014
(0005)
(0006)
(0007)
(0008)
(0009)
(0010)
(0011)
*** Setting CH2 ***
(0012)
(0014)
(0015)
(0016)
(0017)
(0018)
(0019)
(0020)
Preset value 1
Preset value 2
Input function
Output function
Initialize 32 bitregion
Preset value 1
Preset value 2
Input function
Output function
M0035
$40 D1004MOV
$0 D1003MOV
17 4 4
0 D0011MOV
$8000 D1002MOV
WRITE D1001
$4000 D1001MOV
M0035
$1000 D2004MOV
$E D2003MOV
21 4 4
20000 D2002MOV
WRITE D2001
10000 D2001MOV
Input:Falling,rising maximum value $FFFF,continue on return to zero,with filter
Out:Counter stopped ON
*** Setting CH3 ***
(0021)00025
(0022)
(0023)
(0024)
Preset value 1
Preset value 2
Input function
M0035
$2080 D3004MOV
$9 D3003MOV
0 D3002MOV
0 D3001MOV
FC0501_1.EPS
1st Edition : Feb.01,1999-00
<Toc> <Ind> <5. Sample Programs > 5-3
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
(0027)Input:Falling,ring maximum value = 10,continue on return to 0,with filter
(0026)*** CH4 ***
(0028)Output:Normally OFF
(0029)00036
(0030)
(0031)
(0032)
(0033)
(0034)
(0035)Set to eliminate pulses below 32.7 ms.
(0037)
(0038)
(0043)
(0044)
(0045)
Preset value 1
Output function
Preset value 2
Input function
Output function
Input filter constant
Enable CH1
Enable CH2
Enable CH3
Enable CH4
M0035
$4100 D4004MOV
$B D4003MOV
29 4 4
11 D4002MOV
*** Setting filter constant ***
WRITE D4001
0 D4001MOV
25 4 4WRITE D3001
M0035 14 D5001MOV
33 1 4WRITE D5001
D0001 4 1READ 4
*** Start all CH count ***
(0036)00047
(0039)00052
(0040)00054
(0041)00056
(0042)00058
00060
*** Read all CH counter values ***
*** CH1 data 16-bit → 32-bit conversion ***
(0047)
(0048)Store as 32-bit data into D00011/D00012
Read all counter values in D0001 to D0004
When counter value returns to 0,add 1 to upper word
(0046)
Y00449SET M0035
M0033
Y00453SET M0035
Y00457SET M0035
Y00461SET M0035
(0025)
Program name:XSO4Title:
Date:95/09/29 18:21:2 Page: 2
Processing carry
Reset input relay
M0033(0049)00062
(0050)00064
(0051)
D0001 D0011MOV
X00403INC D0012
Y00435
↑
FC0501_2.EPS
5-4<Toc> <Ind> <5. Sample Programs >
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
5.2 Sample Program Using BASIC Statements1000 ! F3XSO4 Sample program
1010 !
1020 ! Setting CH1
1030 ! Input : Rising edge, ring maximum value $FFFF, continue on return to $0,
no filter
1040 ! Output : On when counter value returns to 0
1050 CONTROL XS ,17 ; $4000
1060 CONTROL XS , 18 ; $8000
1070 CONTROL XS , 19 , $0
1080 CONTROL XS , 20 , $40
1090 !
1100 ! Setting CH2
1110 ! Input : Rising edge, ring maximum value = 19999, stop on return to $0,
with filter
1120 ! Output : On when counter value = preset value 1
1130 CONTROL XS , 21 ; 10000
1140 CONTROL XS , 22 ; 20000
1150 CONTROL XS , 23 ; $E
1160 CONTROL XS , 24 ; $1000
1170 !
1180 ! Setting CH3
1190 ! Input : Falling edge, ring maximum value = $FFFF, continue on return to
$0
1200 ! Output : On when counter value returns to $0
1210 CONTROL XS , 25 ; 0
1220 CONTROL XS , 26 ; 0
1230 CONTROL XS , 27 ; $9
1240 CONTROL XS , 28 ; $2080
1250 !
1260 ! CH4
1270 ! Input : Falling edge, ring maximum value = 10, continue on return to $0,
with filter
1280 ! Output: On when counter value returns to $0
1290 CONTROL XS , 29 ; 0
1300 CONTROL XS , 30 ; 11
1310 CONTROL XS , 31 ; $B
1320 CONTROL XS , 32 ; $4100
1330 !
1340 ! Set receive filter constant
1350 ! Set to eliminate pulses below 32.7ms
1360 CONTROL XS , 33 ; 14
1370 !
1380 ! Start counting for all channels
1390 CONTROL XS , 102 ; $1111
<Toc> <Ind> <5. Sample Programs > 5-5
IM 34M6H54-01E 1st Edition : Feb.01,1999-00
1400 !
1410 LOOP@
1420 ! Read counter value of all channels
1430 ENTER XS NOFORMAT ; CN (*)
1440 !
1450 ! Display all count values
1460 PRINT CN (*)
1470 !
1480 GOTO LOOP @
1490 STOP
1500 END
Blank Page
Addendum
IM34M06H54-01E-006 Apl. 2012
1/9
Yokogawa Electric Corporation
Manual No. : IM 34M06H54-01E Manual Name : Pulse Input Module Edition : 1st Edition
Add the following information to the manual.
Page 2-1 in Table 2.1 Standard Specifications , Change the specifications of Current consumption.
old: 150mA (at 5 V DC) new: 230mA(at 5 V DC)
On page 2-1 in section 2.1, “Specifications”, insert the following input and output signal specifications.
(1) Input Signal Specifications
Model Name Input Type
Rated Input Voltage (allowable voltage
range)Rated Input
Current Operating Voltage/Current
ON OFF
F3XS04-3N DC voltage 24 V DC (20.4 to 26.4 V DC) 11.2 mA 16 V DC min.
7.2 mA min. 6 V DC max. 2.5 mA max.
F3XS04-4N DC voltage 12 V DC (10.2 to 13.2 V DC) 10.3 mA 8.0 V DC min.
6.3 mA min. 3.5 V DC max.2.4 mA max.
(2) Output Signal Specifications
Output Type Rated Load Voltage (max. load voltage)
Max. Load Current
ON-time Residual Voltage
OFF-time Leakage Current
Surge Suppression
Transistor contact
12-24 V DC (26.4 V DC) 0.1 A/point 1.5 V DC max. 0.1 mA max. None
On page 2-3, under “External Connections”, replace Table 2.2 with the following table.
Connection Method Terminal block type Applicable conductor 0.33 to 0.82 mm2 (AWG22 to 18)
Shield twisted pair wire Example: Fuji Cable Industries, Inc. FKEV-SB series
Wire temperature rating 75℃ min. Wire material Copper Wire connection method Crimp-on-type Crimp-on terminals
Crimp-on terminals For M3.5 screws Tightening torque 0.8 N・m (7.1 lbf・in) Applicable crimp-on terminals
Example: Japan Solderless Terminal Mfg Co.,Ltd. V1.25-M3 Nihon Tanshi Co.,Ltd. RAV1.25-3.5
User’s Manual Pulse Input Module
IM34M06H54-01E-006 2/9
On page 2-6, replace all text with the following text.
Resetting A Counter
Resetting a counter returns its value to zero. A counter can be reset using output relays or it may reset automatically when the counter value exceeds its maximum set value.
(1) Resetting a counter using output relays Turning on output relay Y 36, Y 40, Y 44 or Y 48 (
indicates the slot number where the module is installed) resets the counter for channels 1 to 4 respectively.
(2) When the counter value of a ring-up counter exceeds its maximum value When the counter value of a ring-up counter exceeds its maximum value, the counter
resets automatically.
Enabling and Disabling A Counter You can continue (restart) or stop the operation of a counter.
(1) Enabling or disabling a counter using output relays Turning off output relay Y 49, Y 53, Y 57 or Y 61 (
indicates the slot number where the module is installed) stops the counter for input channels 1 to 4 respectively. Turning the relay on again enables the counter. After powering on, a counter remains disabled until its corresponding output relay is turned on.
(2) To automatically stop a counter when the counter value is reset to 0 You can set the counter of an input channel (1 to 4) to stop operation when its counter
value exceeds the maximum ring-up counter value and is reset to zero. To do so, set bit 2 of the input function register of the input channel to 1. To restart a counter that has stopped, turn on output relay Y 35, Y 39, Y 43, or Y 47 ( indicates the slot number where the module is installed) for input channels 1-4 respectively.
CAUTION
To restart the counter of an input channel, turn on the corresponding output relay and confirm that the corresponding input relay X 03, X 07, X 11 or X 15 ( indicates the slot number where the module is installed) has been actually cleared before turning off the output relay. Turning on the output relay for only one scan may fail to clear the input relay.
CAUTION
In a multi-CPU configuration, be sure to set the slot where the module is installed to “not used” in the configuration of CPUs not using the module. Otherwise, the counters may fail to operate correctly.
IM34M06H54-01E-006 3/9
On page 2-8, replace all text with the following text.
■ Output to External Output Terminal The module incorporates four independent external output terminals to allow programmable setting of outputs. Output setting can be made by (1) output selection, and (2) interconnection between output and input channels.
(1) Output selection There are 11 output selection options: latched or state output indicating the result of
comparison between a counter value and preset value 1 or 2 (8 options), counter operation status output, always-on output, or always-off output. The default output selection is latched output indicating the result of comparison between counter value and preset value 1.
A latched output turns on when the counter value and preset value 1 or 2 coincide, or when the counter value exceeds a ring up-counter maximum value and is reset. A latched output turns off when a user program turns on the related output relay. A latched output remains on until it is reset. To clear (turn off) a latched input relay, turn on the corresponding output relay and confirm that the input relay has been actually cleared before turning off the output relay. Turning on the output relay for only one scan may fail to clear the input relay.
A state output is on when the comparison operation result is true, and is off when the comparison operation result is false.
The counter operation status output is on when the counter is running, and off when the counter is not running.
An always-on or always-off output stays on or off respectively regardless of counter operation.
(2) Connecting output terminals to input channels By setting the appropriate output function register, you can connect an output terminal
to any input channel. By default, output terminal 1 is connected to input channel 1, output terminal 2 is connected to input channel 2, output terminal 3 is connected to input channel 3, and output terminal 4 is connected to input channel 4.
IM34M06H54-01E-006 4/9
On page 2-9, replace Figure 2.6 with the following figure.
Figure 2.6 Counter Operation by Input Function *2
Pulse input
$FFFF
$00 $02 $06
Preset value 2
0
Enable counterY 49 *1
Input function *2
Counter value resets to 0X 03 *1
* 1: The relay numbers shown above are for channel 1. * 2: See "Input Function" on page 4-6.
Preset value 1Cou
nter
val
ue
Reset X 03Y 35 *1
IM34M06H54-01E-006 5/9
On page 2-10, replace Figure 2.7 with the following figure.
Pulse input
$FFFF
$00
Preset value 2 *1
0
Enable counter Y 49 *2
Preset value 1 *1
Counter value = preset value 1X 01 *2
Counter value = preset value 2X 02 *2
Counter value resets to 0X 03 *2
Counter value >= preset value 1X 17 *2
Counter value >= preset value 2X 18 *2
Reset X 01Y 33 *2
Reset X 02 Y 34 *2
Reset X 03Y 35 *2
Input function
* 1: A decimal integer larger than 32,767 (or hexadecimal $7FFF) is normally regarded as a negative number. However, comparison operations on the F3XS04 treat all integers as unsigned with values ranging from 0 to 65535. * 2: Relay numbers shown above are for channel 1.
Figure 2.7 Input Relay Reset
Page 4-8, Page 4-17
・Output selection Change the text of "Output selection and type" as follows.
old: Counter operating status (on when stopped), state type new: Counter operating status (on when activated), state type
IM34M06H54-01E-006 6/9
On page 4-10, replace the text below the subhead, “4.1.4 Reading Input Relays” with the following text.
Table 4.4 shows the input relays used in the Pulse Input Module. Input relays are either latched type or state type. A latched type input relay turns on when its setting condition is true; it stays on until the output relay that is used to turn off the input relay changes from off to on. A state type input relay is on as long as its setting condition is true; it is off when its setting condition is false. To clear (turn off) a latched type input relay, turn off the corresponding output relay and confirm that the input relay has been actually cleared before turning off the output relay. Turning on the output relay for only one scan may fail to clear the input relay.
On page 4-12, replace the note to Table 4.5, “Output Relays Used in the Pulse Input Module” with the following text.
Note: After turning on an output relay, be sure to confirm that the corresponding input relay has actually been cleared before
turning off the output relay. When a counter stops running after its value returns to 0, you can restart the counter by changing the appropriate output relay Y 35, Y 39, Y 43, or Y 47 from off to on. This resets the input relay that will be turned on when the ring-up counter maximum value is exceeded.
On page 4-19, replace the text below the subhead, “4.2.7 Reading Input Relays” with the following text.
Table 4.8 shows the input relays used in the Pulse Input Module. A latched type input relay turns on when its setting condition is true; it stays on until the output relay that is used to turn off the input relay changes from off to on. A state type input relay is on as long as its setting condition is true; it is off when its setting condition is false. To clear (turn off) a latched type input relay, turn off the corresponding output relay and confirm that the input relay has been actually cleared before turning off the output relay. Turning on the output relay for only one scan may fail to clear the input relay.
On page 4-23, replace the note to Table 4.9, “Output Relays Used in the Pulse Input Module” with the following text.
Note: After turning on an output relay, be sure to confirm that the corresponding input relay has actually been cleared before
turning off the output relay. When a counter stops running after its value returns to 0, you can restart the counter by changing the appropriate output relay Y 35, Y 39, Y 43, or Y 47 from off to on. This resets the input relay that will be turned on when the ring-up counter maximum value is exceeded.
IM34M06H54-01E-006 7/9
On pages 5-2 and 5-3, replace the sample program in Section 5.1, “Sample Program Using Ladder Application Instructions” with the following program.
(00002) Input: no filter, continue when value resets to $0, ring max. value $FFFF, risingedge
(00001)*** Setting CH1 ***
(00003)Output: turns on when counter value returns to 0
Input: filter, stop when value resets to $0, ring maximum value 19999, rising edge
Output:turns on when counter value = Preset value 1
(00004)00001N
(00013)00014N
(00005)
(00006)
(00007)
(00008)
(00009)
(00010)
(00011)
*** Setting CH2 ***
(00012)
(00014)
(00015)
(00016)
(00017)
(00018)
(00019)
(00020)
Preset value 1
Preset value 2
Input function
Output function
Initialize 32 bits
Preset value 1
Preset value 2
Input function
Output function
M00035
$40 D01004MOV
$0 D01003MOV
17 4 4
0 D00011MOV
$8000 D01002MOV
WRITE D1001
$4000 D01001MOV
M00035
$1000 D02004MOV
$E D02003MOV
21 4 4
20000 D02002MOV
WRITE D02001
10000 D02001MOV
Input: filter, continue when value resets to $0, ring max. value $FFFF, fallingedge
Output: turns on when counter is not running
*** Setting CH3 ***
(00021)
(00025)
(00022)
(00023)
(00024)
Preset value 1
Preset value 2
Input function
M00035
$2080 D03004MOV
$9 D03003MOV
0 D03002MOV
0 D03001MOV
25 4 4WRITE D03001
00025N
Output function
IM34M06H54-01E-006 8/9
(00027)Input: filter, continue when value resets to $0, ring max. value 10, falling edge
(00026)*** Setting CH4 ***
(00028)Output: always off
(00029)00036N
(00030)
(00031)
(00032)
(00033)
(00034)
(00035)Set to eliminate pulses between 14 to 32.7 ms.
(00037)
(00038)
(00043)
(00044)
(00045)
Preset value 1
Preset value 2
Input function
Output function
Input filter constant
Enable CH1
Enable CH2
Enable CH3
Enable CH4
M00035
$4100 D04004MOV
$B D04003MOV
29 4 4
11 D04002MOV
*** Setting filter constant ***
WRITE D04001
0 D04001MOV
M00035 14 D05001MOV
33 1 4WRITE D05001
D00001 4 1READ 4
*** Start counting for all CHs ***
(00036)00047N
(00039)00052N
(00040)00054N
(00041)00056N
(00042)00058N
00060N
*** Read all CH counter values ***
*** CH1 data: 16 to 32-bit conversion
(00047)
(00048)Store as 32-bit data into D00011/D00012
Read counter values into area D0001-D0004
When counter value returns to 0,add 1 to high-orderword
(00046)
Y00449SET M00035
M00033
Y00453SET M00035
Y00457SET M00035
Y00461SET M00035
Process carry
Reset input relay
M00033(00049)00062N
(00050)00064N
(00051)
D00001 D00011MOV
X00403INC D00012
Y00435
↑
IM34M06H54-01E-006 9/9
On pages 5-4 and 5-5, replace the sample program in Section 5.2, “Sample Program Using BASIC Statements” with the following program.
1000 ! F3XSO4 Sample program 1010 ! 1020 DEFINT A-Z 1030 XS=4 1040 ASSIGN XS04=XS 1050 ! Setting CH1 1060 ! Input: rising edge, ring max. value=$FFFF, continue when value resets to $0, no filter 1070 ! Output: turns on when counter value resets to 0 1080 CONTROL XS,1;$4000 1090 CONTROL XS,2;$8000 1100 CONTROL XS,3;$0 1110 CONTROL XS,4;$40 1120 ! 1130 Setting CH2 1140 ! Input: rising edge, ring max. value=19999, stop when value resets to $0, filter 1150 ! Output: turns on when counter value=preset value 1 1160 CONTROL XS,5;10000 1170 CONTROL XS,6;20000 1180 CONTROL XS,7;$E 1190 CONTROL XS,8;$1000 1200 ! 1210 ! Setting CH3 1220 ! Input: falling edge, ring max. value=$FFFF, continue when value resets to $0, filter 1230 ! Output: turns on when counter is not running 1240 CONTROL XS,9;0 1250 CONTROL XS,10;0 1260 CONTROL XS,11;$9 1270 CONTROL XS,12;$2080 1280 ! 1290 ! Setting CH4 1300 ! Input: falling edge, ring max. value=10, stop when value resets to $0, filter 1310 ! Output: always off 1320 CONTROL XS,13;0 1330 CONTROL XS,14;11 1340 CONTROL XS,15;$B 1350 CONTROL XS,16;$4100 1360 ! 1370 ! Set filter constant for receiving 1380 ! Set to eliminate pulses below 32.7ms 1390 CONTROL,XS,17;14 1400 ! 1410 ! Start counting for all channels 1420 CONTROL XS,102;$1111 1430 ! 1440 LOOP@ 1450 ! Read counter value for all channels 1460 ENTER XS NOFORMAT;CN(*) 1470 ! 1480 ! Display all counter values 1490 PRINT CN(*) 1500 ! 1510 GOTO LOOP@ 1520 STOP 1530 END
Blank Page